There is no need to create an in-memory copy because the Private Browsing Storage Session is already in-memory only. <rdar://problem/9102381>
Created attachment 85119 [details] Patch
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.
(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.
(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.
(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.
Comment on attachment 85119 [details] Patch Committed in r80643 http://trac.webkit.org/changeset/80643