WebKit Bugzilla
Attachment 341956 Details for
Bug 186303
: [iOS] TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPool fails because cookies aren't flushed to file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186303-20180604233140.patch (text/plain), 3.78 KB, created by
Sihui Liu
on 2018-06-04 23:31:41 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2018-06-04 23:31:41 PDT
Size:
3.78 KB
patch
obsolete
>Subversion Revision: 232350 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 23de5dd709914ede45bc153ee53db6edef33f03c..4b24a17edbd8b5c648e4a189e8e1883c709b6051 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,21 @@ >+2018-06-04 Sihui Liu <sihui_liu@apple.com> >+ >+ [iOS] TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPool fails because cookies aren't flushed to file >+ https://bugs.webkit.org/show_bug.cgi?id=186303 >+ <rdar://problem/40468716> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No matter there is an observer or not, cookies in UI process should always be flushed to >+ file when new process pool is created, such that cookies created via API can be synced to >+ network process. >+ >+ * UIProcess/API/APIHTTPCookieStore.cpp: >+ (API::HTTPCookieStore::HTTPCookieStore): >+ (API::HTTPCookieStore::registerObserver): >+ (API::HTTPCookieStore::cookieManagerDestroyed): >+ (API::HTTPCookieStore::registerForNewProcessPoolNotifications): >+ > 2018-05-30 Yusuke Suzuki <utatane.tea@gmail.com> > > [JSC] Pass VM& parameter as much as possible >diff --git a/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp b/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp >index ed5d7385964db80726343b7673ba0ce5a91afee6..ad9215793925b8afc3193348beb1c625d1f0f6ca 100644 >--- a/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp >+++ b/Source/WebKit/UIProcess/API/APIHTTPCookieStore.cpp >@@ -40,6 +40,8 @@ namespace API { > HTTPCookieStore::HTTPCookieStore(WebsiteDataStore& websiteDataStore) > : m_owningDataStore(websiteDataStore.websiteDataStore()) > { >+ if (!m_owningDataStore->processPoolForCookieStorageOperations()) >+ registerForNewProcessPoolNotifications(); > } > > HTTPCookieStore::~HTTPCookieStore() >@@ -151,7 +153,6 @@ void HTTPCookieStore::registerObserver(Observer& observer) > auto* pool = m_owningDataStore->processPoolForCookieStorageOperations(); > > if (!pool) { >- registerForNewProcessPoolNotifications(); > ASSERT(!m_observingUIProcessCookies); > > // Listen for cookie notifications in the UIProcess in the meantime. >@@ -203,10 +204,8 @@ void HTTPCookieStore::cookieManagerDestroyed() > > auto* pool = m_owningDataStore->processPoolForCookieStorageOperations(); > >- if (!pool) { >- registerForNewProcessPoolNotifications(); >+ if (!pool) > return; >- } > > m_observedCookieManagerProxy = pool->supplement<WebKit::WebCookieManagerProxy>(); > m_observedCookieManagerProxy->registerObserver(m_owningDataStore->sessionID(), *m_cookieManagerProxyObserver); >@@ -217,8 +216,6 @@ void HTTPCookieStore::registerForNewProcessPoolNotifications() > ASSERT(!m_processPoolCreationListenerIdentifier); > > m_processPoolCreationListenerIdentifier = WebProcessPool::registerProcessPoolCreationListener([this](WebProcessPool& newProcessPool) { >- ASSERT(m_cookieManagerProxyObserver); >- > if (!m_owningDataStore->isAssociatedProcessPool(newProcessPool)) > return; > >@@ -227,9 +224,10 @@ void HTTPCookieStore::registerForNewProcessPoolNotifications() > WebCore::NetworkStorageSession::defaultStorageSession().flushCookieStore(); > newProcessPool.ensureNetworkProcess(); > >- >- m_observedCookieManagerProxy = newProcessPool.supplement<WebKit::WebCookieManagerProxy>(); >- m_observedCookieManagerProxy->registerObserver(m_owningDataStore->sessionID(), *m_cookieManagerProxyObserver); >+ if (m_cookieManagerProxyObserver) { >+ m_observedCookieManagerProxy = newProcessPool.supplement<WebKit::WebCookieManagerProxy>(); >+ m_observedCookieManagerProxy->registerObserver(m_owningDataStore->sessionID(), *m_cookieManagerProxyObserver); >+ } > unregisterForNewProcessPoolNotifications(); > }); > }
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 186303
: 341956