Title: [281398] trunk/Source/WebKit
Revision
281398
Author
simon.fra...@apple.com
Date
2021-08-22 08:35:52 -0700 (Sun, 22 Aug 2021)

Log Message

Use the strongly typed PageGroupIdentifier in place of uint64_t
https://bugs.webkit.org/show_bug.cgi?id=229356

Reviewed by Alex Christensen.

Replace uses of uint64_t for page group identifiers with PageGroupIdentifier.

There are two places where we convert between StorageNamespaceIdentifier and
PageGroupIdentifier because, as the comments state, those are equivalent.

* Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
(headers_for_type):
* Shared/IdentifierTypes.h:
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::get):
(WebKit::pageGroupData):
(WebKit::generatePageGroupID): Deleted.
* UIProcess/WebPageGroup.h:
(WebKit::WebPageGroup::pageGroupID const):
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::getOrCreate):
(WebKit::WebDatabaseProvider::WebDatabaseProvider):
* WebProcess/Databases/WebDatabaseProvider.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebPage/WebPageGroupProxy.h:
(WebKit::WebPageGroupProxy::pageGroupID const):
(WebKit::WebPageGroupProxy::localStorageNamespaceIdentifier const):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::webPageGroup):
(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::pageGroupID const):
* WebProcess/WebStorage/StorageNamespaceImpl.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (281397 => 281398)


