REGRESSION(r229480): ERROR: Unhandled web process message 'WebCookieManager:SetHTTPCo...
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2018 16:28:03 +0000 (16:28 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2018 16:28:03 +0000 (16:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184124
<rdar://problem/38998971>

Reviewed by Chris Dumez.

Cookie accept policy messages were still being sent to the WebContent process after
I removed cookie access in r229480. The WebContent process no longer recognizes these
messages, and generates logging to that effect.

This patch stops sending these unnecessary messages to the WebContent process. Only the
Network process needs to receive this information.

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebCookieManagerProxy.cpp

index 93e5a02..1d2e74c 100644 (file)
@@ -1,3 +1,21 @@
+2018-03-29  Brent Fulgham  <bfulgham@apple.com>
+
+        REGRESSION(r229480): ERROR: Unhandled web process message 'WebCookieManager:SetHTTPCookieAcceptPolicy'
+        https://bugs.webkit.org/show_bug.cgi?id=184124
+        <rdar://problem/38998971>
+
+        Reviewed by Chris Dumez.
+
+        Cookie accept policy messages were still being sent to the WebContent process after
+        I removed cookie access in r229480. The WebContent process no longer recognizes these
+        messages, and generates logging to that effect.
+        
+        This patch stops sending these unnecessary messages to the WebContent process. Only the
+        Network process needs to receive this information.
+
+        * UIProcess/WebCookieManagerProxy.cpp:
+        (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
+
 2018-03-29  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
 
         [WPE] Floating point exception in WebEventFactory::createWebWheelEvent
index cdc455f..af0e3ee 100644 (file)
@@ -252,11 +252,6 @@ void WebCookieManagerProxy::setHTTPCookieAcceptPolicy(PAL::SessionID, HTTPCookie
     processPool()->setInitialHTTPCookieAcceptPolicy(policy);
 #endif
 
-    // The policy is not sent to newly created processes (only Soup does that via setInitialHTTPCookieAcceptPolicy()). This is not a serious problem, because:
-    // - When testing, we only have one WebProcess and one NetworkProcess, and WebKitTestRunner never restarts them;
-    // - When not testing, Cocoa has the policy persisted, and thus new processes use it (even for ephemeral sessions).
-    processPool()->sendToAllProcesses(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy, OptionalCallbackID()));
-
     auto callbackID = m_callbacks.put(WTFMove(callbackFunction));
     processPool()->sendToNetworkingProcess(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy, OptionalCallbackID(callbackID)));
 }