Remove API::PageConfiguration::m_sessionID
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Aug 2019 17:12:58 +0000 (17:12 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Aug 2019 17:12:58 +0000 (17:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200670

Reviewed by Alex Christensen.

We can remove this member since it is only accessed for a debug assertion that can be removed without any harm.

* UIProcess/API/APIPageConfiguration.cpp:
(API::PageConfiguration::PageConfiguration):
(API::PageConfiguration::copy const):
(API::PageConfiguration::setWebsiteDataStore):
* UIProcess/API/APIPageConfiguration.h:
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createWebPage):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APIPageConfiguration.cpp
Source/WebKit/UIProcess/API/APIPageConfiguration.h
Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp

index 19acb63..9154dee 100644 (file)
@@ -1,5 +1,24 @@
 2019-08-14  Youenn Fablet  <youenn@apple.com>
 
+        Remove API::PageConfiguration::m_sessionID
+        https://bugs.webkit.org/show_bug.cgi?id=200670
+
+        Reviewed by Alex Christensen.
+
+        We can remove this member since it is only accessed for a debug assertion that can be removed without any harm.
+
+        * UIProcess/API/APIPageConfiguration.cpp:
+        (API::PageConfiguration::PageConfiguration):
+        (API::PageConfiguration::copy const):
+        (API::PageConfiguration::setWebsiteDataStore):
+        * UIProcess/API/APIPageConfiguration.h:
+        * UIProcess/API/glib/WebKitWebContext.cpp:
+        (webkitWebContextCreatePageForWebView):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::createWebPage):
+
+2019-08-14  Youenn Fablet  <youenn@apple.com>
+
         ThreadableBlobRegistry::blobSize should take a SessionID as parameter
         https://bugs.webkit.org/show_bug.cgi?id=200671
 
index e4019ab..8e60857 100644 (file)
@@ -49,7 +49,6 @@ Ref<PageConfiguration> PageConfiguration::create()
 }
 
 PageConfiguration::PageConfiguration()
-    : m_sessionID(PAL::SessionID::emptySessionID())
 {
 }
 
@@ -69,7 +68,6 @@ Ref<PageConfiguration> PageConfiguration::copy() const
     copy->m_relatedPage = this->m_relatedPage;
     copy->m_visitedLinkStore = this->m_visitedLinkStore;
     copy->m_websiteDataStore = this->m_websiteDataStore;
-    copy->m_sessionID = this->m_sessionID;
     copy->m_treatsSHA1SignedCertificatesAsInsecure = this->m_treatsSHA1SignedCertificatesAsInsecure;
 #if PLATFORM(IOS_FAMILY)
     copy->m_alwaysRunsAtForegroundPriority = this->m_alwaysRunsAtForegroundPriority;
@@ -161,11 +159,6 @@ API::WebsiteDataStore* PageConfiguration::websiteDataStore()
 void PageConfiguration::setWebsiteDataStore(API::WebsiteDataStore* websiteDataStore)
 {
     m_websiteDataStore = websiteDataStore;
-
-    if (m_websiteDataStore)
-        m_sessionID = m_websiteDataStore->websiteDataStore().sessionID();
-    else
-        m_sessionID = PAL::SessionID::emptySessionID();
 }
 
 WebsitePolicies* PageConfiguration::defaultWebsitePolicies() const
@@ -178,18 +171,6 @@ void PageConfiguration::setDefaultWebsitePolicies(WebsitePolicies* policies)
     m_defaultWebsitePolicies = policies;
 }
 
-PAL::SessionID PageConfiguration::sessionID()
-{
-    ASSERT(!m_websiteDataStore || m_websiteDataStore->websiteDataStore().sessionID() == m_sessionID || m_sessionID == PAL::SessionID::legacyPrivateSessionID());
-
-    return m_sessionID;
-}
-
-void PageConfiguration::setSessionID(PAL::SessionID sessionID)
-{
-    m_sessionID = sessionID;
-}
-
 RefPtr<WebKit::WebURLSchemeHandler> PageConfiguration::urlSchemeHandlerForURLScheme(const WTF::String& scheme)
 {
     return m_urlSchemeHandlers.get(scheme);
index 0275913..1afdcb4 100644 (file)
@@ -90,10 +90,6 @@ public:
     WebsitePolicies* defaultWebsitePolicies() const;
     void setDefaultWebsitePolicies(WebsitePolicies*);
 
-    // FIXME: Once PageConfigurations *always* have a data store, get rid of the separate sessionID.
-    PAL::SessionID sessionID();
-    void setSessionID(PAL::SessionID);
-
     bool treatsSHA1SignedCertificatesAsInsecure() { return m_treatsSHA1SignedCertificatesAsInsecure; }
     void setTreatsSHA1SignedCertificatesAsInsecure(bool treatsSHA1SignedCertificatesAsInsecure) { m_treatsSHA1SignedCertificatesAsInsecure = treatsSHA1SignedCertificatesAsInsecure; } 
 
@@ -151,9 +147,6 @@ private:
 
     RefPtr<WebsiteDataStore> m_websiteDataStore;
     RefPtr<WebsitePolicies> m_defaultWebsitePolicies;
-    // FIXME: We currently have to pass the session ID separately here to support the legacy private browsing session.
-    // Once we get rid of it we should get rid of this configuration parameter as well.
-    PAL::SessionID m_sessionID;
 
     bool m_treatsSHA1SignedCertificatesAsInsecure { true };
 #if PLATFORM(IOS_FAMILY)
index bfc567c..ad83db8 100644 (file)
@@ -1760,7 +1760,6 @@ void webkitWebContextCreatePageForWebView(WebKitWebContext* context, WebKitWebVi
     if (!manager)
         manager = context->priv->websiteDataManager.get();
     pageConfiguration->setWebsiteDataStore(&webkitWebsiteDataManagerGetDataStore(manager));
-    pageConfiguration->setSessionID(pageConfiguration->websiteDataStore()->websiteDataStore().sessionID());
     webkitWebViewCreatePage(webView, WTFMove(pageConfiguration));
 
     context->priv->webViews.set(webkit_web_view_get_page_id(webView), webView);
index dbe2535..5e8819d 100644 (file)
@@ -1228,9 +1228,7 @@ Ref<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, Ref<API:
         if (!m_websiteDataStore)
             m_websiteDataStore = API::WebsiteDataStore::defaultDataStore().ptr();
 
-        ASSERT(!pageConfiguration->sessionID().isValid());
         pageConfiguration->setWebsiteDataStore(m_websiteDataStore.get());
-        pageConfiguration->setSessionID(pageConfiguration->preferences()->privateBrowsingEnabled() ? PAL::SessionID::legacyPrivateSessionID() : m_websiteDataStore->websiteDataStore().sessionID());
     }
 
     RefPtr<WebProcessProxy> process;