--- trunk/Source/WebKit/ChangeLog	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/ChangeLog	2021-08-22 15:35:52 UTC (rev 281398)
@@ -1,3 +1,47 @@
+2021-08-22  Simon Fraser  <simon.fra...@apple.com>
+
+        Use the strongly typed PageGroupIdentifier in place of uint64_t
+        https://bugs.webkit.org/show_bug.cgi?id=229356
+
+        Reviewed by Alex Christensen.
+
+        Replace uses of uint64_t for page group identifiers with PageGroupIdentifier.
+
+        There are two places where we convert between StorageNamespaceIdentifier and
+        PageGroupIdentifier because, as the comments state, those are equivalent.
+
+        * Scripts/webkit/messages.py:
+        (types_that_cannot_be_forward_declared):
+        (headers_for_type):
+        * Shared/IdentifierTypes.h:
+        * Shared/WebPageGroupData.cpp:
+        (WebKit::WebPageGroupData::decode):
+        * Shared/WebPageGroupData.h:
+        * UIProcess/WebPageGroup.cpp:
+        (WebKit::WebPageGroup::get):
+        (WebKit::pageGroupData):
+        (WebKit::generatePageGroupID): Deleted.
+        * UIProcess/WebPageGroup.h:
+        (WebKit::WebPageGroup::pageGroupID const):
+        * WebProcess/Databases/WebDatabaseProvider.cpp:
+        (WebKit::WebDatabaseProvider::getOrCreate):
+        (WebKit::WebDatabaseProvider::WebDatabaseProvider):
+        * WebProcess/Databases/WebDatabaseProvider.h:
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
+        * WebProcess/Storage/WebSWContextManagerConnection.h:
+        * WebProcess/WebPage/WebPageGroupProxy.h:
+        (WebKit::WebPageGroupProxy::pageGroupID const):
+        (WebKit::WebPageGroupProxy::localStorageNamespaceIdentifier const):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::webPageGroup):
+        (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+        * WebProcess/WebStorage/StorageNamespaceImpl.cpp:
+        (WebKit::StorageNamespaceImpl::pageGroupID const):
+        * WebProcess/WebStorage/StorageNamespaceImpl.h:
+
 2021-08-21  Simon Fraser  <simon.fra...@apple.com>
 
         Use MediaKeySystemRequestIdentifier, rather than mysterious uint64_t values, in WebKit

Modified: trunk/Source/WebKit/Scripts/webkit/messages.py (281397 => 281398)


--- trunk/Source/WebKit/Scripts/webkit/messages.py	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/Scripts/webkit/messages.py	2021-08-22 15:35:52 UTC (rev 281398)
@@ -323,6 +323,7 @@
         'WebKit::MDNSRegisterIdentifier',
         'WebKit::MediaRecorderIdentifier',
         'WebKit::PDFPluginIdentifier',
+        'WebKit::PageGroupIdentifier',
         'WebKit::PlaybackSessionContextIdentifier',
         'WebKit::RTCDecoderIdentifier',
         'WebKit::RTCEncoderIdentifier',
@@ -779,6 +780,7 @@
         'WebKit::LastNavigationWasAppInitiated': ['"AppPrivacyReport.h"'],
         'WebKit::LayerHostingContextID': ['"LayerHostingContext.h"'],
         'WebKit::LayerHostingMode': ['"LayerTreeContext.h"'],
+        'WebKit::PageGroupIdentifier': ['"IdentifierTypes.h"'],
         'WebKit::PageState': ['"SessionState.h"'],
         'WebKit::PaymentSetupConfiguration': ['"PaymentSetupConfigurationWebKit.h"'],
         'WebKit::PaymentSetupFeatures': ['"ApplePayPaymentSetupFeaturesWebKit.h"'],

Modified: trunk/Source/WebKit/Shared/IdentifierTypes.h (281397 => 281398)


--- trunk/Source/WebKit/Shared/IdentifierTypes.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/Shared/IdentifierTypes.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -29,6 +29,9 @@
 
 namespace WebKit {
 
+enum PageGroupIdentifierType { };
+using PageGroupIdentifier = ObjectIdentifier<PageGroupIdentifierType>;
+
 enum TapIdentifierType { };
 using TapIdentifier = ObjectIdentifier<TapIdentifierType>;
 

Modified: trunk/Source/WebKit/Shared/WebPageGroupData.cpp (281397 => 281398)


--- trunk/Source/WebKit/Shared/WebPageGroupData.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/Shared/WebPageGroupData.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -43,7 +43,7 @@
     if (!identifier)
         return std::nullopt;
     
-    std::optional<uint64_t> pageGroupID;
+    std::optional<PageGroupIdentifier> pageGroupID;
     decoder >> pageGroupID;
     if (!pageGroupID)
         return std::nullopt;

Modified: trunk/Source/WebKit/Shared/WebPageGroupData.h (281397 => 281398)


--- trunk/Source/WebKit/Shared/WebPageGroupData.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/Shared/WebPageGroupData.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include "UserContentControllerIdentifier.h"
+#include "IdentifierTypes.h"
 #include <wtf/text/WTFString.h>
 
 namespace IPC {
@@ -40,7 +40,7 @@
     static std::optional<WebPageGroupData> decode(IPC::Decoder&);
 
     String identifier;
-    uint64_t pageGroupID;
+    PageGroupIdentifier pageGroupID;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/UIProcess/WebPageGroup.cpp (281397 => 281398)


--- trunk/Source/WebKit/UIProcess/WebPageGroup.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/UIProcess/WebPageGroup.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -40,14 +40,8 @@
 
 namespace WebKit {
 
-static uint64_t generatePageGroupID()
-{
-    static uint64_t uniquePageGroupID = 1;
-    return uniquePageGroupID++;
-}
+typedef HashMap<PageGroupIdentifier, WebPageGroup*> WebPageGroupMap;
 
-typedef HashMap<uint64_t, WebPageGroup*> WebPageGroupMap;
-
 static WebPageGroupMap& webPageGroupMap()
 {
     static NeverDestroyed<WebPageGroupMap> map;
@@ -59,7 +53,7 @@
     return adoptRef(*new WebPageGroup(identifier));
 }
 
-WebPageGroup* WebPageGroup::get(uint64_t pageGroupID)
+WebPageGroup* WebPageGroup::get(PageGroupIdentifier pageGroupID)
 {
     return webPageGroupMap().get(pageGroupID);
 }
@@ -77,18 +71,18 @@
 {
     WebPageGroupData data;
 
-    static NeverDestroyed<HashMap<String, uint64_t>> map;
-    if (HashMap<String, uint64_t>::isValidKey(identifier)) {
+    static NeverDestroyed<HashMap<String, PageGroupIdentifier>> map;
+    if (HashMap<String, PageGroupIdentifier>::isValidKey(identifier)) {
         data.pageGroupID = map.get().ensure(identifier, [] {
-            return generatePageGroupID();
+            return PageGroupIdentifier::generate();
         }).iterator->value;
     } else
-        data.pageGroupID = generatePageGroupID();
+        data.pageGroupID = PageGroupIdentifier::generate();
 
     if (!identifier.isEmpty())
         data.identifier = identifier;
     else
-        data.identifier = makeString("__uniquePageGroupID-", data.pageGroupID);
+        data.identifier = makeString("__uniquePageGroupID-", data.pageGroupID.toUInt64());
 
     return data;
 }

Modified: trunk/Source/WebKit/UIProcess/WebPageGroup.h (281397 => 281398)


--- trunk/Source/WebKit/UIProcess/WebPageGroup.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/UIProcess/WebPageGroup.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -26,6 +26,7 @@
 #pragma once
 
 #include "APIObject.h"
+#include "IdentifierTypes.h"
 #include "WebPageGroupData.h"
 #include "WebProcessProxy.h"
 #include <WebCore/UserStyleSheetTypes.h>
@@ -43,7 +44,7 @@
     explicit WebPageGroup(const String& identifier = { });
     static Ref<WebPageGroup> create(const String& identifier = { });
 
-    static WebPageGroup* get(uint64_t pageGroupID);
+    static WebPageGroup* get(PageGroupIdentifier);
     static void forEach(Function<void(WebPageGroup&)>&&);
 
     virtual ~WebPageGroup();
@@ -51,7 +52,7 @@
     void addPage(WebPageProxy&);
     void removePage(WebPageProxy&);
 
-    uint64_t pageGroupID() const { return m_data.pageGroupID; }
+    PageGroupIdentifier pageGroupID() const { return m_data.pageGroupID; }
 
     const WebPageGroupData& data() const { return m_data; }
 

Modified: trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.cpp (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -35,14 +35,14 @@
 namespace WebKit {
 using namespace WebCore;
 
-static HashMap<uint64_t, WebDatabaseProvider*>& databaseProviders()
+static HashMap<PageGroupIdentifier, WebDatabaseProvider*>& databaseProviders()
 {
-    static NeverDestroyed<HashMap<uint64_t, WebDatabaseProvider*>> databaseProviders;
+    static NeverDestroyed<HashMap<PageGroupIdentifier, WebDatabaseProvider*>> databaseProviders;
 
     return databaseProviders;
 }
 
-Ref<WebDatabaseProvider> WebDatabaseProvider::getOrCreate(uint64_t identifier)
+Ref<WebDatabaseProvider> WebDatabaseProvider::getOrCreate(PageGroupIdentifier identifier)
 {
     auto& slot = databaseProviders().add(identifier, nullptr).iterator->value;
     if (slot)
@@ -54,7 +54,7 @@
     return databaseProvider;
 }
 
-WebDatabaseProvider::WebDatabaseProvider(uint64_t identifier)
+WebDatabaseProvider::WebDatabaseProvider(PageGroupIdentifier identifier)
     : m_identifier(identifier)
 {
 }

Modified: trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.h (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/Databases/WebDatabaseProvider.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -23,9 +23,9 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebDatabaseProvider_h
-#define WebDatabaseProvider_h
+#pragma once
 
+#include "IdentifierTypes.h"
 #include <WebCore/DatabaseProvider.h>
 #include <wtf/HashMap.h>
 
@@ -33,17 +33,15 @@
 
 class WebDatabaseProvider final : public WebCore::DatabaseProvider {
 public:
-    static Ref<WebDatabaseProvider> getOrCreate(uint64_t identifier);
+    static Ref<WebDatabaseProvider> getOrCreate(PageGroupIdentifier);
     virtual ~WebDatabaseProvider();
 
     WebCore::IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(PAL::SessionID) final;
 
 private:
-    explicit WebDatabaseProvider(uint64_t identifier);
+    explicit WebDatabaseProvider(PageGroupIdentifier);
 
-    const uint64_t m_identifier;
+    const PageGroupIdentifier m_identifier;
 };
 
 }
-
-#endif // WebDatabaseProvider_h

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -99,7 +99,7 @@
     return WebDocumentLoader::create(request, substituteData);
 }
 
-WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, WebCore::RegistrableDomain&& registrableDomain, uint64_t pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, ServiceWorkerInitializationData&& initializationData)
+WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, WebCore::RegistrableDomain&& registrableDomain, PageGroupIdentifier pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, ServiceWorkerInitializationData&& initializationData)
     : m_connectionToNetworkProcess(WTFMove(connection))
     , m_registrableDomain(WTFMove(registrableDomain))
     , m_pageGroupID(pageGroupID)

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -28,6 +28,7 @@
 #if ENABLE(SERVICE_WORKER)
 
 #include "Connection.h"
+#include "IdentifierTypes.h"
 #include "MessageReceiver.h"
 #include "NavigatingToAppBoundDomain.h"
 #include "ShareableResource.h"
@@ -59,7 +60,7 @@
 
 class WebSWContextManagerConnection final : public WebCore::SWContextManager::Connection, public IPC::MessageReceiver {
 public:
-    WebSWContextManagerConnection(Ref<IPC::Connection>&&, WebCore::RegistrableDomain&&, uint64_t pageGroupID, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, ServiceWorkerInitializationData&&);
+    WebSWContextManagerConnection(Ref<IPC::Connection>&&, WebCore::RegistrableDomain&&, PageGroupIdentifier, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, ServiceWorkerInitializationData&&);
     ~WebSWContextManagerConnection();
 
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
@@ -105,7 +106,7 @@
 
     Ref<IPC::Connection> m_connectionToNetworkProcess;
     WebCore::RegistrableDomain m_registrableDomain;
-    uint64_t m_pageGroupID;
+    PageGroupIdentifier m_pageGroupID;
     WebPageProxyIdentifier m_webPageProxyID;
     WebCore::PageIdentifier m_pageID;
 

Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPageGroupProxy.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -44,8 +44,9 @@
     virtual ~WebPageGroupProxy();
 
     const String& identifier() const { return m_data.identifier; }
-    uint64_t pageGroupID() const { return m_data.pageGroupID; }
-    StorageNamespaceIdentifier localStorageNamespaceIdentifier() const { return makeObjectIdentifier<StorageNamespaceIdentifierType>(pageGroupID()); }
+    PageGroupIdentifier pageGroupID() const { return m_data.pageGroupID; }
+    // Namespace IDs for local storage namespaces are currently equivalent to web page group IDs.
+    StorageNamespaceIdentifier localStorageNamespaceIdentifier() const { return makeObjectIdentifier<StorageNamespaceIdentifierType>(pageGroupID().toUInt64()); }
     WebCore::PageGroup* corePageGroup() const { return m_pageGroup; }
 
 private:

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -924,7 +924,7 @@
     return 0;
 }
 
-WebPageGroupProxy* WebProcess::webPageGroup(uint64_t pageGroupID)
+WebPageGroupProxy* WebProcess::webPageGroup(PageGroupIdentifier pageGroupID)
 {
     return m_pageGroupMap.get(pageGroupID);
 }
@@ -1888,7 +1888,7 @@
 }
 
 #if ENABLE(SERVICE_WORKER)
-void WebProcess::establishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, RegistrableDomain&& registrableDomain, ServiceWorkerInitializationData&& initializationData, CompletionHandler<void()>&& completionHandler)
+void WebProcess::establishWorkerContextConnectionToNetworkProcess(PageGroupIdentifier pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, RegistrableDomain&& registrableDomain, ServiceWorkerInitializationData&& initializationData, CompletionHandler<void()>&& completionHandler)
 {
     // We are in the Service Worker context process and the call below establishes our connection to the Network Process
     // by calling ensureNetworkProcessConnection. SWContextManager needs to use the same underlying IPC::Connection as the

Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebProcess.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -28,6 +28,7 @@
 #include "AccessibilityPreferences.h"
 #include "AuxiliaryProcess.h"
 #include "CacheModel.h"
+#include "IdentifierTypes.h"
 #include "PluginProcessConnectionManager.h"
 #include "SandboxExtension.h"
 #include "StorageAreaIdentifier.h"
@@ -224,7 +225,7 @@
     void removeWebFrame(WebCore::FrameIdentifier);
 
     WebPageGroupProxy* webPageGroup(WebCore::PageGroup*);
-    WebPageGroupProxy* webPageGroup(uint64_t pageGroupID);
+    WebPageGroupProxy* webPageGroup(PageGroupIdentifier);
     WebPageGroupProxy* webPageGroup(const WebPageGroupData&);
 
     uint64_t userGestureTokenIdentifier(RefPtr<WebCore::UserGestureToken>);
@@ -466,7 +467,7 @@
 #endif
 
 #if ENABLE(SERVICE_WORKER)
-    void establishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, WebCore::RegistrableDomain&&, ServiceWorkerInitializationData&&, CompletionHandler<void()>&&);
+    void establishWorkerContextConnectionToNetworkProcess(PageGroupIdentifier, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, WebCore::RegistrableDomain&&, ServiceWorkerInitializationData&&, CompletionHandler<void()>&&);
 #endif
 
     void fetchWebsiteData(OptionSet<WebsiteDataType>, CompletionHandler<void(WebsiteData&&)>&&);
@@ -607,7 +608,7 @@
     RefPtr<WebConnectionToUIProcess> m_webConnection;
 
     HashMap<WebCore::PageIdentifier, RefPtr<WebPage>> m_pageMap;
-    HashMap<uint64_t, RefPtr<WebPageGroupProxy>> m_pageGroupMap;
+    HashMap<PageGroupIdentifier, RefPtr<WebPageGroupProxy>> m_pageGroupMap;
     RefPtr<InjectedBundle> m_injectedBundle;
 
     Ref<EventDispatcher> m_eventDispatcher;

Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2021-08-22 15:35:52 UTC (rev 281398)
@@ -101,7 +101,7 @@
 #endif
 
 #if ENABLE(SERVICE_WORKER)
-    EstablishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier pageID, struct WebKit::WebPreferencesStore store, WebCore::RegistrableDomain domain, struct WebKit::ServiceWorkerInitializationData initializationData) -> () Async
+    EstablishWorkerContextConnectionToNetworkProcess(WebKit::PageGroupIdentifier pageGroupID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier pageID, struct WebKit::WebPreferencesStore store, WebCore::RegistrableDomain domain, struct WebKit::ServiceWorkerInitializationData initializationData) -> () Async
 #endif
 
     SetHasSuspendedPageProxy(bool hasSuspendedPageProxy);

Modified: trunk/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -335,7 +335,7 @@
 
     Vector<RefPtr<Frame>> frames;
 
-    // Namespace IDs for local storage namespaces are equivalent to web page group IDs.
+    // Namespace IDs for local storage namespaces are currently equivalent to web page group IDs.
     auto& pageGroup = *WebProcess::singleton().webPageGroup(m_namespace.pageGroupID())->corePageGroup();
     for (auto& page : pageGroup.pages())
         frames.appendVector(framesForEventDispatching(page, m_securityOrigin, StorageType::Local, storageAreaImplID));

Modified: trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp	2021-08-22 15:35:52 UTC (rev 281398)
@@ -130,10 +130,10 @@
     return *m_sessionPageID;
 }
 
