Bug 55986

Summary: Use the Cookie Storage from the Private Browsing Storage Session directly
Product: WebKit Reporter: Jessie Berlin <jberlin>
Component: WebKit2Assignee: Jessie Berlin <jberlin>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, jberlin
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Jessie Berlin
Reported 2011-03-08 17:20:29 PST
There is no need to create an in-memory copy because the Private Browsing Storage Session is already in-memory only. <rdar://problem/9102381>
Attachments
Patch (deleted)
2011-03-08 18:02 PST, Jessie Berlin
no flags
Jessie Berlin
Comment 1 2011-03-08 18:02:49 PST
Adam Roben (:aroben)
Comment 2 2011-03-09 05:15:52 PST
Comment on attachment 85119 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=85119&action=review Why doesn't Mac need the CreateInMemory fallback path? > Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp:81 > + privateBrowsingCookieStorage() = wkCreateInMemoryHTTPCookieStorage(); You're leaking this CFHTTPCookieStorageRef.
Jessie Berlin
Comment 3 2011-03-09 05:58:47 PST
(In reply to comment #2) > (From update of attachment 85119 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=85119&action=review > > Why doesn't Mac need the CreateInMemory fallback path? Because if it isn't using the CFURLSTORAGESESSIONS, it calls wkSetCookieStoragePrivateBrowsingEnabled(enabled), which makes all cookies be stored in memory. > > > Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp:81 > > + privateBrowsingCookieStorage() = wkCreateInMemoryHTTPCookieStorage(); > > You're leaking this CFHTTPCookieStorageRef. Hrm, for some reason I thought the result of a Create wasn't already retained. Fixed.
Adam Roben (:aroben)
Comment 4 2011-03-09 06:44:28 PST
(In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 85119 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=85119&action=review > > > > Why doesn't Mac need the CreateInMemory fallback path? > > Because if it isn't using the CFURLSTORAGESESSIONS, it calls wkSetCookieStoragePrivateBrowsingEnabled(enabled), which makes all cookies be stored in memory. I guess I don't understand what the difference between Mac and Windows is here.
Jessie Berlin
Comment 5 2011-03-09 07:12:06 PST
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > (From update of attachment 85119 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=85119&action=review > > > > > > Why doesn't Mac need the CreateInMemory fallback path? > > > > Because if it isn't using the CFURLSTORAGESESSIONS, it calls wkSetCookieStoragePrivateBrowsingEnabled(enabled), which makes all cookies be stored in memory. > > I guess I don't understand what the difference between Mac and Windows is here. wkSetCookieStoragePrivateBrowsingEnabled (and the functionality behind it) doesn't exist on Windows. wkSetCookieStoragePrivateBrowsingEnabled was the way it was done on Mac before my changes to add the CFURLSTORAGESESSIONS stuff.
Jessie Berlin
Comment 6 2011-03-09 08:42:58 PST
Note You need to log in before you can comment on or make changes to this bug.