Drop sessionID / websiteDataStoreID from WebPageCreationParameters
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2019 03:48:49 +0000 (03:48 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Sep 2019 03:48:49 +0000 (03:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201847

Reviewed by Youenn Fablet.

Drop sessionID / websiteDataStoreID from WebPageCreationParameters now that we have
one session per WebProcess.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
(WebKit::WebPageCreationParameters::WebPageCreationParameters): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::createWebPage):

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

Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPageCreationParameters.cpp
Source/WebKit/Shared/WebPageCreationParameters.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebProcess.cpp

index ec35725..3f8bed5 100644 (file)
@@ -1,3 +1,27 @@
+2019-09-16  Chris Dumez  <cdumez@apple.com>
+
+        Drop sessionID / websiteDataStoreID from WebPageCreationParameters
+        https://bugs.webkit.org/show_bug.cgi?id=201847
+
+        Reviewed by Youenn Fablet.
+
+        Drop sessionID / websiteDataStoreID from WebPageCreationParameters now that we have
+        one session per WebProcess.
+
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode const):
+        (WebKit::WebPageCreationParameters::decode):
+        * Shared/WebPageCreationParameters.h:
+        (WebKit::WebPageCreationParameters::WebPageCreationParameters): Deleted.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::creationParameters):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::createWindow):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::m_textAutoSizingAdjustmentTimer):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::createWebPage):
+
 2019-09-16  Dean Jackson  <dino@apple.com>
 
         Provide a prototype for AR QuickLook to trigger processing in the originating page
index 5ca956e..d21b1e5 100644 (file)
@@ -32,7 +32,6 @@ namespace WebKit {
 
 void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
 {
-    encoder << sessionID;
     encoder << viewSize;
     encoder << activityState;
 
@@ -56,7 +55,6 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
     encoder << itemStates;
     encoder << userContentControllerID;
     encoder << visitedLinkTableID;
-    encoder << websiteDataStoreID;
     encoder << canRunBeforeUnloadConfirmPanel;
     encoder << canRunModal;
     encoder << deviceScaleFactor;
@@ -138,12 +136,7 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const
 
 Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decoder& decoder)
 {
-    Optional<PAL::SessionID> sessionID;
-    decoder >> sessionID;
-    if (!sessionID)
-        return WTF::nullopt;
-
-    WebPageCreationParameters parameters { *sessionID };
+    WebPageCreationParameters parameters;
 
     if (!decoder.decode(parameters.viewSize))
         return WTF::nullopt;
@@ -211,8 +204,6 @@ Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decod
 
     if (!decoder.decode(parameters.visitedLinkTableID))
         return WTF::nullopt;
-    if (!decoder.decode(parameters.websiteDataStoreID))
-        return WTF::nullopt;
     if (!decoder.decode(parameters.canRunBeforeUnloadConfirmPanel))
         return WTF::nullopt;
     if (!decoder.decode(parameters.canRunModal))
index 10124d0..d5d3639 100644 (file)
@@ -45,7 +45,6 @@
 #include <WebCore/ScrollTypes.h>
 #include <WebCore/UserInterfaceLayoutDirection.h>
 #include <WebCore/ViewportArguments.h>
-#include <pal/SessionID.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/WTFString.h>
 
@@ -65,15 +64,9 @@ class Encoder;
 namespace WebKit {
 
 struct WebPageCreationParameters {
-    explicit WebPageCreationParameters(PAL::SessionID sessionID)
-        : sessionID(sessionID)
-    {
-    }
-
     void encode(IPC::Encoder&) const;
     static Optional<WebPageCreationParameters> decode(IPC::Decoder&);
 
-    PAL::SessionID sessionID;
     WebCore::IntSize viewSize;
 
     OptionSet<WebCore::ActivityState::Flag> activityState;
@@ -108,7 +101,6 @@ struct WebPageCreationParameters {
 
     UserContentControllerIdentifier userContentControllerID;
     uint64_t visitedLinkTableID;
-    uint64_t websiteDataStoreID;
     bool canRunBeforeUnloadConfirmPanel;
     bool canRunModal;
 
index 8c47172..20c369d 100644 (file)
@@ -7218,7 +7218,7 @@ void WebPageProxy::resetStateAfterProcessExited(ProcessTerminationReason termina
 
 WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& process, DrawingAreaProxy& drawingArea)
 {
-    WebPageCreationParameters parameters { process.websiteDataStore().sessionID() };
+    WebPageCreationParameters parameters;
 
     parameters.viewSize = pageClient().viewSize();
     parameters.activityState = m_activityState;
@@ -7243,7 +7243,6 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc
     parameters.itemStates = m_backForwardList->itemStates();
     parameters.userContentControllerID = m_userContentController->identifier();
     parameters.visitedLinkTableID = m_visitedLinkStore->identifier();
-    parameters.websiteDataStoreID = process.websiteDataStore().identifier();
     parameters.canRunBeforeUnloadConfirmPanel = m_uiClient->canRunBeforeUnloadConfirmPanel();
     parameters.canRunModal = m_canRunModal;
     parameters.deviceScaleFactor = deviceScaleFactor();
index 73df006..3f52c2d 100644 (file)
@@ -298,8 +298,8 @@ Page* WebChromeClient::createWindow(Frame& frame, const FrameLoadRequest& reques
     if (!newPageID)
         return nullptr;
     ASSERT(parameters);
-    if (parameters->sessionID == m_page.sessionID())
-        parameters->oldPageID = m_page.identifier();
+
+    parameters->oldPageID = m_page.identifier();
 
     webProcess.createWebPage(*newPageID, WTFMove(*parameters));
     return webProcess.webPage(*newPageID)->corePage();
index a93a580..9df1a8b 100644 (file)
@@ -503,7 +503,7 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
 
     m_page = makeUnique<Page>(WTFMove(pageConfiguration));
 
-    setSessionID(parameters.sessionID);
+    setSessionID(WebProcess::singleton().sessionID());
 
     updatePreferences(parameters.store);
 
index ff884fb..7785df4 100644 (file)
@@ -652,8 +652,6 @@ WebPage* WebProcess::webPage(PageIdentifier pageID) const
 
 void WebProcess::createWebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters)
 {
-    ASSERT(parameters.sessionID == sessionID());
-
     // It is necessary to check for page existence here since during a window.open() (or targeted
     // link) the WebPage gets created both in the synchronous handler and through the normal way. 
     auto result = m_pageMap.add(pageID, nullptr);