WebKit Bugzilla
Attachment 346227 Details for
Bug 188209
: [Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188209-20180731170016.patch (text/plain), 3.78 KB, created by
Sihui Liu
on 2018-07-31 17:00:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2018-07-31 17:00:17 PDT
Size:
3.78 KB
patch
obsolete
>Subversion Revision: 234439 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 713ea7341df292025245b0a6b3a5e84829e0d24c..b20cec8ee934eff10788616f8daad5d1a20649ad 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,17 @@ >+2018-07-31 Sihui Liu <sihui_liu@apple.com> >+ >+ [Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used >+ https://bugs.webkit.org/show_bug.cgi?id=188209 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If defaultDataStore is already created when launching network process, it means user >+ probably set cookies for default session via API, so we should update m_websiteDataStore to >+ make sure pendingCookies is passed to network process. >+ >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::ensureNetworkProcess): >+ > 2018-07-31 Rob Buis <rbuis@igalia.com> > > Remove ResourceResponse::cacheBodyKey API >diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp >index f2159ce1c0a5c5b895cac1813da4a0e015d0d514..0e7875e2f7e006e5a915d6bff398e9cf465f844f 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.cpp >+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp >@@ -481,6 +481,9 @@ NetworkProcessProxy& WebProcessPool::ensureNetworkProcess(WebsiteDataStore* with > parameters.defaultSessionParameters.sessionID = PAL::SessionID::defaultSessionID(); > } > >+ if (!m_websiteDataStore && API::WebsiteDataStore::defaultDataStoreExists()) >+ m_websiteDataStore = API::WebsiteDataStore::defaultDataStore().ptr(); >+ > if (m_websiteDataStore) { > parameters.defaultSessionPendingCookies = copyToVector(m_websiteDataStore->websiteDataStore().pendingCookies()); > m_websiteDataStore->websiteDataStore().clearPendingCookies(); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b5f378d2c7a47943b66a5def6a00924e9dca66a4..55867e772cec45f2a3a0d3800ffb2b5e68156d69 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,13 @@ >+2018-07-31 Sihui Liu <sihui_liu@apple.com> >+ >+ [Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used >+ https://bugs.webkit.org/show_bug.cgi?id=188209 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm: >+ (TEST): >+ > 2018-07-31 Alex Christensen <achristensen@webkit.org> > > Build fix. Remove unused variable. >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm >index 8e19ed323b711dd2ca3482c42019ff2eccc32513..825401cc4d1726d6c60c5a52460ddf408c03bb63 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm >@@ -534,6 +534,10 @@ TEST(WebKit, WKHTTPCookieStoreWithoutProcessPool) > TestWebKitAPI::Util::run(&finished); > > // DefaultDataStore >+ configuration = adoptNS([[WKWebViewConfiguration alloc] init]); >+ auto processPool = adoptNS([[WKProcessPool alloc] init]); >+ [configuration setProcessPool:processPool.get()]; >+ > auto defaultStore = [WKWebsiteDataStore defaultDataStore]; > finished = false; > [defaultStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] { >@@ -560,7 +564,6 @@ TEST(WebKit, WKHTTPCookieStoreWithoutProcessPool) > TestWebKitAPI::Util::run(&finished); > > finished = false; >- configuration = adoptNS([[WKWebViewConfiguration alloc] init]); > configuration.get().websiteDataStore = defaultStore; > webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]); > webView.get().UIDelegate = delegate.get();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188209
: 346227 |
346262