Assertion failure in NetworkStorageSession::setCookie: privilege of UI process is...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2018 16:51:16 +0000 (16:51 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 May 2018 16:51:16 +0000 (16:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185262

Patch by Sihui Liu <sihui_liu@apple.com> on 2018-05-04
Reviewed by Chris Dumez.

Fix an assertion failure by setting UI process privileges in constructor of WebsiteDataStore
because UI process may use the cookie API before creating a WebView.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp

index 3cb51d1..8123a8e 100644 (file)
@@ -1,3 +1,16 @@
+2018-05-04  Sihui Liu  <sihui_liu@apple.com>
+
+        Assertion failure in NetworkStorageSession::setCookie: privilege of UI process is not set
+        https://bugs.webkit.org/show_bug.cgi?id=185262
+
+        Reviewed by Chris Dumez.
+
+        Fix an assertion failure by setting UI process privileges in constructor of WebsiteDataStore
+        because UI process may use the cookie API before creating a WebView.
+
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::WebsiteDataStore::WebsiteDataStore):
+
 2018-05-04  Per Arne Vollan  <pvollan@apple.com>
 
         Adjust sandbox rules for simulator.
index 2aa4661..b754521 100644 (file)
@@ -48,6 +48,7 @@
 #include <WebCore/SecurityOriginData.h>
 #include <wtf/CompletionHandler.h>
 #include <wtf/CrossThreadCopier.h>
+#include <wtf/ProcessPrivilege.h>
 #include <wtf/RunLoop.h>
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
@@ -90,6 +91,7 @@ WebsiteDataStore::WebsiteDataStore(Configuration configuration, PAL::SessionID s
     , m_storageManager(StorageManager::create(m_configuration.localStorageDirectory))
     , m_queue(WorkQueue::create("com.apple.WebKit.WebsiteDataStore"))
 {
+    WTF::setProcessPrivileges(allPrivileges());
     maybeRegisterWithSessionIDMap();
     platformInitialize();
 }