-uint64_t StorageNamespaceImpl::pageGroupID() const
+PageGroupIdentifier StorageNamespaceImpl::pageGroupID() const
 {
     ASSERT(m_storageType == StorageType::Local || m_storageType == StorageType::TransientLocal);
-    return m_storageNamespaceID.toUInt64();
+    return makeObjectIdentifier<PageGroupIdentifierType>(m_storageNamespaceID.toUInt64());
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h (281397 => 281398)


--- trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h	2021-08-22 07:35:07 UTC (rev 281397)
+++ trunk/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h	2021-08-22 15:35:52 UTC (rev 281398)
@@ -25,6 +25,7 @@
 
 #pragma once
 
+#include "IdentifierTypes.h"
 #include "StorageNamespaceIdentifier.h"
 #include <WebCore/PageIdentifier.h>
 #include <WebCore/SecurityOriginData.h>
@@ -52,8 +53,9 @@
 
     WebCore::StorageType storageType() const { return m_storageType; }
     Identifier storageNamespaceID() const { return m_storageNamespaceID; }
+    // Namespace IDs for local storage namespaces are currently equivalent to web page group IDs.
     WebCore::PageIdentifier sessionStoragePageID() const;
-    uint64_t pageGroupID() const;
+    PageGroupIdentifier pageGroupID() const;
     WebCore::SecurityOrigin* topLevelOrigin() const { return m_topLevelOrigin.get(); }
     unsigned quotaInBytes() const { return m_quotaInBytes; }
     PAL::SessionID sessionID() const override;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to