Make sure all CFHTTPCookieStorageRefs we create are scheduled.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Jul 2017 06:57:48 +0000 (06:57 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 16 Jul 2017 06:57:48 +0000 (06:57 +0000)
commitfc77ba0b1f239853fd192c1818980ff04cb3347f
tree25ea69cef1e17cbd6cd6ddc5c937e536426bbb4c
parentad1fe2531c9180d81c58c384c0bdf8deaa490e70
Make sure all CFHTTPCookieStorageRefs we create are scheduled.
<rdar://problem/33221110> and https://bugs.webkit.org/show_bug.cgi?id=174513

Reviewed by Tim Horton.

Source/WebCore:

* platform/spi/cf/CFNetworkSPI.h:

Source/WebKit:

Whenever we create a CFHTTPCookieStorage from identifying data it is unscheduled.
We need to schedule it on the appropriate RunLoop.

This patch also cleans up the creation of the identifying data itself.

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

* Shared/cf/CookieStorageUtilsCF.h: Added.
* Shared/cf/CookieStorageUtilsCF.mm: Added.
(WebKit::cookieStorageFromIdentifyingData):
(WebKit::identifyingDataFromCookieStorage):

* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setSharedHTTPCookieStorage):

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):

* WebKit.xcodeproj/project.pbxproj:

* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
(TEST): Make this test more reliable by clearing everything beforehand.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/spi/cf/CFNetworkSPI.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm
Source/WebKit/Shared/cf/CookieStorageUtilsCF.h [new file with mode: 0644]
Source/WebKit/Shared/cf/CookieStorageUtilsCF.mm [new file with mode: 0644]
Source/WebKit/Shared/mac/ChildProcessMac.mm
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm