WebKit Bugzilla
Attachment 370590 Details for
Bug 198206
: Use a strongly-typed identifier for pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP Patch
198206_PageIdentifier_wip.patch (text/plain), 600.76 KB, created by
Chris Dumez
on 2019-05-24 14:20:41 PDT
(
hide
)
Description:
WIP Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2019-05-24 14:20:41 PDT
Size:
600.76 KB
patch
obsolete
>diff --git a/Source/WTF/wtf/ObjectIdentifier.h b/Source/WTF/wtf/ObjectIdentifier.h >index 40897b59d07..b3bcadd9dd1 100644 >--- a/Source/WTF/wtf/ObjectIdentifier.h >+++ b/Source/WTF/wtf/ObjectIdentifier.h >@@ -29,6 +29,7 @@ > #include <mutex> > #include <wtf/HashTraits.h> > #include <wtf/NeverDestroyed.h> >+#include <wtf/text/TextStream.h> > #include <wtf/text/WTFString.h> > > namespace WTF { >@@ -122,6 +123,13 @@ template<typename T> struct DefaultHash<ObjectIdentifier<T>> { > typedef ObjectIdentifierHash<T> Hash; > }; > >+template<typename T> >+TextStream& operator<<(TextStream& ts, const ObjectIdentifier<T>& identifier) >+{ >+ ts << identifier.toUInt64(); >+ return ts; >+} >+ > } // namespace WTF > > using WTF::ObjectIdentifier; >diff --git a/Source/WebCore/Headers.cmake b/Source/WebCore/Headers.cmake >index c2c7c2249e3..4482d5d4750 100644 >--- a/Source/WebCore/Headers.cmake >+++ b/Source/WebCore/Headers.cmake >@@ -779,6 +779,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS > page/PageConfiguration.h > page/PageConsoleClient.h > page/PageGroup.h >+ page/PageIdentifier.h > page/PageOverlay.h > page/PageOverlayController.h > page/PerformanceLogging.h >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index e6a1f5f1d71..b6a8f89ab89 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1217,6 +1217,7 @@ > 4682D2001F79783000C863DB /* StoredCredentialsPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 4682D1FF1F79782300C863DB /* StoredCredentialsPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 468344E01EDDFAAA00B7795B /* DOMRectList.h in Headers */ = {isa = PBXBuildFile; fileRef = 468344DE1EDDFA5F00B7795B /* DOMRectList.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 46B650DD2296262700FD8AA4 /* PageIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B650DB2296262700FD8AA4 /* PageIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46B95195207D633400A7D2DD /* AbstractDOMWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B9518A207D632800A7D2DD /* AbstractDOMWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46B95196207D633A00A7D2DD /* AbstractFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B9518F207D632B00A7D2DD /* AbstractFrame.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 46B95197207D634000A7D2DD /* GlobalWindowIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 46B95190207D632C00A7D2DD /* GlobalWindowIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -7599,6 +7600,7 @@ > 468344DD1EDDFA5F00B7795B /* DOMRectList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMRectList.cpp; sourceTree = "<group>"; }; > 468344DE1EDDFA5F00B7795B /* DOMRectList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMRectList.h; sourceTree = "<group>"; }; > 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEventTargetCustom.h; sourceTree = "<group>"; }; >+ 46B650DB2296262700FD8AA4 /* PageIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageIdentifier.h; sourceTree = "<group>"; }; > 46B9518A207D632800A7D2DD /* AbstractDOMWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AbstractDOMWindow.h; sourceTree = "<group>"; }; > 46B9518C207D632900A7D2DD /* RemoteFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteFrame.cpp; sourceTree = "<group>"; }; > 46B9518D207D632A00A7D2DD /* RemoteDOMWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteDOMWindow.cpp; sourceTree = "<group>"; }; >@@ -20197,6 +20199,7 @@ > 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */, > 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */, > 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */, >+ 46B650DB2296262700FD8AA4 /* PageIdentifier.h */, > 2D5C9CFB19C7B52E00B3C5C1 /* PageOverlay.cpp */, > 2D5C9CFC19C7B52E00B3C5C1 /* PageOverlay.h */, > 2D5C9CFD19C7B52E00B3C5C1 /* PageOverlayController.cpp */, >@@ -29871,6 +29874,7 @@ > BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */, > 1A85B1EB0A1B240500D8C87C /* JSHTMLOListElement.h in Headers */, > A80E7E9B0A1A83E3007FB8C5 /* JSHTMLOptGroupElement.h in Headers */, >+ 46B650DD2296262700FD8AA4 /* PageIdentifier.h in Headers */, > A80E7E990A1A83E3007FB8C5 /* JSHTMLOptionElement.h in Headers */, > 448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */, > 4AD0173D127E82860015035F /* JSHTMLOutputElement.h in Headers */, >diff --git a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp b/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp >index 76912caeb8a..0e7d54205c8 100644 >--- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp >+++ b/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp >@@ -67,7 +67,7 @@ Ref<AXIsolatedTree> AXIsolatedTree::create() > return adoptRef(*new AXIsolatedTree()); > } > >-Ref<AXIsolatedTree> AXIsolatedTree::initializePageTreeForID(uint64_t pageID, AXObjectCache& cache) >+Ref<AXIsolatedTree> AXIsolatedTree::initializePageTreeForID(PageIdentifier pageID, AXObjectCache& cache) > { > RELEASE_ASSERT(isMainThread()); > auto tree = cache->generateIsolatedAccessibilityTree(); >@@ -87,7 +87,7 @@ RefPtr<AXIsolatedTree> AXIsolatedTree::treeForID(AXIsolatedTreeID treeID) > return treeIDCache().get(treeID); > } > >-Ref<AXIsolatedTree> AXIsolatedTree::createTreeForPageID(uint64_t pageID) >+Ref<AXIsolatedTree> AXIsolatedTree::createTreeForPageID(PageIdentifier pageID) > { > LockHolder locker(s_cacheLock); > >@@ -97,7 +97,7 @@ Ref<AXIsolatedTree> AXIsolatedTree::createTreeForPageID(uint64_t pageID) > return newTree; > } > >-RefPtr<AXIsolatedTree> AXIsolatedTree::treeForPageID(uint64_t pageID) >+RefPtr<AXIsolatedTree> AXIsolatedTree::treeForPageID(PageIdentifier pageID) > { > LockHolder locker(s_cacheLock); > >diff --git a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h b/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h >index c075d5b0167..6eec2645198 100644 >--- a/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h >+++ b/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h >@@ -28,6 +28,7 @@ > #if ENABLE(ACCESSIBILITY_ISOLATED_TREE) > > #include "AXIsolatedTreeNode.h" >+#include "PageIdentifier.h" > #include <wtf/HashMap.h> > #include <wtf/RefPtr.h> > #include <wtf/ThreadSafeRefCounted.h> >@@ -43,9 +44,9 @@ public: > static Ref<AXIsolatedTree> create(); > virtual ~AXIsolatedTree(); > >- static Ref<AXIsolatedTree> createTreeForPageID(uint64_t pageID); >- WEBCORE_EXPORT static Ref<AXIsolatedTree> initializePageTreeForID(uint64_t pageID, AXObjectCache&); >- WEBCORE_EXPORT static RefPtr<AXIsolatedTree> treeForPageID(uint64_t pageID); >+ static Ref<AXIsolatedTree> createTreeForPageID(PageIdentifier); >+ WEBCORE_EXPORT static Ref<AXIsolatedTree> initializePageTreeForID(PageIdentifier, AXObjectCache&); >+ WEBCORE_EXPORT static RefPtr<AXIsolatedTree> treeForPageID(PageIdentifier); > WEBCORE_EXPORT static RefPtr<AXIsolatedTree> treeForID(AXIsolatedTreeID); > > WEBCORE_EXPORT RefPtr<AXIsolatedTreeNode> rootNode(); >@@ -70,7 +71,7 @@ private: > AXIsolatedTree(); > > static HashMap<AXIsolatedTreeID, Ref<AXIsolatedTree>>& treeIDCache(); >- static HashMap<uint64_t, Ref<AXIsolatedTree>>& treePageCache(); >+ static HashMap<PageIdentifier, Ref<AXIsolatedTree>>& treePageCache(); > > // Only access on AX thread requesting data. > HashMap<AXID, Ref<AXIsolatedTreeNode>> m_readerThreadNodeMap; >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index e70a9f7fe55..d3541673ea8 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -7766,7 +7766,7 @@ Logger& Document::logger() > return *m_logger; > } > >-Optional<uint64_t> Document::pageID() const >+Optional<PageIdentifier> Document::pageID() const > { > return m_frame->loader().client().pageID(); > } >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index c076556506a..a2481df8a36 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -42,6 +42,7 @@ > #include "MediaProducer.h" > #include "MutationObserver.h" > #include "OrientationNotifier.h" >+#include "PageIdentifier.h" > #include "PlatformEvent.h" > #include "ReferrerPolicy.h" > #include "Region.h" >@@ -635,7 +636,7 @@ public: > WEBCORE_EXPORT AXObjectCache* axObjectCache() const; > void clearAXObjectCache(); > >- Optional<uint64_t> pageID() const; >+ Optional<PageIdentifier> pageID() const; > // to get visually ordered hebrew and arabic pages right > void setVisuallyOrdered(); > bool visuallyOrdered() const { return m_visuallyOrdered; } >diff --git a/Source/WebCore/loader/CookieJar.cpp b/Source/WebCore/loader/CookieJar.cpp >index b1bed8f032f..33e27863836 100644 >--- a/Source/WebCore/loader/CookieJar.cpp >+++ b/Source/WebCore/loader/CookieJar.cpp >@@ -72,7 +72,7 @@ String CookieJar::cookies(Document& document, const URL& url) const > auto includeSecureCookies = shouldIncludeSecureCookies(document, url); > > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >@@ -110,7 +110,7 @@ CookieRequestHeaderFieldProxy CookieJar::cookieRequestHeaderFieldProxy(const Doc > void CookieJar::setCookies(Document& document, const URL& url, const String& cookieString) > { > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >@@ -131,7 +131,7 @@ bool CookieJar::cookiesEnabled(const Document&) const > return false; > } > >-std::pair<String, SecureCookiesAccessed> CookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, SecureCookiesAccessed> CookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > if (auto* session = m_storageSessionProvider->storageSession()) { > std::pair<String, bool> result = session->cookieRequestHeaderFieldValue(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); >@@ -145,7 +145,7 @@ std::pair<String, SecureCookiesAccessed> CookieJar::cookieRequestHeaderFieldValu > String CookieJar::cookieRequestHeaderFieldValue(Document& document, const URL& url) const > { > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >@@ -160,7 +160,7 @@ String CookieJar::cookieRequestHeaderFieldValue(Document& document, const URL& u > bool CookieJar::getRawCookies(const Document& document, const URL& url, Vector<Cookie>& cookies) const > { > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >diff --git a/Source/WebCore/loader/CookieJar.h b/Source/WebCore/loader/CookieJar.h >index 0db07c6d12e..281f84c4900 100644 >--- a/Source/WebCore/loader/CookieJar.h >+++ b/Source/WebCore/loader/CookieJar.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "PageIdentifier.h" > #include <wtf/Forward.h> > #include <wtf/text/WTFString.h> > >@@ -58,7 +59,7 @@ public: > virtual void setCookies(Document&, const URL&, const String& cookieString); > > virtual bool cookiesEnabled(const Document&) const; >- virtual std::pair<String, SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies) const; >+ virtual std::pair<String, SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const; > virtual bool getRawCookies(const Document&, const URL&, Vector<Cookie>&) const; > virtual void deleteCookie(const Document&, const URL&, const String& cookieName); > >diff --git a/Source/WebCore/loader/EmptyFrameLoaderClient.h b/Source/WebCore/loader/EmptyFrameLoaderClient.h >index 4f0bb86ddd5..1f7a29c4b30 100644 >--- a/Source/WebCore/loader/EmptyFrameLoaderClient.h >+++ b/Source/WebCore/loader/EmptyFrameLoaderClient.h >@@ -33,7 +33,7 @@ class WEBCORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient { > void frameLoaderDestroyed() override { } > > Optional<uint64_t> frameID() const override { return WTF::nullopt; } >- Optional<uint64_t> pageID() const override { return WTF::nullopt; } >+ Optional<PageIdentifier> pageID() const override { return WTF::nullopt; } > PAL::SessionID sessionID() const override; > > bool hasWebView() const final { return true; } // mainly for assertions >diff --git a/Source/WebCore/loader/FrameLoaderClient.h b/Source/WebCore/loader/FrameLoaderClient.h >index ec39127a1ad..074876118dc 100644 >--- a/Source/WebCore/loader/FrameLoaderClient.h >+++ b/Source/WebCore/loader/FrameLoaderClient.h >@@ -32,6 +32,7 @@ > #include "FrameLoaderTypes.h" > #include "LayoutMilestone.h" > #include "LinkIcon.h" >+#include "PageIdentifier.h" > #include <functional> > #include <wtf/Forward.h> > #include <wtf/WallTime.h> >@@ -126,7 +127,7 @@ public: > > virtual void makeRepresentation(DocumentLoader*) = 0; > >- virtual Optional<uint64_t> pageID() const = 0; >+ virtual Optional<PageIdentifier> pageID() const = 0; > virtual Optional<uint64_t> frameID() const = 0; > virtual PAL::SessionID sessionID() const = 0; > >diff --git a/Source/WebCore/loader/LoaderStrategy.h b/Source/WebCore/loader/LoaderStrategy.h >index 8a82381f018..45feb635f70 100644 >--- a/Source/WebCore/loader/LoaderStrategy.h >+++ b/Source/WebCore/loader/LoaderStrategy.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "FetchOptions.h" >+#include "PageIdentifier.h" > #include "ResourceLoadPriority.h" > #include "ResourceLoaderOptions.h" > #include "StoredCredentialsPolicy.h" >@@ -57,7 +58,7 @@ class WEBCORE_EXPORT LoaderStrategy { > public: > virtual void loadResource(Frame&, CachedResource&, ResourceRequest&&, const ResourceLoaderOptions&, CompletionHandler<void(RefPtr<SubresourceLoader>&&)>&&) = 0; > virtual void loadResourceSynchronously(FrameLoader&, unsigned long identifier, const ResourceRequest&, ClientCredentialPolicy, const FetchOptions&, const HTTPHeaderMap&, ResourceError&, ResourceResponse&, Vector<char>& data) = 0; >- virtual void pageLoadCompleted(uint64_t webPageID) = 0; >+ virtual void pageLoadCompleted(PageIdentifier) = 0; > > virtual void remove(ResourceLoader*) = 0; > virtual void setDefersLoading(ResourceLoader&, bool) = 0; >diff --git a/Source/WebCore/loader/NavigationAction.cpp b/Source/WebCore/loader/NavigationAction.cpp >index 7745001e78a..f26a9aaf2fd 100644 >--- a/Source/WebCore/loader/NavigationAction.cpp >+++ b/Source/WebCore/loader/NavigationAction.cpp >@@ -41,7 +41,7 @@ namespace WebCore { > NavigationAction::Requester::Requester(const Document& document) > : m_url { URL { document.url() } } > , m_origin { makeRefPtr(document.securityOrigin()) } >- , m_pageIDAndFrameIDPair { document.frame() ? std::make_pair(document.frame()->loader().client().pageID().valueOr(0), document.frame()->loader().client().frameID().valueOr(0)) : std::make_pair<uint64_t, uint64_t>(0, 0) } >+ , m_pageIDAndFrameIDPair { document.frame() ? std::make_pair(document.frame()->loader().client().pageID().valueOr(PageIdentifier { }), document.frame()->loader().client().frameID().valueOr(0)) : std::make_pair<PageIdentifier, uint64_t>({ }, 0) } > { > } > >diff --git a/Source/WebCore/loader/NavigationAction.h b/Source/WebCore/loader/NavigationAction.h >index 1a44f91d368..ed7d09cf289 100644 >--- a/Source/WebCore/loader/NavigationAction.h >+++ b/Source/WebCore/loader/NavigationAction.h >@@ -32,6 +32,7 @@ > #include "BackForwardItemIdentifier.h" > #include "FrameLoaderTypes.h" > #include "LayoutPoint.h" >+#include "PageIdentifier.h" > #include "ResourceRequest.h" > #include "SecurityOrigin.h" > #include "UserGestureIndicator.h" >@@ -63,14 +64,14 @@ public: > NavigationAction(NavigationAction&&); > NavigationAction& operator=(NavigationAction&&); > >- using PageIDAndFrameIDPair = std::pair<uint64_t /* pageID */, uint64_t /* frameID */>; >+ using PageIDAndFrameIDPair = std::pair<PageIdentifier, uint64_t /* frameID */>; > class Requester { > public: > Requester(const Document&); > > const URL& url() const { return m_url; } > const SecurityOrigin& securityOrigin() const { return *m_origin; } >- uint64_t pageID() const { return m_pageIDAndFrameIDPair.first; } >+ PageIdentifier pageID() const { return m_pageIDAndFrameIDPair.first; } > uint64_t frameID() const { return m_pageIDAndFrameIDPair.second; } > private: > URL m_url; >diff --git a/Source/WebCore/loader/ResourceLoadObserver.cpp b/Source/WebCore/loader/ResourceLoadObserver.cpp >index 14bc2f3beef..ffada1c45be 100644 >--- a/Source/WebCore/loader/ResourceLoadObserver.cpp >+++ b/Source/WebCore/loader/ResourceLoadObserver.cpp >@@ -60,7 +60,7 @@ void ResourceLoadObserver::setStatisticsUpdatedCallback(WTF::Function<void(Vecto > m_notificationCallback = WTFMove(notificationCallback); > } > >-void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain)>&& callback) >+void ResourceLoadObserver::setRequestStorageAccessUnderOpenerCallback(WTF::Function<void(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, PageIdentifier openerPageID, const RegistrableDomain& openerDomain)>&& callback) > { > ASSERT(!m_requestStorageAccessUnderOpenerCallback); > m_requestStorageAccessUnderOpenerCallback = WTFMove(callback); >@@ -234,7 +234,7 @@ void ResourceLoadObserver::logUserInteractionWithReducedTimeResolution(const Doc > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >-void ResourceLoadObserver::requestStorageAccessUnderOpener(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument) >+void ResourceLoadObserver::requestStorageAccessUnderOpener(PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, PageIdentifier openerPageID, Document& openerDocument) > { > auto openerUrl = openerDocument.url(); > RegistrableDomain openerDomain { openerUrl }; >diff --git a/Source/WebCore/loader/ResourceLoadObserver.h b/Source/WebCore/loader/ResourceLoadObserver.h >index c4661b04760..de1c94a72cd 100644 >--- a/Source/WebCore/loader/ResourceLoadObserver.h >+++ b/Source/WebCore/loader/ResourceLoadObserver.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "CanvasActivityRecord.h" >+#include "PageIdentifier.h" > #include "ResourceLoadStatistics.h" > #include "Timer.h" > #include <wtf/HashMap.h> >@@ -73,7 +74,7 @@ public: > WEBCORE_EXPORT String statisticsForURL(const URL&); > > WEBCORE_EXPORT void setStatisticsUpdatedCallback(WTF::Function<void(Vector<ResourceLoadStatistics>&&)>&&); >- WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(PAL::SessionID, const RegistrableDomain&, uint64_t, const RegistrableDomain&)>&&); >+ WEBCORE_EXPORT void setRequestStorageAccessUnderOpenerCallback(Function<void(PAL::SessionID, const RegistrableDomain&, PageIdentifier, const RegistrableDomain&)>&&); > WEBCORE_EXPORT void setLogUserInteractionNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&)>&&); > WEBCORE_EXPORT void setLogWebSocketLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&); > WEBCORE_EXPORT void setLogSubresourceLoadingNotificationCallback(Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)>&&); >@@ -94,13 +95,13 @@ private: > Vector<ResourceLoadStatistics> takeStatistics(); > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >- void requestStorageAccessUnderOpener(PAL::SessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, Document& openerDocument); >+ void requestStorageAccessUnderOpener(PAL::SessionID, const RegistrableDomain& domainInNeedOfStorageAccess, PageIdentifier openerPageID, Document& openerDocument); > #endif > > HashMap<RegistrableDomain, ResourceLoadStatistics> m_resourceStatisticsMap; > HashMap<RegistrableDomain, WTF::WallTime> m_lastReportedUserInteractionMap; > Function<void(Vector<ResourceLoadStatistics>&&)> m_notificationCallback; >- Function<void(PAL::SessionID, const RegistrableDomain&, uint64_t, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback; >+ Function<void(PAL::SessionID, const RegistrableDomain&, PageIdentifier, const RegistrableDomain&)> m_requestStorageAccessUnderOpenerCallback; > Function<void(PAL::SessionID, const RegistrableDomain&)> m_logUserInteractionNotificationCallback; > Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logWebSocketLoadingNotificationCallback; > Function<void(PAL::SessionID, const RegistrableDomain&, const RegistrableDomain&, WallTime)> m_logSubresourceLoadingNotificationCallback; >diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h >index f35390c8c3a..52b2e94b7ee 100644 >--- a/Source/WebCore/page/ChromeClient.h >+++ b/Source/WebCore/page/ChromeClient.h >@@ -486,8 +486,8 @@ public: > virtual RefPtr<Icon> createIconForFiles(const Vector<String>& /* filenames */) = 0; > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >- virtual void hasStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, uint64_t /*frameID*/, uint64_t /*pageID*/, WTF::CompletionHandler<void(bool)>&& completionHandler) { completionHandler(false); } >- virtual void requestStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, uint64_t /*frameID*/, uint64_t /*pageID*/, WTF::CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) { completionHandler(StorageAccessWasGranted::No, StorageAccessPromptWasShown::No); } >+ virtual void hasStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, uint64_t /*frameID*/, PageIdentifier, WTF::CompletionHandler<void(bool)>&& completionHandler) { completionHandler(false); } >+ virtual void requestStorageAccess(RegistrableDomain&& /*subFrameDomain*/, RegistrableDomain&& /*topFrameDomain*/, uint64_t /*frameID*/, PageIdentifier, WTF::CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) { completionHandler(StorageAccessWasGranted::No, StorageAccessPromptWasShown::No); } > #endif > > #if ENABLE(DEVICE_ORIENTATION) >diff --git a/Source/WebCore/page/GlobalFrameIdentifier.h b/Source/WebCore/page/GlobalFrameIdentifier.h >index 156c9cd205d..0d7b3dbf72f 100644 >--- a/Source/WebCore/page/GlobalFrameIdentifier.h >+++ b/Source/WebCore/page/GlobalFrameIdentifier.h >@@ -25,13 +25,14 @@ > > #pragma once > >+#include "PageIdentifier.h" > #include <wtf/Optional.h> > > namespace WebCore { > > // Frame identifier that is unique across all WebContent processes. > struct GlobalFrameIdentifier { >- uint64_t pageID; >+ PageIdentifier pageID; > uint64_t frameID; > > template<class Encoder> void encode(Encoder&) const; >@@ -47,7 +48,7 @@ void GlobalFrameIdentifier::encode(Encoder& encoder) const > template<class Decoder> > Optional<GlobalFrameIdentifier> GlobalFrameIdentifier::decode(Decoder& decoder) > { >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > decoder >> pageID; > if (!pageID) > return WTF::nullopt; >diff --git a/Source/WebCore/page/PageIdentifier.h b/Source/WebCore/page/PageIdentifier.h >new file mode 100644 >index 00000000000..44d5f8d2975 >--- /dev/null >+++ b/Source/WebCore/page/PageIdentifier.h >@@ -0,0 +1,35 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <wtf/ObjectIdentifier.h> >+ >+namespace WebCore { >+ >+enum PageIdentifierType { }; >+using PageIdentifier = ObjectIdentifier<PageIdentifierType>; >+ >+} >diff --git a/Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h b/Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h >index 1159050cd32..b3d6e38bcaf 100644 >--- a/Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h >+++ b/Source/WebCore/platform/network/CookieRequestHeaderFieldProxy.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "CookieJar.h" >+#include "PageIdentifier.h" > #include "SameSiteInfo.h" > #include <pal/SessionID.h> > #include <wtf/URL.h> >@@ -38,7 +39,7 @@ struct CookieRequestHeaderFieldProxy { > SameSiteInfo sameSiteInfo; > URL url; > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > IncludeSecureCookies includeSecureCookies { IncludeSecureCookies::No }; > > template<class Encoder> void encode(Encoder&) const; >@@ -71,8 +72,11 @@ Optional<CookieRequestHeaderFieldProxy> CookieRequestHeaderFieldProxy::decode(De > return WTF::nullopt; > if (!decoder.decode(result.frameID)) > return WTF::nullopt; >- if (!decoder.decode(result.pageID)) >+ Optional<PageIdentifier> pageID; >+ decoder >> pageID; >+ if (!pageID) > return WTF::nullopt; >+ result.pageID = *pageID; > if (!decoder.decode(result.includeSecureCookies)) > return WTF::nullopt; > return result; >diff --git a/Source/WebCore/platform/network/NetworkStorageSession.cpp b/Source/WebCore/platform/network/NetworkStorageSession.cpp >index 3b18e62fe39..63df0588dc9 100644 >--- a/Source/WebCore/platform/network/NetworkStorageSession.cpp >+++ b/Source/WebCore/platform/network/NetworkStorageSession.cpp >@@ -66,12 +66,12 @@ bool NetworkStorageSession::shouldBlockThirdPartyCookies(const RegistrableDomain > return m_registrableDomainsToBlockCookieFor.contains(registrableDomain); > } > >-bool NetworkStorageSession::shouldBlockCookies(const ResourceRequest& request, Optional<uint64_t> frameID, Optional<uint64_t> pageID) const >+bool NetworkStorageSession::shouldBlockCookies(const ResourceRequest& request, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID) const > { > return shouldBlockCookies(request.firstPartyForCookies(), request.url(), frameID, pageID); > } > >-bool NetworkStorageSession::shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional<uint64_t> frameID, Optional<uint64_t> pageID) const >+bool NetworkStorageSession::shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID) const > { > RegistrableDomain firstPartyDomain { firstPartyForCookies }; > if (firstPartyDomain.isEmpty()) >@@ -115,7 +115,7 @@ void NetworkStorageSession::removePrevalentDomains(const Vector<RegistrableDomai > m_registrableDomainsToBlockCookieFor.remove(domain); > } > >-bool NetworkStorageSession::hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, uint64_t pageID) const >+bool NetworkStorageSession::hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, PageIdentifier pageID) const > { > if (frameID) { > auto framesGrantedIterator = m_framesGrantedStorageAccess.find(pageID); >@@ -148,7 +148,7 @@ Vector<String> NetworkStorageSession::getAllStorageAccessEntries() const > return entries; > } > >-void NetworkStorageSession::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, uint64_t pageID) >+void NetworkStorageSession::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, PageIdentifier pageID) > { > if (!frameID) { > if (firstPartyDomain.isEmpty()) >@@ -182,7 +182,7 @@ void NetworkStorageSession::grantStorageAccess(const RegistrableDomain& resource > } > } > >-void NetworkStorageSession::removeStorageAccessForFrame(uint64_t frameID, uint64_t pageID) >+void NetworkStorageSession::removeStorageAccessForFrame(uint64_t frameID, PageIdentifier pageID) > { > auto iteration = m_framesGrantedStorageAccess.find(pageID); > if (iteration == m_framesGrantedStorageAccess.end()) >@@ -191,7 +191,7 @@ void NetworkStorageSession::removeStorageAccessForFrame(uint64_t frameID, uint64 > iteration->value.remove(frameID); > } > >-void NetworkStorageSession::clearPageSpecificDataForResourceLoadStatistics(uint64_t pageID) >+void NetworkStorageSession::clearPageSpecificDataForResourceLoadStatistics(PageIdentifier pageID) > { > m_pagesGrantedStorageAccess.remove(pageID); > m_framesGrantedStorageAccess.remove(pageID); >@@ -215,7 +215,7 @@ void NetworkStorageSession::resetCacheMaxAgeCapForPrevalentResources() > m_cacheMaxAgeCapForPrevalentResources = WTF::nullopt; > } > >-void NetworkStorageSession::committedCrossSiteLoadWithLinkDecoration(const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, uint64_t pageID) >+void NetworkStorageSession::committedCrossSiteLoadWithLinkDecoration(const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, PageIdentifier pageID) > { > if (shouldBlockThirdPartyCookies(fromDomain)) > m_navigatedToWithLinkDecorationByPrevalentResource.add(pageID, toDomain); >@@ -227,7 +227,7 @@ void NetworkStorageSession::resetCrossSiteLoadsWithLinkDecorationForTesting() > m_navigationWithLinkDecorationTestMode = true; > } > >-Optional<Seconds> NetworkStorageSession::clientSideCookieCap(const RegistrableDomain& firstParty, Optional<uint64_t> pageID) const >+Optional<Seconds> NetworkStorageSession::clientSideCookieCap(const RegistrableDomain& firstParty, Optional<PageIdentifier> pageID) const > { > if (!m_ageCapForClientSideCookies || !pageID || m_navigatedToWithLinkDecorationByPrevalentResource.isEmpty()) > return m_ageCapForClientSideCookies; >diff --git a/Source/WebCore/platform/network/NetworkStorageSession.h b/Source/WebCore/platform/network/NetworkStorageSession.h >index 030200df9c4..3f39c8acd8b 100644 >--- a/Source/WebCore/platform/network/NetworkStorageSession.h >+++ b/Source/WebCore/platform/network/NetworkStorageSession.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "CredentialStorage.h" >+#include "PageIdentifier.h" > #include "RegistrableDomain.h" > #include <pal/SessionID.h> > #include <wtf/Function.h> >@@ -125,7 +126,7 @@ public: > WEBCORE_EXPORT bool cookiesEnabled() const; > WEBCORE_EXPORT void setCookie(const Cookie&); > WEBCORE_EXPORT void setCookies(const Vector<Cookie>&, const URL&, const URL& mainDocumentURL); >- WEBCORE_EXPORT void setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String&) const; >+ WEBCORE_EXPORT void setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<PageIdentifier>, const String&) const; > WEBCORE_EXPORT void deleteCookie(const Cookie&); > WEBCORE_EXPORT void deleteCookie(const URL&, const String&) const; > WEBCORE_EXPORT void deleteAllCookies(); >@@ -134,29 +135,29 @@ public: > WEBCORE_EXPORT void deleteCookiesForHostnames(const Vector<String>& cookieHostNames, IncludeHttpOnlyCookies); > WEBCORE_EXPORT Vector<Cookie> getAllCookies(); > WEBCORE_EXPORT Vector<Cookie> getCookies(const URL&); >- WEBCORE_EXPORT bool getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<Cookie>&) const; >+ WEBCORE_EXPORT bool getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<PageIdentifier>, Vector<Cookie>&) const; > WEBCORE_EXPORT void flushCookieStore(); > WEBCORE_EXPORT void getHostnamesWithCookies(HashSet<String>& hostnames); >- WEBCORE_EXPORT std::pair<String, bool> cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies) const; >- WEBCORE_EXPORT std::pair<String, bool> cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies) const; >+ WEBCORE_EXPORT std::pair<String, bool> cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const; >+ WEBCORE_EXPORT std::pair<String, bool> cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<PageIdentifier>, IncludeSecureCookies) const; > WEBCORE_EXPORT std::pair<String, bool> cookieRequestHeaderFieldValue(const CookieRequestHeaderFieldProxy&) const; > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >- WEBCORE_EXPORT bool shouldBlockCookies(const ResourceRequest&, Optional<uint64_t> frameID, Optional<uint64_t> pageID) const; >- WEBCORE_EXPORT bool shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional<uint64_t> frameID, Optional<uint64_t> pageID) const; >+ WEBCORE_EXPORT bool shouldBlockCookies(const ResourceRequest&, Optional<uint64_t> frameID, Optional<PageIdentifier>) const; >+ WEBCORE_EXPORT bool shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource, Optional<uint64_t> frameID, Optional<PageIdentifier>) const; > WEBCORE_EXPORT void setPrevalentDomainsToBlockCookiesFor(const Vector<RegistrableDomain>&); > WEBCORE_EXPORT void setAgeCapForClientSideCookies(Optional<Seconds>); > WEBCORE_EXPORT void removePrevalentDomains(const Vector<RegistrableDomain>& domains); >- WEBCORE_EXPORT bool hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, uint64_t pageID) const; >+ WEBCORE_EXPORT bool hasStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, PageIdentifier) const; > WEBCORE_EXPORT Vector<String> getAllStorageAccessEntries() const; >- WEBCORE_EXPORT void grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, uint64_t pageID); >- WEBCORE_EXPORT void removeStorageAccessForFrame(uint64_t frameID, uint64_t pageID); >- WEBCORE_EXPORT void clearPageSpecificDataForResourceLoadStatistics(uint64_t pageID); >+ WEBCORE_EXPORT void grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, PageIdentifier); >+ WEBCORE_EXPORT void removeStorageAccessForFrame(uint64_t frameID, PageIdentifier); >+ WEBCORE_EXPORT void clearPageSpecificDataForResourceLoadStatistics(PageIdentifier); > WEBCORE_EXPORT void removeAllStorageAccess(); > WEBCORE_EXPORT void setCacheMaxAgeCapForPrevalentResources(Seconds); > WEBCORE_EXPORT void resetCacheMaxAgeCapForPrevalentResources(); > WEBCORE_EXPORT Optional<Seconds> maxAgeCacheCap(const ResourceRequest&); >- WEBCORE_EXPORT void committedCrossSiteLoadWithLinkDecoration(const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, uint64_t pageID); >+ WEBCORE_EXPORT void committedCrossSiteLoadWithLinkDecoration(const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, PageIdentifier); > WEBCORE_EXPORT void resetCrossSiteLoadsWithLinkDecorationForTesting(); > #endif > >@@ -182,14 +183,14 @@ private: > > #if ENABLE(RESOURCE_LOAD_STATISTICS) > bool shouldBlockThirdPartyCookies(const RegistrableDomain&) const; >- Optional<Seconds> clientSideCookieCap(const RegistrableDomain& firstParty, Optional<uint64_t> pageID) const; >+ Optional<Seconds> clientSideCookieCap(const RegistrableDomain& firstParty, Optional<PageIdentifier>) const; > HashSet<RegistrableDomain> m_registrableDomainsToBlockCookieFor; >- HashMap<uint64_t, HashMap<uint64_t, RegistrableDomain, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>>, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>> m_framesGrantedStorageAccess; >- HashMap<uint64_t, HashMap<RegistrableDomain, RegistrableDomain>, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>> m_pagesGrantedStorageAccess; >+ HashMap<PageIdentifier, HashMap<uint64_t, RegistrableDomain, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>>> m_framesGrantedStorageAccess; >+ HashMap<PageIdentifier, HashMap<RegistrableDomain, RegistrableDomain>> m_pagesGrantedStorageAccess; > Optional<Seconds> m_cacheMaxAgeCapForPrevalentResources { }; > Optional<Seconds> m_ageCapForClientSideCookies { }; > Optional<Seconds> m_ageCapForClientSideCookiesShort { }; >- HashMap<uint64_t, RegistrableDomain, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>> m_navigatedToWithLinkDecorationByPrevalentResource; >+ HashMap<WebCore::PageIdentifier, RegistrableDomain> m_navigatedToWithLinkDecorationByPrevalentResource; > bool m_navigationWithLinkDecorationTestMode = false; > #endif > >diff --git a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm >index 63740352c4a..557e977b4d7 100644 >--- a/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm >+++ b/Source/WebCore/platform/network/cocoa/NetworkStorageSessionCocoa.mm >@@ -294,7 +294,7 @@ static RetainPtr<NSArray> filterCookies(NSArray *unfilteredCookies, Optional<Sec > return filteredCookies; > } > >-static NSArray *cookiesForURL(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID) >+static NSArray *cookiesForURL(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID) > { > #if ENABLE(RESOURCE_LOAD_STATISTICS) > if (session.shouldBlockCookies(firstParty, url, frameID, pageID)) >@@ -307,7 +307,7 @@ static NSArray *cookiesForURL(const NetworkStorageSession& session, const URL& f > } > > enum IncludeHTTPOnlyOrNot { DoNotIncludeHTTPOnly, IncludeHTTPOnly }; >-static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeHTTPOnlyOrNot includeHTTPOnly, IncludeSecureCookies includeSecureCookies) >+static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeHTTPOnlyOrNot includeHTTPOnly, IncludeSecureCookies includeSecureCookies) > { > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); > >@@ -363,12 +363,12 @@ static void deleteAllHTTPCookies(CFHTTPCookieStorageRef cookieStorage) > CFHTTPCookieStorageDeleteAllCookies(cookieStorage); > } > >-std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > return cookiesForSession(*this, firstParty, sameSiteInfo, url, frameID, pageID, DoNotIncludeHTTPOnly, includeSecureCookies); > } > >-std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > return cookiesForSession(*this, firstParty, sameSiteInfo, url, frameID, pageID, IncludeHTTPOnly, includeSecureCookies); > } >@@ -378,7 +378,7 @@ std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(con > return cookiesForSession(*this, headerFieldProxy.firstParty, headerFieldProxy.sameSiteInfo, headerFieldProxy.url, headerFieldProxy.frameID, headerFieldProxy.pageID, IncludeHTTPOnly, headerFieldProxy.includeSecureCookies); > } > >-void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String& cookieStr) const >+void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, const String& cookieStr) const > { > ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies)); > >@@ -443,7 +443,7 @@ bool NetworkStorageSession::cookiesEnabled() const > return false; > } > >-bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<Cookie>& rawCookies) const >+bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const > { > rawCookies.clear(); > BEGIN_BLOCK_OBJC_EXCEPTIONS; >diff --git a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp b/Source/WebCore/platform/network/curl/CookieJarCurl.cpp >index 2c11568fce5..d60d70a8368 100644 >--- a/Source/WebCore/platform/network/curl/CookieJarCurl.cpp >+++ b/Source/WebCore/platform/network/curl/CookieJarCurl.cpp >@@ -59,7 +59,7 @@ static String cookiesForSession(const NetworkStorageSession& session, const URL& > return cookies.toString(); > } > >-void CookieJarCurl::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String& value) const >+void CookieJarCurl::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, const String& value) const > { > UNUSED_PARAM(frameID); > UNUSED_PARAM(pageID); >@@ -74,7 +74,7 @@ void CookieJarCurl::setCookiesFromHTTPResponse(const NetworkStorageSession& sess > cookieJarDB.setCookie(firstParty, url, value, CookieJarDB::Source::Network); > } > >-std::pair<String, bool> CookieJarCurl::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies) const >+std::pair<String, bool> CookieJarCurl::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies) const > { > UNUSED_PARAM(frameID); > UNUSED_PARAM(pageID); >@@ -83,7 +83,7 @@ std::pair<String, bool> CookieJarCurl::cookiesForDOM(const NetworkStorageSession > return { cookiesForSession(session, firstParty, url, false), false }; > } > >-std::pair<String, bool> CookieJarCurl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies) const >+std::pair<String, bool> CookieJarCurl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies) const > { > UNUSED_PARAM(frameID); > UNUSED_PARAM(pageID); >@@ -113,7 +113,7 @@ bool CookieJarCurl::cookiesEnabled(const NetworkStorageSession& session) const > return session.cookieDatabase().isEnabled(); > } > >-bool CookieJarCurl::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<Cookie>& rawCookies) const >+bool CookieJarCurl::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const > { > UNUSED_PARAM(frameID); > UNUSED_PARAM(pageID); >diff --git a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp >index 894c86afe8f..6872b0ac9b0 100644 >--- a/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp >+++ b/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp >@@ -80,7 +80,7 @@ CookieJarDB& NetworkStorageSession::cookieDatabase() const > return m_cookieDatabase; > } > >-void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String& value) const >+void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, const String& value) const > { > cookieStorage().setCookiesFromDOM(*this, firstParty, sameSiteInfo, url, frameID, pageID, value); > } >@@ -90,7 +90,7 @@ bool NetworkStorageSession::cookiesEnabled() const > return cookieStorage().cookiesEnabled(*this); > } > >-std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > return cookieStorage().cookiesForDOM(*this, firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); > } >@@ -154,7 +154,7 @@ Vector<Cookie> NetworkStorageSession::getCookies(const URL&) > return { }; > } > >-bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<Cookie>& rawCookies) const >+bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const > { > return cookieStorage().getRawCookies(*this, firstParty, sameSiteInfo, url, frameID, pageID, rawCookies); > } >@@ -164,7 +164,7 @@ void NetworkStorageSession::flushCookieStore() > // FIXME: Implement for WebKit to use. > } > >-std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > return cookieStorage().cookieRequestHeaderFieldValue(*this, firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); > } >diff --git a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp >index 1f75877a82b..f6641efeb44 100644 >--- a/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp >+++ b/Source/WebCore/platform/network/soup/NetworkStorageSessionSoup.cpp >@@ -291,7 +291,7 @@ static inline bool httpOnlyCookieExists(const GSList* cookies, const gchar* name > return false; > } > >-void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String& value) const >+void NetworkStorageSession::setCookiesFromDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, const String& value) const > { > UNUSED_PARAM(frameID); > UNUSED_PARAM(pageID); >@@ -444,7 +444,7 @@ Vector<Cookie> NetworkStorageSession::getCookies(const URL& url) > return cookies; > } > >-bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<Cookie>& rawCookies) const >+bool NetworkStorageSession::getRawCookies(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Vector<Cookie>& rawCookies) const > { > UNUSED_PARAM(firstParty); > UNUSED_PARAM(frameID); >@@ -514,7 +514,7 @@ static std::pair<String, bool> cookiesForSession(const NetworkStorageSession& se > return { String::fromUTF8(cookieHeader.get()), didAccessSecureCookies }; > } > >-std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > UNUSED_PARAM(firstParty); > UNUSED_PARAM(frameID); >@@ -522,7 +522,7 @@ std::pair<String, bool> NetworkStorageSession::cookiesForDOM(const URL& firstPar > return cookiesForSession(*this, url, false, includeSecureCookies); > } > >-std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies) const >+std::pair<String, bool> NetworkStorageSession::cookieRequestHeaderFieldValue(const URL& firstParty, const SameSiteInfo&, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies) const > { > UNUSED_PARAM(firstParty); > UNUSED_PARAM(frameID); >diff --git a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp >index 879c0b19e96..b689c3e25ad 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp >+++ b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp >@@ -716,7 +716,7 @@ void ResourceLoadStatisticsDatabaseStore::syncStorageImmediately() > m_database.runVacuumCommand(); > } > >-void ResourceLoadStatisticsDatabaseStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameID> frameID, PageID pageID, CompletionHandler<void(bool)>&& completionHandler) >+void ResourceLoadStatisticsDatabaseStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameID> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >@@ -743,7 +743,7 @@ void ResourceLoadStatisticsDatabaseStore::hasStorageAccess(const SubFrameDomain& > }); > } > >-void ResourceLoadStatisticsDatabaseStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameID frameID, PageID pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler) >+void ResourceLoadStatisticsDatabaseStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameID frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >@@ -795,7 +795,7 @@ void ResourceLoadStatisticsDatabaseStore::requestStorageAccess(SubFrameDomain&& > }); > } > >-void ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&& domainInNeedOfStorageAccess, OpenerPageID openerPageID, OpenerDomain&& openerDomain) >+void ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&& domainInNeedOfStorageAccess, PageIdentifier openerPageID, OpenerDomain&& openerDomain) > { > ASSERT(domainInNeedOfStorageAccess != openerDomain); > ASSERT(!RunLoop::isMain()); >@@ -814,7 +814,7 @@ void ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener(Domain > grantStorageAccessInternal(WTFMove(domainInNeedOfStorageAccess), WTFMove(openerDomain), WTF::nullopt, openerPageID, StorageAccessPromptWasShown::No, [](StorageAccessWasGranted) { }); > } > >-void ResourceLoadStatisticsDatabaseStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, uint64_t frameID, uint64_t pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) >+void ResourceLoadStatisticsDatabaseStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, uint64_t frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >@@ -828,7 +828,7 @@ void ResourceLoadStatisticsDatabaseStore::grantStorageAccess(SubFrameDomain&& su > grantStorageAccessInternal(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, pageID, promptWasShown, WTFMove(completionHandler)); > } > >-void ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameID> frameID, PageID pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) >+void ResourceLoadStatisticsDatabaseStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameID> frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >diff --git a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h >index bab2b7aeab7..bfc23396853 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h >+++ b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h >@@ -64,7 +64,7 @@ public: > void syncStorageIfNeeded() override; > void syncStorageImmediately() override; > >- void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, OpenerPageID, OpenerDomain&&) override; >+ void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, WebCore::PageIdentifier openerID, OpenerDomain&&) override; > > void grandfatherDataForDomains(const HashSet<RegistrableDomain>&) override; > >@@ -91,9 +91,9 @@ public: > > void calculateAndSubmitTelemetry() const override; > >- void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(bool)>&&) override; >- void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, PageID, CompletionHandler<void(StorageAccessStatus)>&&) override; >- void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, PageID, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override; >+ void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override; >+ void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override; >+ void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override; > > void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override; > void logUserInteraction(const TopFrameDomain&) override; >@@ -152,7 +152,7 @@ private: > void setPrevalentResource(const RegistrableDomain&, ResourceLoadPrevalence); > unsigned recursivelyFindNonPrevalentDomainsThatRedirectedToThisDomain(unsigned primaryDomainID, StdSet<unsigned>& nonPrevalentRedirectionSources, unsigned numberOfRecursiveCalls); > void setDomainsAsPrevalent(StdSet<unsigned>&&); >- void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional<FrameID>, PageID, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&); >+ void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional<FrameID>, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&); > void markAsPrevalentIfHasRedirectedToPrevalent(); > Vector<RegistrableDomain> ensurePrevalentResourcesForDebugMode() override; > void removeDataRecords(CompletionHandler<void()>&&); >diff --git a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp >index 0ee7f963894..a5f2624e433 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp >+++ b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp >@@ -200,7 +200,7 @@ void ResourceLoadStatisticsMemoryStore::syncStorageImmediately() > m_persistentStorage->scheduleOrWriteMemoryStore(ResourceLoadStatisticsPersistentStorage::ForceImmediateWrite::Yes); > } > >-void ResourceLoadStatisticsMemoryStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameID> frameID, PageID pageID, CompletionHandler<void(bool)>&& completionHandler) >+void ResourceLoadStatisticsMemoryStore::hasStorageAccess(const SubFrameDomain& subFrameDomain, const TopFrameDomain& topFrameDomain, Optional<FrameID> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >@@ -224,7 +224,7 @@ void ResourceLoadStatisticsMemoryStore::hasStorageAccess(const SubFrameDomain& s > }); > } > >-void ResourceLoadStatisticsMemoryStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameID frameID, uint64_t pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler) >+void ResourceLoadStatisticsMemoryStore::requestStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, FrameID frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessStatus)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >@@ -266,7 +266,7 @@ void ResourceLoadStatisticsMemoryStore::requestStorageAccess(SubFrameDomain&& su > }); > } > >-void ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&& domainInNeedOfStorageAccess, OpenerPageID openerPageID, OpenerDomain&& openerDomain) >+void ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&& domainInNeedOfStorageAccess, PageIdentifier openerPageID, OpenerDomain&& openerDomain) > { > ASSERT(domainInNeedOfStorageAccess != openerDomain); > ASSERT(!RunLoop::isMain()); >@@ -287,7 +287,7 @@ void ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener(DomainIn > grantStorageAccessInternal(WTFMove(domainInNeedOfStorageAccess), WTFMove(openerDomain), WTF::nullopt, openerPageID, StorageAccessPromptWasShown::No, [](StorageAccessWasGranted) { }); > } > >-void ResourceLoadStatisticsMemoryStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, uint64_t frameID, uint64_t pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) >+void ResourceLoadStatisticsMemoryStore::grantStorageAccess(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, uint64_t frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >@@ -299,7 +299,7 @@ void ResourceLoadStatisticsMemoryStore::grantStorageAccess(SubFrameDomain&& subF > grantStorageAccessInternal(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, pageID, promptWasShown, WTFMove(completionHandler)); > } > >-void ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameID> frameID, PageID pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) >+void ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal(SubFrameDomain&& subFrameDomain, TopFrameDomain&& topFrameDomain, Optional<FrameID> frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShownNowOrEarlier, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) > { > ASSERT(!RunLoop::isMain()); > >diff --git a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h >index 44efbf4dec1..45f7e1b7596 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h >+++ b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h >@@ -70,7 +70,7 @@ public: > void syncStorageIfNeeded() override; > void syncStorageImmediately() override; > >- void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, OpenerPageID, OpenerDomain&&) override; >+ void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, WebCore::PageIdentifier, OpenerDomain&&) override; > > void grandfatherDataForDomains(const HashSet<RegistrableDomain>&) override; > >@@ -97,9 +97,9 @@ public: > > void calculateAndSubmitTelemetry() const override; > >- void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(bool)>&&) override; >- void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, PageID, CompletionHandler<void(StorageAccessStatus)>&&) override; >- void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, PageID, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override; >+ void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) override; >+ void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) override; >+ void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) override; > > void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) override; > void logUserInteraction(const TopFrameDomain&) override; >@@ -123,7 +123,7 @@ private: > void incrementRecordsDeletedCountForDomains(HashSet<RegistrableDomain>&&) override; > void setPrevalentResource(ResourceLoadStatistics&, ResourceLoadPrevalence); > unsigned recursivelyGetAllDomainsThatHaveRedirectedToThisDomain(const ResourceLoadStatistics&, HashSet<RedirectedToDomain>&, unsigned numberOfRecursiveCalls) const; >- void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional<FrameID>, PageID, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&); >+ void grantStorageAccessInternal(SubFrameDomain&&, TopFrameDomain&&, Optional<FrameID>, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&); > void markAsPrevalentIfHasRedirectedToPrevalent(ResourceLoadStatistics&); > bool isPrevalentDueToDebugMode(ResourceLoadStatistics&); > Vector<RegistrableDomain> ensurePrevalentResourcesForDebugMode() override; >diff --git a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h >index 0b5775bbb77..d7798b25d1e 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h >+++ b/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.h >@@ -90,8 +90,6 @@ public: > using NavigatedToDomain = WebCore::RegistrableDomain; > using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; > using OpenerDomain = WebCore::RegistrableDomain; >- using OpenerPageID = uint64_t; >- using PageID = uint64_t; > using FrameID = uint64_t; > > virtual ~ResourceLoadStatisticsStore(); >@@ -110,7 +108,7 @@ public: > virtual void syncStorageIfNeeded() = 0; > virtual void syncStorageImmediately() = 0; > >- virtual void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, OpenerPageID, OpenerDomain&&) = 0; >+ virtual void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, WebCore::PageIdentifier openerID, OpenerDomain&&) = 0; > void removeAllStorageAccess(CompletionHandler<void()>&&); > > void grandfatherExistingWebsiteData(CompletionHandler<void()>&&); >@@ -161,9 +159,9 @@ public: > bool isDebugModeEnabled() const { return m_debugModeEnabled; }; > void setPrevalentResourceForDebugMode(const RegistrableDomain&); > >- virtual void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(bool)>&&) = 0; >- virtual void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, PageID, CompletionHandler<void(StorageAccessStatus)>&&) = 0; >- virtual void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, PageID, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) = 0; >+ virtual void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&) = 0; >+ virtual void requestStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessStatus)>&&) = 0; >+ virtual void grantStorageAccess(SubFrameDomain&&, TopFrameDomain&&, FrameID, WebCore::PageIdentifier, WebCore::StorageAccessPromptWasShown, CompletionHandler<void(WebCore::StorageAccessWasGranted)>&&) = 0; > > virtual void logFrameNavigation(const NavigatedToDomain&, const TopFrameDomain&, const NavigatedFromDomain&, bool isRedirect, bool isMainFrame) = 0; > virtual void logUserInteraction(const TopFrameDomain&) = 0; >diff --git a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >index 871b19d2f07..622430cd8e4 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >+++ b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp >@@ -275,7 +275,7 @@ void WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated(Vector<WebCor > }); > } > >-void WebResourceLoadStatisticsStore::hasStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional<uint64_t> frameID, uint64_t pageID, CompletionHandler<void(bool)>&& completionHandler) >+void WebResourceLoadStatisticsStore::hasStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional<uint64_t> frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) > { > ASSERT(subFrameDomain != topFrameDomain); > ASSERT(RunLoop::isMain()); >@@ -298,12 +298,12 @@ void WebResourceLoadStatisticsStore::hasStorageAccess(const RegistrableDomain& s > }); > } > >-bool WebResourceLoadStatisticsStore::hasStorageAccessForFrame(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, uint64_t frameID, uint64_t pageID) >+bool WebResourceLoadStatisticsStore::hasStorageAccessForFrame(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, uint64_t frameID, PageIdentifier pageID) > { > return m_networkSession ? m_networkSession->networkStorageSession().hasStorageAccess(resourceDomain, firstPartyDomain, frameID, pageID) : false; > } > >-void WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool hasAccess)>&& callback) >+void WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, uint64_t frameID, PageIdentifier pageID, CompletionHandler<void(bool hasAccess)>&& callback) > { > ASSERT(RunLoop::isMain()); > >@@ -315,7 +315,7 @@ void WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler(const R > callback(false); > } > >-void WebResourceLoadStatisticsStore::requestStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) >+void WebResourceLoadStatisticsStore::requestStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) > { > if (subFrameDomain == topFrameDomain) { > completionHandler(StorageAccessWasGranted::Yes, StorageAccessPromptWasShown::No); >@@ -362,7 +362,7 @@ void WebResourceLoadStatisticsStore::requestStorageAccess(const RegistrableDomai > }); > } > >-void WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener(RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, RegistrableDomain&& openerDomain) >+void WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener(RegistrableDomain&& domainInNeedOfStorageAccess, PageIdentifier openerPageID, RegistrableDomain&& openerDomain) > { > ASSERT(RunLoop::isMain()); > >@@ -375,7 +375,7 @@ void WebResourceLoadStatisticsStore::requestStorageAccessUnderOpener(Registrable > }); > } > >-void WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) >+void WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, PageIdentifier pageID, StorageAccessPromptWasShown promptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) > { > ASSERT(RunLoop::isMain()); > postTask([this, subFrameDomain = subFrameDomain.isolatedCopy(), topFrameDomain = topFrameDomain.isolatedCopy(), frameID, pageID, promptWasShown, completionHandler = WTFMove(completionHandler)]() mutable { >@@ -396,7 +396,7 @@ void WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& > }); > } > >-StorageAccessWasGranted WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, uint64_t pageID) >+StorageAccessWasGranted WebResourceLoadStatisticsStore::grantStorageAccess(const RegistrableDomain& resourceDomain, const RegistrableDomain& firstPartyDomain, Optional<uint64_t> frameID, PageIdentifier pageID) > { > bool isStorageGranted = false; > >@@ -409,7 +409,7 @@ StorageAccessWasGranted WebResourceLoadStatisticsStore::grantStorageAccess(const > return isStorageGranted ? StorageAccessWasGranted::Yes : StorageAccessWasGranted::No; > } > >-void WebResourceLoadStatisticsStore::callGrantStorageAccessHandler(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional<uint64_t> frameID, uint64_t pageID, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) >+void WebResourceLoadStatisticsStore::callGrantStorageAccessHandler(const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, Optional<uint64_t> frameID, PageIdentifier pageID, CompletionHandler<void(StorageAccessWasGranted)>&& completionHandler) > { > ASSERT(RunLoop::isMain()); > >diff --git a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h >index 8759d60166a..79cf24601c3 100644 >--- a/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h >+++ b/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h >@@ -30,6 +30,7 @@ > #include "Connection.h" > #include "StorageAccessStatus.h" > #include "WebsiteDataType.h" >+#include <WebCore/PageIdentifier.h> > #include <WebCore/RegistrableDomain.h> > #include <wtf/CompletionHandler.h> > #include <wtf/RunLoop.h> >@@ -82,8 +83,6 @@ public: > using NavigatedToDomain = WebCore::RegistrableDomain; > using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; > using OpenerDomain = WebCore::RegistrableDomain; >- using OpenerPageID = uint64_t; >- using PageID = uint64_t; > using FrameID = uint64_t; > using StorageAccessWasGranted = WebCore::StorageAccessWasGranted; > using StorageAccessPromptWasShown = WebCore::StorageAccessPromptWasShown; >@@ -104,7 +103,7 @@ public: > void setShouldClassifyResourcesBeforeDataRecordsRemoval(bool, CompletionHandler<void()>&&); > void setShouldSubmitTelemetry(bool); > >- void grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, FrameID, PageID, StorageAccessPromptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&); >+ void grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier, StorageAccessPromptWasShown, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&); > > void applicationWillTerminate(); > >@@ -118,11 +117,11 @@ public: > void clearUserInteraction(const TopFrameDomain&, CompletionHandler<void()>&&); > void deleteWebsiteDataForRegistrableDomains(OptionSet<WebsiteDataType>, HashMap<RegistrableDomain, WebsiteDataToRemove>&&, bool shouldNotifyPage, CompletionHandler<void(const HashSet<RegistrableDomain>&)>&&); > void registrableDomainsWithWebsiteData(OptionSet<WebsiteDataType>, bool shouldNotifyPage, CompletionHandler<void(HashSet<RegistrableDomain>&&)>&&); >- StorageAccessWasGranted grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID); >+ StorageAccessWasGranted grantStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, WebCore::PageIdentifier); > void hasHadUserInteraction(const RegistrableDomain&, CompletionHandler<void(bool)>&&); >- void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(bool)>&&); >- bool hasStorageAccessForFrame(const SubFrameDomain&, const TopFrameDomain&, FrameID, PageID); >- void requestStorageAccess(const SubFrameDomain&, const TopFrameDomain&, FrameID, PageID, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&); >+ void hasStorageAccess(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&); >+ bool hasStorageAccessForFrame(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier); >+ void requestStorageAccess(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&&); > void setLastSeen(const RegistrableDomain&, Seconds, CompletionHandler<void()>&&); > void setPrevalentResource(const RegistrableDomain&, CompletionHandler<void()>&&); > void setVeryPrevalentResource(const RegistrableDomain&, CompletionHandler<void()>&&); >@@ -166,11 +165,11 @@ public: > void setPrevalentResourceForDebugMode(const RegistrableDomain&, CompletionHandler<void()>&&); > > void logTestingEvent(const String&); >- void callGrantStorageAccessHandler(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, PageID, CompletionHandler<void(StorageAccessWasGranted)>&&); >+ void callGrantStorageAccessHandler(const SubFrameDomain&, const TopFrameDomain&, Optional<FrameID>, WebCore::PageIdentifier, CompletionHandler<void(StorageAccessWasGranted)>&&); > void removeAllStorageAccess(CompletionHandler<void()>&&); > void callUpdatePrevalentDomainsToBlockCookiesForHandler(const Vector<RegistrableDomain>&, CompletionHandler<void()>&&); > void callRemoveDomainsHandler(const Vector<RegistrableDomain>&); >- void callHasStorageAccessForFrameHandler(const SubFrameDomain&, const TopFrameDomain&, FrameID, PageID, CompletionHandler<void(bool)>&&); >+ void callHasStorageAccessForFrameHandler(const SubFrameDomain&, const TopFrameDomain&, FrameID, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&); > > void didCreateNetworkProcess(); > >@@ -182,7 +181,7 @@ public: > void notifyPageStatisticsTelemetryFinished(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins) const; > > void resourceLoadStatisticsUpdated(Vector<ResourceLoadStatistics>&&); >- void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, uint64_t openerPageID, OpenerDomain&&); >+ void requestStorageAccessUnderOpener(DomainInNeedOfStorageAccess&&, WebCore::PageIdentifier openerID, OpenerDomain&&); > > private: > explicit WebResourceLoadStatisticsStore(NetworkSession&, const String&, ShouldIncludeLocalhost); >diff --git a/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h b/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h >index 2c971836ada..4d3d169f6af 100644 >--- a/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h >+++ b/Source/WebKit/NetworkProcess/NetworkCORSPreflightChecker.h >@@ -49,7 +49,7 @@ public: > String referrer; > String userAgent; > PAL::SessionID sessionID; >- uint64_t pageID; >+ WebCore::PageIdentifier pageID; > uint64_t frameID; > WebCore::StoredCredentialsPolicy storedCredentialsPolicy; > }; >diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >index 3d71f8f6b1b..92c8b7ae44f 100644 >--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >@@ -442,7 +442,7 @@ void NetworkConnectionToWebProcess::removeLoadIdentifier(ResourceLoadIdentifier > ASSERT(!m_networkResourceLoaders.contains(identifier)); > } > >-void NetworkConnectionToWebProcess::pageLoadCompleted(uint64_t webPageID) >+void NetworkConnectionToWebProcess::pageLoadCompleted(PageIdentifier webPageID) > { > stopAllNetworkActivityTrackingForPage(webPageID); > } >@@ -512,7 +512,7 @@ void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(PAL::Sessi > loader->convertToDownload(downloadID, request, response); > } > >-void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&& completionHandler) >+void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&& completionHandler) > { > auto& networkStorageSession = storageSession(networkProcess(), sessionID); > auto result = networkStorageSession.cookiesForDOM(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); >@@ -525,7 +525,7 @@ void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, cons > completionHandler(WTFMove(result.first), result.second); > } > >-void NetworkConnectionToWebProcess::setCookiesFromDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String& cookieString) >+void NetworkConnectionToWebProcess::setCookiesFromDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, const String& cookieString) > { > auto& networkStorageSession = storageSession(networkProcess(), sessionID); > networkStorageSession.setCookiesFromDOM(firstParty, sameSiteInfo, url, frameID, pageID, cookieString); >@@ -542,13 +542,13 @@ void NetworkConnectionToWebProcess::cookiesEnabled(PAL::SessionID sessionID, Com > completionHandler(storageSession(networkProcess(), sessionID).cookiesEnabled()); > } > >-void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String, bool)>&& completionHandler) >+void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String, bool)>&& completionHandler) > { > auto result = storageSession(networkProcess(), sessionID).cookieRequestHeaderFieldValue(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); > completionHandler(WTFMove(result.first), result.second); > } > >-void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&& completionHandler) >+void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&& completionHandler) > { > Vector<WebCore::Cookie> result; > storageSession(networkProcess(), sessionID).getRawCookies(firstParty, sameSiteInfo, url, frameID, pageID, result); >@@ -638,13 +638,13 @@ void NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession() > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >-void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID) >+void NetworkConnectionToWebProcess::removeStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, PageIdentifier pageID) > { > if (auto* storageSession = networkProcess().storageSession(sessionID)) > storageSession->removeStorageAccessForFrame(frameID, pageID); > } > >-void NetworkConnectionToWebProcess::clearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, uint64_t pageID) >+void NetworkConnectionToWebProcess::clearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, PageIdentifier pageID) > { > if (auto* storageSession = networkProcess().storageSession(sessionID)) > storageSession->clearPageSpecificDataForResourceLoadStatistics(pageID); >@@ -697,7 +697,7 @@ void NetworkConnectionToWebProcess::resourceLoadStatisticsUpdated(Vector<WebCore > } > } > >-void NetworkConnectionToWebProcess::hasStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&& completionHandler) >+void NetworkConnectionToWebProcess::hasStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, PageIdentifier pageID, CompletionHandler<void(bool)>&& completionHandler) > { > if (auto networkSession = networkProcess().networkSession(sessionID)) { > if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics()) { >@@ -709,7 +709,7 @@ void NetworkConnectionToWebProcess::hasStorageAccess(PAL::SessionID sessionID, c > completionHandler(true); > } > >-void NetworkConnectionToWebProcess::requestStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)>&& completionHandler) >+void NetworkConnectionToWebProcess::requestStorageAccess(PAL::SessionID sessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, PageIdentifier pageID, CompletionHandler<void(WebCore::StorageAccessWasGranted wasGranted, WebCore::StorageAccessPromptWasShown promptWasShown)>&& completionHandler) > { > if (auto networkSession = networkProcess().networkSession(sessionID)) { > if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics()) { >@@ -721,7 +721,7 @@ void NetworkConnectionToWebProcess::requestStorageAccess(PAL::SessionID sessionI > completionHandler(WebCore::StorageAccessWasGranted::Yes, WebCore::StorageAccessPromptWasShown::No); > } > >-void NetworkConnectionToWebProcess::requestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain&& openerDomain) >+void NetworkConnectionToWebProcess::requestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, PageIdentifier openerPageID, WebCore::RegistrableDomain&& openerDomain) > { > if (auto networkSession = networkProcess().networkSession(sessionID)) { > if (auto* resourceLoadStatistics = networkSession->resourceLoadStatistics()) >@@ -745,7 +745,7 @@ void NetworkConnectionToWebProcess::resetOriginAccessWhitelists() > SecurityPolicy::resetOriginAccessWhitelists(); > } > >-Optional<NetworkActivityTracker> NetworkConnectionToWebProcess::startTrackingResourceLoad(uint64_t pageID, ResourceLoadIdentifier resourceID, bool isMainResource, const PAL::SessionID& sessionID) >+Optional<NetworkActivityTracker> NetworkConnectionToWebProcess::startTrackingResourceLoad(PageIdentifier pageID, ResourceLoadIdentifier resourceID, bool isMainResource, const PAL::SessionID& sessionID) > { > if (sessionID.isEphemeral()) > return WTF::nullopt; >@@ -814,7 +814,7 @@ void NetworkConnectionToWebProcess::stopAllNetworkActivityTracking() > m_networkActivityTrackers.clear(); > } > >-void NetworkConnectionToWebProcess::stopAllNetworkActivityTrackingForPage(uint64_t pageID) >+void NetworkConnectionToWebProcess::stopAllNetworkActivityTrackingForPage(PageIdentifier pageID) > { > for (auto& activityTracker : m_networkActivityTrackers) { > if (activityTracker.pageID == pageID) >@@ -826,7 +826,7 @@ void NetworkConnectionToWebProcess::stopAllNetworkActivityTrackingForPage(uint64 > }); > } > >-size_t NetworkConnectionToWebProcess::findRootNetworkActivity(uint64_t pageID) >+size_t NetworkConnectionToWebProcess::findRootNetworkActivity(PageIdentifier pageID) > { > return m_networkActivityTrackers.findMatching([&](const auto& item) { > return item.isRootActivity && item.pageID == pageID; >@@ -903,17 +903,17 @@ void NetworkConnectionToWebProcess::clearConnectionHasUploads() > m_networkProcess->parentProcessConnection()->send(Messages::WebProcessPool::ClearWebProcessHasUploads(m_webProcessIdentifier), 0); > } > >-void NetworkConnectionToWebProcess::webPageWasAdded(PAL::SessionID sessionID, uint64_t pageID, uint64_t oldPageID) >+void NetworkConnectionToWebProcess::webPageWasAdded(PAL::SessionID sessionID, PageIdentifier pageID, WebCore::PageIdentifier oldPageID) > { > m_networkProcess->webPageWasAdded(m_connection.get(), sessionID, pageID, oldPageID); > } > >-void NetworkConnectionToWebProcess::webPageWasRemoved(PAL::SessionID sessionID, uint64_t pageID) >+void NetworkConnectionToWebProcess::webPageWasRemoved(PAL::SessionID sessionID, PageIdentifier pageID) > { > m_networkProcess->webPageWasRemoved(m_connection.get(), sessionID, pageID); > } > >-void NetworkConnectionToWebProcess::webProcessSessionChanged(PAL::SessionID newSessionID, const Vector<uint64_t>& pages) >+void NetworkConnectionToWebProcess::webProcessSessionChanged(PAL::SessionID newSessionID, const Vector<PageIdentifier>& pages) > { > m_networkProcess->webProcessSessionChanged(m_connection.get(), newSessionID, pages); > } >diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h >index cbc7bbfe8f5..06d57968828 100644 >--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h >+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h >@@ -35,6 +35,7 @@ > #include "NetworkResourceLoadMap.h" > #include "WebPaymentCoordinatorProxy.h" > #include <WebCore/NetworkLoadInformation.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/ProcessIdentifier.h> > #include <WebCore/RegistrableDomain.h> > #include <wtf/RefCounted.h> >@@ -133,7 +134,7 @@ public: > m_networkLoadInformationByID.remove(identifier); > } > >- Optional<NetworkActivityTracker> startTrackingResourceLoad(uint64_t pageID, ResourceLoadIdentifier resourceID, bool isMainResource, const PAL::SessionID&); >+ Optional<NetworkActivityTracker> startTrackingResourceLoad(WebCore::PageIdentifier, ResourceLoadIdentifier resourceID, bool isMainResource, const PAL::SessionID&); > void stopTrackingResourceLoad(ResourceLoadIdentifier resourceID, NetworkActivityTracker::CompletionCode); > > WebCore::BlobRegistryImpl& blobRegistry(); >@@ -144,9 +145,9 @@ public: > void setConnectionHasUploads(); > void clearConnectionHasUploads(); > >- void webPageWasAdded(PAL::SessionID, uint64_t pageID, uint64_t oldPageID); >- void webPageWasRemoved(PAL::SessionID, uint64_t pageID); >- void webProcessSessionChanged(PAL::SessionID newSessionID, const Vector<uint64_t>& pages); >+ void webPageWasAdded(PAL::SessionID, WebCore::PageIdentifier, WebCore::PageIdentifier oldPageID); >+ void webPageWasRemoved(PAL::SessionID, WebCore::PageIdentifier); >+ void webProcessSessionChanged(PAL::SessionID newSessionID, const Vector<WebCore::PageIdentifier>& pages); > > private: > NetworkConnectionToWebProcess(NetworkProcess&, IPC::Connection::Identifier); >@@ -170,16 +171,16 @@ private: > void preconnectTo(uint64_t preconnectionIdentifier, NetworkResourceLoadParameters&&); > > void removeLoadIdentifier(ResourceLoadIdentifier); >- void pageLoadCompleted(uint64_t webPageID); >+ void pageLoadCompleted(WebCore::PageIdentifier); > void crossOriginRedirectReceived(ResourceLoadIdentifier, const URL& redirectURL); > void startDownload(PAL::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { }); > void convertMainResourceLoadToDownload(PAL::SessionID, uint64_t mainResourceLoadIdentifier, DownloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); > >- void cookiesForDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); >- void setCookiesFromDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String&); >+ void cookiesForDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); >+ void setCookiesFromDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier>, const String&); > void cookiesEnabled(PAL::SessionID, CompletionHandler<void(bool)>&&); >- void cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); >- void getRawCookies(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&&); >+ void cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); >+ void getRawCookies(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&&); > void deleteCookie(PAL::SessionID, const URL&, const String& cookieName); > > void registerFileBlobURL(const URL&, const String& path, SandboxExtension::Handle&&, const String& contentType); >@@ -218,17 +219,17 @@ private: > CacheStorageEngineConnection& cacheStorageConnection(); > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >- void removeStorageAccessForFrame(PAL::SessionID, uint64_t frameID, uint64_t pageID); >- void clearPageSpecificDataForResourceLoadStatistics(PAL::SessionID, uint64_t pageID); >+ void removeStorageAccessForFrame(PAL::SessionID, uint64_t frameID, WebCore::PageIdentifier); >+ void clearPageSpecificDataForResourceLoadStatistics(PAL::SessionID, WebCore::PageIdentifier); > > void logUserInteraction(PAL::SessionID, const RegistrableDomain&); > void logWebSocketLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen); > void logSubresourceLoading(PAL::SessionID, const RegistrableDomain& targetDomain, const RegistrableDomain& topFrameDomain, WallTime lastSeen); > void logSubresourceRedirect(PAL::SessionID, const RegistrableDomain& sourceDomain, const RegistrableDomain& targetDomain); > void resourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics>&&); >- void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&&); >- void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&); >- void requestStorageAccessUnderOpener(PAL::SessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain&& openerDomain); >+ void hasStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, CompletionHandler<void(bool)>&&); >+ void requestStorageAccess(PAL::SessionID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&); >+ void requestStorageAccessUnderOpener(PAL::SessionID, WebCore::RegistrableDomain&& domainInNeedOfStorageAccess, WebCore::PageIdentifier openerPageID, WebCore::RegistrableDomain&& openerDomain); > #endif > > void addOriginAccessWhitelistEntry(const String& sourceOrigin, const String& destinationProtocol, const String& destinationHost, bool allowDestinationSubdomains); >@@ -239,29 +240,29 @@ private: > ResourceNetworkActivityTracker() = default; > ResourceNetworkActivityTracker(const ResourceNetworkActivityTracker&) = default; > ResourceNetworkActivityTracker(ResourceNetworkActivityTracker&&) = default; >- ResourceNetworkActivityTracker(uint64_t pageID) >+ ResourceNetworkActivityTracker(WebCore::PageIdentifier pageID) > : pageID { pageID } > , isRootActivity { true } > , networkActivity { NetworkActivityTracker::Label::LoadPage } > { > } > >- ResourceNetworkActivityTracker(uint64_t pageID, ResourceLoadIdentifier resourceID) >+ ResourceNetworkActivityTracker(WebCore::PageIdentifier pageID, ResourceLoadIdentifier resourceID) > : pageID { pageID } > , resourceID { resourceID } > , networkActivity { NetworkActivityTracker::Label::LoadResource } > { > } > >- uint64_t pageID { 0 }; >+ WebCore::PageIdentifier pageID; > ResourceLoadIdentifier resourceID { 0 }; > bool isRootActivity { false }; > NetworkActivityTracker networkActivity; > }; > > void stopAllNetworkActivityTracking(); >- void stopAllNetworkActivityTrackingForPage(uint64_t pageID); >- size_t findRootNetworkActivity(uint64_t pageID); >+ void stopAllNetworkActivityTrackingForPage(WebCore::PageIdentifier); >+ size_t findRootNetworkActivity(WebCore::PageIdentifier); > size_t findNetworkActivityTracker(ResourceLoadIdentifier resourceID); > > #if ENABLE(APPLE_PAY_REMOTE_UI) >diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in >index f7c97eebb21..833e74fcf60 100644 >--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in >+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in >@@ -26,18 +26,18 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver { > PerformSynchronousLoad(WebKit::NetworkResourceLoadParameters resourceLoadParameters) -> (WebCore::ResourceError error, WebCore::ResourceResponse response, Vector<char> data) Synchronous > LoadPing(WebKit::NetworkResourceLoadParameters resourceLoadParameters) > RemoveLoadIdentifier(uint64_t resourceLoadIdentifier) >- PageLoadCompleted(uint64_t webPageID) >+ PageLoadCompleted(WebCore::PageIdentifier webPageID) > PrefetchDNS(String hostname) > PreconnectTo(uint64_t preconnectionIdentifier, WebKit::NetworkResourceLoadParameters loadParameters); > > StartDownload(PAL::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedName) > ConvertMainResourceLoadToDownload(PAL::SessionID sessionID, uint64_t mainResourceLoadIdentifier, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response) > >- CookiesForDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous >- SetCookiesFromDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, String cookieString) >+ CookiesForDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous >+ SetCookiesFromDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID, String cookieString) > CookiesEnabled(PAL::SessionID sessionID) -> (bool enabled) Synchronous >- CookieRequestHeaderFieldValue(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous >- GetRawCookies(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID) -> (Vector<WebCore::Cookie> cookies) Synchronous >+ CookieRequestHeaderFieldValue(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Synchronous >+ GetRawCookies(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier> pageID) -> (Vector<WebCore::Cookie> cookies) Synchronous > DeleteCookie(PAL::SessionID sessionID, URL url, String cookieName) > > RegisterFileBlobURL(URL url, String path, WebKit::SandboxExtension::Handle extensionHandle, String contentType) >@@ -56,16 +56,16 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver { > EnsureLegacyPrivateBrowsingSession() > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >- RemoveStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, uint64_t pageID); >- ClearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, uint64_t pageID); >+ RemoveStorageAccessForFrame(PAL::SessionID sessionID, uint64_t frameID, WebCore::PageIdentifier pageID); >+ ClearPageSpecificDataForResourceLoadStatistics(PAL::SessionID sessionID, WebCore::PageIdentifier pageID); > LogUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) > LogWebSocketLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen) > LogSubresourceLoading(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WallTime lastSeen) > LogSubresourceRedirect(PAL::SessionID sessionID, WebCore::RegistrableDomain sourceDomain, WebCore::RegistrableDomain targetDomain) > ResourceLoadStatisticsUpdated(Vector<WebCore::ResourceLoadStatistics> statistics) >- HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, uint64_t pageID) -> (bool hasStorageAccess) Async >- RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, uint64_t pageID) -> (enum:bool WebCore::StorageAccessWasGranted wasGranted, enum:bool WebCore::StorageAccessPromptWasShown promptWasShown) Async >- RequestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain domainInNeedOfStorageAccess, uint64_t openerPageID, WebCore::RegistrableDomain openerDomain) >+ HasStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, WebCore::PageIdentifier pageID) -> (bool hasStorageAccess) Async >+ RequestStorageAccess(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain, uint64_t frameID, WebCore::PageIdentifier pageID) -> (enum:bool WebCore::StorageAccessWasGranted wasGranted, enum:bool WebCore::StorageAccessPromptWasShown promptWasShown) Async >+ RequestStorageAccessUnderOpener(PAL::SessionID sessionID, WebCore::RegistrableDomain domainInNeedOfStorageAccess, WebCore::PageIdentifier openerPageID, WebCore::RegistrableDomain openerDomain) > #endif > > AddOriginAccessWhitelistEntry(String sourceOrigin, String destinationProtocol, String destinationHost, bool allowDestinationSubdomains); >@@ -87,7 +87,7 @@ messages -> NetworkConnectionToWebProcess LegacyReceiver { > > SetWebProcessIdentifier(WebCore::ProcessIdentifier processIdentifier) > >- WebPageWasAdded(PAL::SessionID sessionID, uint64_t pageID, uint64_t oldPageID) >- WebPageWasRemoved(PAL::SessionID sessionID, uint64_t pageID) >- WebProcessSessionChanged(PAL::SessionID newSessionID, Vector<uint64_t> pages) >+ WebPageWasAdded(PAL::SessionID sessionID, WebCore::PageIdentifier pageID, WebCore::PageIdentifier oldPageID) >+ WebPageWasRemoved(PAL::SessionID sessionID, WebCore::PageIdentifier pageID) >+ WebProcessSessionChanged(PAL::SessionID newSessionID, Vector<WebCore::PageIdentifier> pages) > } >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >index d14b1de9d91..409714d6672 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp >@@ -48,7 +48,7 @@ static inline bool isSameOrigin(const URL& url, const SecurityOrigin* origin) > return url.protocolIsData() || url.protocolIsBlob() || !origin || origin->canRequest(url); > } > >-NetworkLoadChecker::NetworkLoadChecker(NetworkProcess& networkProcess, FetchOptions&& options, PAL::SessionID sessionID, uint64_t pageID, uint64_t frameID, HTTPHeaderMap&& originalRequestHeaders, URL&& url, RefPtr<SecurityOrigin>&& sourceOrigin, PreflightPolicy preflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled, bool shouldCaptureExtraNetworkLoadMetrics, LoadType requestLoadType) >+NetworkLoadChecker::NetworkLoadChecker(NetworkProcess& networkProcess, FetchOptions&& options, PAL::SessionID sessionID, PageIdentifier pageID, uint64_t frameID, HTTPHeaderMap&& originalRequestHeaders, URL&& url, RefPtr<SecurityOrigin>&& sourceOrigin, PreflightPolicy preflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled, bool shouldCaptureExtraNetworkLoadMetrics, LoadType requestLoadType) > : m_options(WTFMove(options)) > , m_sessionID(sessionID) > , m_networkProcess(networkProcess) >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadChecker.h b/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >index 31d11c3a8ae..57df1da4680 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >+++ b/Source/WebKit/NetworkProcess/NetworkLoadChecker.h >@@ -54,7 +54,7 @@ class NetworkLoadChecker : public CanMakeWeakPtr<NetworkLoadChecker> { > public: > enum class LoadType : bool { MainFrame, Other }; > >- NetworkLoadChecker(NetworkProcess&, WebCore::FetchOptions&&, PAL::SessionID, uint64_t pageID, uint64_t frameID, WebCore::HTTPHeaderMap&&, URL&&, RefPtr<WebCore::SecurityOrigin>&&, WebCore::PreflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled = false, bool shouldCaptureExtraNetworkLoadMetrics = false, LoadType requestLoadType = LoadType::Other); >+ NetworkLoadChecker(NetworkProcess&, WebCore::FetchOptions&&, PAL::SessionID, WebCore::PageIdentifier, uint64_t frameID, WebCore::HTTPHeaderMap&&, URL&&, RefPtr<WebCore::SecurityOrigin>&&, WebCore::PreflightPolicy, String&& referrer, bool isHTTPSUpgradeEnabled = false, bool shouldCaptureExtraNetworkLoadMetrics = false, LoadType requestLoadType = LoadType::Other); > ~NetworkLoadChecker(); > > struct RedirectionTriplet { >@@ -125,7 +125,7 @@ private: > WebCore::StoredCredentialsPolicy m_storedCredentialsPolicy; > PAL::SessionID m_sessionID; > Ref<NetworkProcess> m_networkProcess; >- uint64_t m_pageID; >+ WebCore::PageIdentifier m_pageID; > uint64_t m_frameID; > WebCore::HTTPHeaderMap m_originalRequestHeaders; // Needed for CORS checks. > WebCore::HTTPHeaderMap m_firstRequestHeaders; // Needed for CORS checks. >diff --git a/Source/WebKit/NetworkProcess/NetworkLoadParameters.h b/Source/WebKit/NetworkProcess/NetworkLoadParameters.h >index 896399d1332..89730cf9fd2 100644 >--- a/Source/WebKit/NetworkProcess/NetworkLoadParameters.h >+++ b/Source/WebKit/NetworkProcess/NetworkLoadParameters.h >@@ -27,6 +27,7 @@ > > #include "NetworkActivityTracker.h" > #include <WebCore/BlobDataFileReference.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/ResourceLoaderOptions.h> > #include <WebCore/ResourceRequest.h> > #include <pal/SessionID.h> >@@ -38,7 +39,7 @@ enum class PreconnectOnly { No, Yes }; > > class NetworkLoadParameters { > public: >- uint64_t webPageID { 0 }; >+ WebCore::PageIdentifier webPageID; > uint64_t webFrameID { 0 }; > WTF::ProcessID parentPID { 0 }; > PAL::SessionID sessionID { PAL::SessionID::emptySessionID() }; >diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp >index a5d6f5cfcc7..29d17f99f00 100644 >--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp >@@ -1155,7 +1155,7 @@ void NetworkProcess::resetCacheMaxAgeCapForPrevalentResources(PAL::SessionID ses > completionHandler(); > } > >-void NetworkProcess::committedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, uint64_t pageID, CompletionHandler<void()>&& completionHandler) >+void NetworkProcess::committedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, PageIdentifier pageID, CompletionHandler<void()>&& completionHandler) > { > if (auto* networkStorageSession = storageSession(sessionID)) > networkStorageSession->committedCrossSiteLoadWithLinkDecoration(fromDomain, toDomain, pageID); >@@ -1954,7 +1954,7 @@ void NetworkProcess::setAllowsAnySSLCertificateForWebSocket(bool allows, Complet > completionHandler(); > } > >-void NetworkProcess::logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description, ShouldSample shouldSample) >+void NetworkProcess::logDiagnosticMessage(PageIdentifier webPageID, const String& message, const String& description, ShouldSample shouldSample) > { > if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample)) > return; >@@ -1962,7 +1962,7 @@ void NetworkProcess::logDiagnosticMessage(uint64_t webPageID, const String& mess > parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessage(webPageID, message, description, ShouldSample::No), 0); > } > >-void NetworkProcess::logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, DiagnosticLoggingResultType result, ShouldSample shouldSample) >+void NetworkProcess::logDiagnosticMessageWithResult(PageIdentifier webPageID, const String& message, const String& description, DiagnosticLoggingResultType result, ShouldSample shouldSample) > { > if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample)) > return; >@@ -1970,7 +1970,7 @@ void NetworkProcess::logDiagnosticMessageWithResult(uint64_t webPageID, const St > parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithResult(webPageID, message, description, result, ShouldSample::No), 0); > } > >-void NetworkProcess::logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, double value, unsigned significantFigures, ShouldSample shouldSample) >+void NetworkProcess::logDiagnosticMessageWithValue(PageIdentifier webPageID, const String& message, const String& description, double value, unsigned significantFigures, ShouldSample shouldSample) > { > if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample)) > return; >@@ -2619,7 +2619,7 @@ void NetworkProcess::removeKeptAliveLoad(NetworkResourceLoader& loader) > session->removeKeptAliveLoad(loader); > } > >-void NetworkProcess::webPageWasAdded(IPC::Connection& connection, PAL::SessionID sessionID, uint64_t pageID, uint64_t oldPageID) >+void NetworkProcess::webPageWasAdded(IPC::Connection& connection, PAL::SessionID sessionID, PageIdentifier pageID, PageIdentifier oldPageID) > { > if (!pageID || !oldPageID) { > LOG_ERROR("Cannot add page with invalid id"); >@@ -2638,13 +2638,13 @@ void NetworkProcess::webPageWasAdded(IPC::Connection& connection, PAL::SessionID > return sessionID; > }); > >- storageManager.createSessionStorageNamespace(pageID, std::numeric_limits<unsigned>::max()); >- storageManager.addAllowedSessionStorageNamespaceConnection(pageID, connection); >+ storageManager.createSessionStorageNamespace(pageID.toUInt64(), std::numeric_limits<unsigned>::max()); >+ storageManager.addAllowedSessionStorageNamespaceConnection(pageID.toUInt64(), connection); > if (pageID != oldPageID) >- storageManager.cloneSessionStorageNamespace(oldPageID, pageID); >+ storageManager.cloneSessionStorageNamespace(oldPageID.toUInt64(), pageID.toUInt64()); > } > >-void NetworkProcess::webPageWasRemoved(IPC::Connection& connection, PAL::SessionID sessionID, uint64_t pageID) >+void NetworkProcess::webPageWasRemoved(IPC::Connection& connection, PAL::SessionID sessionID, PageIdentifier pageID) > { > if (!pageID) { > LOG_ERROR("Cannot remove page with invalid id"); >@@ -2657,8 +2657,8 @@ void NetworkProcess::webPageWasRemoved(IPC::Connection& connection, PAL::Session > return; > > auto& storageManager = session->storageManager(); >- storageManager.removeAllowedSessionStorageNamespaceConnection(pageID, connection); >- storageManager.destroySessionStorageNamespace(pageID); >+ storageManager.removeAllowedSessionStorageNamespaceConnection(pageID.toUInt64(), connection); >+ storageManager.destroySessionStorageNamespace(pageID.toUInt64()); > } > > void NetworkProcess::webProcessWasDisconnected(IPC::Connection& connection) >@@ -2674,7 +2674,7 @@ void NetworkProcess::webProcessWasDisconnected(IPC::Connection& connection) > networkSession(sessionID)->storageManager().processDidCloseConnection(connection); > } > >-void NetworkProcess::webProcessSessionChanged(IPC::Connection& connection, PAL::SessionID newSessionID, const Vector<uint64_t>& pageIDs) >+void NetworkProcess::webProcessSessionChanged(IPC::Connection& connection, PAL::SessionID newSessionID, const Vector<PageIdentifier>& pageIDs) > { > auto connectionID = connection.uniqueID(); > ASSERT(m_sessionByConnection.contains(connectionID)); >diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.h b/Source/WebKit/NetworkProcess/NetworkProcess.h >index 7acb3f9675c..ebf3b7fe650 100644 >--- a/Source/WebKit/NetworkProcess/NetworkProcess.h >+++ b/Source/WebKit/NetworkProcess/NetworkProcess.h >@@ -41,6 +41,7 @@ > #include <WebCore/FetchIdentifier.h> > #include <WebCore/IDBKeyData.h> > #include <WebCore/IDBServer.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/RegistrableDomain.h> > #include <WebCore/ServiceWorkerIdentifier.h> > #include <WebCore/ServiceWorkerTypes.h> >@@ -136,8 +137,6 @@ public: > using NavigatedToDomain = WebCore::RegistrableDomain; > using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; > using OpenerDomain = WebCore::RegistrableDomain; >- using OpenerPageID = uint64_t; >- using PageID = uint64_t; > using FrameID = uint64_t; > > NetworkProcess(AuxiliaryProcessInitializationParameters&&); >@@ -190,9 +189,9 @@ public: > void resume(); > > // Diagnostic messages logging. >- void logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description, WebCore::ShouldSample); >- void logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType, WebCore::ShouldSample); >- void logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample); >+ void logDiagnosticMessage(WebCore::PageIdentifier, const String& message, const String& description, WebCore::ShouldSample); >+ void logDiagnosticMessageWithResult(WebCore::PageIdentifier, const String& message, const String& description, WebCore::DiagnosticLoggingResultType, WebCore::ShouldSample); >+ void logDiagnosticMessageWithValue(WebCore::PageIdentifier, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample); > > #if PLATFORM(COCOA) > RetainPtr<CFDataRef> sourceApplicationAuditData() const; >@@ -258,7 +257,7 @@ public: > void setTopFrameUniqueRedirectTo(PAL::SessionID, const TopFrameDomain&, const RedirectedToDomain&, CompletionHandler<void()>&&); > void setTopFrameUniqueRedirectFrom(PAL::SessionID, const TopFrameDomain&, const RedirectedFromDomain&, CompletionHandler<void()>&&); > void registrableDomainsWithWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, bool shouldNotifyPage, CompletionHandler<void(HashSet<RegistrableDomain>&&)>&&); >- void committedCrossSiteLoadWithLinkDecoration(PAL::SessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, uint64_t pageID, CompletionHandler<void()>&&); >+ void committedCrossSiteLoadWithLinkDecoration(PAL::SessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, WebCore::PageIdentifier, CompletionHandler<void()>&&); > void setCrossSiteLoadWithLinkDecorationForTesting(PAL::SessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, CompletionHandler<void()>&&); > void resetCrossSiteLoadsWithLinkDecorationForTesting(PAL::SessionID, CompletionHandler<void()>&&); > #endif >@@ -271,10 +270,10 @@ public: > void setSessionIsControlledByAutomation(PAL::SessionID, bool); > bool sessionIsControlledByAutomation(PAL::SessionID) const; > >- void webPageWasAdded(IPC::Connection&, PAL::SessionID, uint64_t pageID, uint64_t oldPageID); >- void webPageWasRemoved(IPC::Connection&, PAL::SessionID, uint64_t pageID); >+ void webPageWasAdded(IPC::Connection&, PAL::SessionID, WebCore::PageIdentifier, WebCore::PageIdentifier); >+ void webPageWasRemoved(IPC::Connection&, PAL::SessionID, WebCore::PageIdentifier); > void webProcessWasDisconnected(IPC::Connection&); >- void webProcessSessionChanged(IPC::Connection&, PAL::SessionID, const Vector<uint64_t>&); >+ void webProcessSessionChanged(IPC::Connection&, PAL::SessionID, const Vector<WebCore::PageIdentifier>&); > void getLocalStorageOriginDetails(PAL::SessionID, CompletionHandler<void(Vector<LocalStorageDatabaseTracker::OriginDetails>&&)>&&); > > #if ENABLE(CONTENT_EXTENSIONS) >diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in >index d9fee078fe7..f5ef5301340 100644 >--- a/Source/WebKit/NetworkProcess/NetworkProcess.messages.in >+++ b/Source/WebKit/NetworkProcess/NetworkProcess.messages.in >@@ -131,7 +131,7 @@ messages -> NetworkProcess LegacyReceiver { > SetTopFrameUniqueRedirectTo(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain redirectedToDomain) -> () Async > SetTopFrameUniqueRedirectFrom(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain redirectedFromDomain) -> () Async > ResetCacheMaxAgeCapForPrevalentResources(PAL::SessionID sessionID) -> () Async >- CommittedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, WebCore::RegistrableDomain fromDomain, WebCore::RegistrableDomain toDomain, uint64_t pageID) -> () Async >+ CommittedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, WebCore::RegistrableDomain fromDomain, WebCore::RegistrableDomain toDomain, WebCore::PageIdentifier pageID) -> () Async > SetCrossSiteLoadWithLinkDecorationForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain fromDomain, WebCore::RegistrableDomain toDomain) -> () Async > ResetCrossSiteLoadsWithLinkDecorationForTesting(PAL::SessionID sessionID) -> () Async > DeleteCookiesForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain domain, bool includeHttpOnlyCookies) -> () Async >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp b/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp >index 58aacb993db..33cdc4d17db 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp >@@ -107,8 +107,11 @@ bool NetworkResourceLoadParameters::decode(IPC::Decoder& decoder, NetworkResourc > if (!decoder.decode(result.identifier)) > return false; > >- if (!decoder.decode(result.webPageID)) >+ Optional<PageIdentifier> webPageID; >+ decoder >> webPageID; >+ if (!webPageID) > return false; >+ result.webPageID = *webPageID; > > if (!decoder.decode(result.webFrameID)) > return false; >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >index fe26536f21c..f4cbae2dabc 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >@@ -174,18 +174,18 @@ void NetworkResourceLoader::start() > m_networkLoadChecker->check(ResourceRequest { originalRequest() }, this, [this] (auto&& result) { > WTF::switchOn(result, > [this] (ResourceError& error) { >- RELEASE_LOG_IF_ALLOWED("start: error checking (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d, error.domain = %{public}s, error.code = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID, error.domain().utf8().data(), error.errorCode()); >+ RELEASE_LOG_IF_ALLOWED("start: error checking (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d, error.domain = %{public}s, error.code = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID, error.domain().utf8().data(), error.errorCode()); > if (!error.isCancellation()) > this->didFailLoading(error); > }, > [this] (NetworkLoadChecker::RedirectionTriplet& triplet) { > this->m_isWaitingContinueWillSendRequestForCachedRedirect = true; > this->willSendRedirectedRequest(WTFMove(triplet.request), WTFMove(triplet.redirectRequest), WTFMove(triplet.redirectResponse)); >- RELEASE_LOG_IF_ALLOWED("start: synthetic redirect sent because request URL was modified (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID); >+ RELEASE_LOG_IF_ALLOWED("start: synthetic redirect sent because request URL was modified (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID); > }, > [this] (ResourceRequest& request) { > if (this->canUseCache(request)) { >- RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID); >+ RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID); > this->retrieveCacheEntry(request); > return; > } >@@ -198,7 +198,7 @@ void NetworkResourceLoader::start() > } > // FIXME: Remove that code path once m_networkLoadChecker is used for all network loads. > if (canUseCache(originalRequest())) { >- RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous(), m_parameters.parentPID); >+ RELEASE_LOG_IF_ALLOWED("start: Checking cache for resource (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous(), m_parameters.parentPID); > retrieveCacheEntry(originalRequest()); > return; > } >@@ -227,13 +227,13 @@ void NetworkResourceLoader::retrieveCacheEntry(const ResourceRequest& request) > loader->logSlowCacheRetrieveIfNeeded(info); > > if (!entry) { >- RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource not in cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource not in cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > loader->startNetworkLoad(WTFMove(request), FirstLoad::Yes); > return; > } > #if ENABLE(RESOURCE_LOAD_STATISTICS) > if (entry->hasReachedPrevalentResourceAgeCap()) { >- RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource has reached prevalent resource age cap (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource has reached prevalent resource age cap (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > m_cacheEntryForMaxAgeCapValidation = WTFMove(entry); > ResourceRequest revalidationRequest = originalRequest(); > loader->startNetworkLoad(WTFMove(revalidationRequest), FirstLoad::Yes); >@@ -241,21 +241,21 @@ void NetworkResourceLoader::retrieveCacheEntry(const ResourceRequest& request) > } > #endif > if (entry->redirectRequest()) { >- RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Handling redirect (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Handling redirect (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > loader->dispatchWillSendRequestForCacheEntry(WTFMove(request), WTFMove(entry)); > return; > } > if (loader->m_parameters.needsCertificateInfo && !entry->response().certificateInfo()) { >- RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource does not have required certificate (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Resource does not have required certificate (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > loader->startNetworkLoad(WTFMove(request), FirstLoad::Yes); > return; > } > if (entry->needsValidation() || request.cachePolicy() == WebCore::ResourceRequestCachePolicy::RefreshAnyCacheData) { >- RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Validating cache entry (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Validating cache entry (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > loader->validateCacheEntry(WTFMove(entry)); > return; > } >- RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Retrieved resource from cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("retrieveCacheEntry: Retrieved resource from cache (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > loader->didRetrieveCacheEntry(WTFMove(entry)); > }); > } >@@ -263,7 +263,7 @@ void NetworkResourceLoader::retrieveCacheEntry(const ResourceRequest& request) > void NetworkResourceLoader::startNetworkLoad(ResourceRequest&& request, FirstLoad load) > { > if (load == FirstLoad::Yes) { >- RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); >+ RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, isMainResource(), isSynchronous()); > > consumeSandboxExtensions(); > >@@ -289,7 +289,7 @@ void NetworkResourceLoader::startNetworkLoad(ResourceRequest&& request, FirstLoa > } > if (!networkSession) { > WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID()); >- RELEASE_LOG_ERROR_IF_ALLOWED("startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", sessionID=%" PRIu64 ")", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, parameters.sessionID.sessionID()); >+ RELEASE_LOG_ERROR_IF_ALLOWED("startNetworkLoad: Attempted to create a NetworkLoad with a session that does not exist (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", sessionID=%" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, parameters.sessionID.sessionID()); > m_connection->networkProcess().logDiagnosticMessage(m_parameters.webPageID, WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::invalidSessionIDKey(), WebCore::ShouldSample::No); > didFailLoading(internalError(request.url())); > return; >@@ -298,7 +298,7 @@ void NetworkResourceLoader::startNetworkLoad(ResourceRequest&& request, FirstLoa > parameters.request = WTFMove(request); > m_networkLoad = std::make_unique<NetworkLoad>(*this, &m_connection->blobRegistry(), WTFMove(parameters), *networkSession); > >- RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", description = %{public}s)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, m_networkLoad->description().utf8().data()); >+ RELEASE_LOG_IF_ALLOWED("startNetworkLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", description = %{public}s)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, m_networkLoad->description().utf8().data()); > } > > void NetworkResourceLoader::cleanup(LoadResult result) >@@ -322,7 +322,7 @@ void NetworkResourceLoader::cleanup(LoadResult result) > > void NetworkResourceLoader::convertToDownload(DownloadID downloadID, const ResourceRequest& request, const ResourceResponse& response) > { >- RELEASE_LOG(Loading, "Converting NetworkResourceLoader %p to download %" PRIu64 " (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", this, downloadID.downloadID(), m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier); >+ RELEASE_LOG(Loading, "Converting NetworkResourceLoader %p to download %" PRIu64 " (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", this, downloadID.downloadID(), m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier); > > // This can happen if the resource came from the disk cache. > if (!m_networkLoad) { >@@ -340,7 +340,7 @@ void NetworkResourceLoader::abort() > ASSERT(RunLoop::isMain()); > > RELEASE_LOG_IF_ALLOWED("abort: Canceling resource load (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", >- m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier); >+ m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier); > > if (m_parameters.options.keepAlive && m_response.isNull() && !m_isKeptAlive) { > m_isKeptAlive = true; >@@ -384,12 +384,12 @@ bool NetworkResourceLoader::shouldInterruptLoadForXFrameOptions(const String& xF > } > case XFrameOptionsConflict: { > String errorMessage = "Multiple 'X-Frame-Options' headers with conflicting values ('" + xFrameOptions + "') encountered when loading '" + url.stringCenterEllipsizedToLength() + "'. Falling back to 'DENY'."; >- send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, MessageSource::JS, MessageLevel::Error, errorMessage, identifier() }, m_parameters.webPageID); >+ send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, MessageSource::JS, MessageLevel::Error, errorMessage, identifier() }, m_parameters.webPageID.toUInt64()); > return true; > } > case XFrameOptionsInvalid: { > String errorMessage = "Invalid 'X-Frame-Options' header encountered when loading '" + url.stringCenterEllipsizedToLength() + "': '" + xFrameOptions + "' is not a recognized directive. The header will be ignored."; >- send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, MessageSource::JS, MessageLevel::Error, errorMessage, identifier() }, m_parameters.webPageID); >+ send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, MessageSource::JS, MessageLevel::Error, errorMessage, identifier() }, m_parameters.webPageID.toUInt64()); > return false; > } > } >@@ -416,7 +416,7 @@ bool NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptio > String xFrameOptions = m_response.httpHeaderField(HTTPHeaderName::XFrameOptions); > if (!xFrameOptions.isNull() && shouldInterruptLoadForXFrameOptions(xFrameOptions, response.url())) { > String errorMessage = "Refused to display '" + response.url().stringCenterEllipsizedToLength() + "' in a frame because it set 'X-Frame-Options' to '" + xFrameOptions + "'."; >- send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, MessageSource::Security, MessageLevel::Error, errorMessage, identifier() }, m_parameters.webPageID); >+ send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, MessageSource::Security, MessageLevel::Error, errorMessage, identifier() }, m_parameters.webPageID.toUInt64()); > return true; > } > } >@@ -425,7 +425,7 @@ bool NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptio > > void NetworkResourceLoader::didReceiveResponse(ResourceResponse&& receivedResponse, ResponseCompletionHandler&& completionHandler) > { >- RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", httpStatusCode = %d, length = %" PRId64 ")", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, receivedResponse.httpStatusCode(), receivedResponse.expectedContentLength()); >+ RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", httpStatusCode = %d, length = %" PRId64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, receivedResponse.httpStatusCode(), receivedResponse.expectedContentLength()); > > m_response = WTFMove(receivedResponse); > >@@ -505,7 +505,7 @@ void NetworkResourceLoader::didReceiveResponse(ResourceResponse&& receivedRespon > void NetworkResourceLoader::didReceiveBuffer(Ref<SharedBuffer>&& buffer, int reportedEncodedDataLength) > { > if (!m_numBytesReceived) >- RELEASE_LOG_IF_ALLOWED("didReceiveBuffer: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier); >+ RELEASE_LOG_IF_ALLOWED("didReceiveBuffer: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier); > m_numBytesReceived += buffer->size(); > > ASSERT(!m_cacheEntryForValidation); >@@ -534,7 +534,7 @@ void NetworkResourceLoader::didReceiveBuffer(Ref<SharedBuffer>&& buffer, int rep > > void NetworkResourceLoader::didFinishLoading(const NetworkLoadMetrics& networkLoadMetrics) > { >- RELEASE_LOG_IF_ALLOWED("didFinishLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, m_numBytesReceived); >+ RELEASE_LOG_IF_ALLOWED("didFinishLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, m_numBytesReceived); > > if (shouldCaptureExtraNetworkLoadMetrics()) > m_connection->addNetworkLoadInformationMetrics(identifier(), networkLoadMetrics); >@@ -569,7 +569,7 @@ void NetworkResourceLoader::didFinishLoading(const NetworkLoadMetrics& networkLo > > void NetworkResourceLoader::didFailLoading(const ResourceError& error) > { >- RELEASE_LOG_IF_ALLOWED("didFailLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isTimeout = %d, isCancellation = %d, isAccessControl = %d, errCode = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, error.isTimeout(), error.isCancellation(), error.isAccessControl(), error.errorCode()); >+ RELEASE_LOG_IF_ALLOWED("didFailLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isTimeout = %d, isCancellation = %d, isAccessControl = %d, errCode = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, error.isTimeout(), error.isCancellation(), error.isAccessControl(), error.errorCode()); > > if (shouldCaptureExtraNetworkLoadMetrics()) > m_connection->removeNetworkLoadInformation(identifier()); >@@ -731,7 +731,7 @@ void NetworkResourceLoader::continueWillSendRequest(ResourceRequest&& newRequest > } > } > >- RELEASE_LOG_IF_ALLOWED("continueWillSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier); >+ RELEASE_LOG_IF_ALLOWED("continueWillSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier); > > m_isAllowedToAskUserForCredentials = isAllowedToAskUserForCredentials; > >@@ -988,6 +988,11 @@ static String escapeIDForJSON(const Optional<uint64_t>& value) > return value ? String::number(value.value()) : String("None"_s); > }; > >+static String escapeIDForJSON(const Optional<PageIdentifier>& value) >+{ >+ return value ? String::number(value->toUInt64()) : String("None"_s); >+}; >+ > void NetworkResourceLoader::logCookieInformation() const > { > ASSERT(shouldLogCookieInformation(m_connection, sessionID())); >@@ -998,7 +1003,7 @@ void NetworkResourceLoader::logCookieInformation() const > logCookieInformation(m_connection, "NetworkResourceLoader", reinterpret_cast<const void*>(this), *networkStorageSession, originalRequest().firstPartyForCookies(), SameSiteInfo::create(originalRequest()), originalRequest().url(), originalRequest().httpReferrer(), frameID(), pageID(), identifier()); > } > >-static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) >+static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier) > { > ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); > >@@ -1025,7 +1030,7 @@ static void logBlockedCookieInformation(NetworkConnectionToWebProcess& connectio > #undef LOCAL_LOG_IF_ALLOWED > } > >-static void logCookieInformationInternal(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) >+static void logCookieInformationInternal(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession& networkStorageSession, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier) > { > ASSERT(NetworkResourceLoader::shouldLogCookieInformation(connection, networkStorageSession.sessionID())); > >@@ -1086,7 +1091,7 @@ static void logCookieInformationInternal(NetworkConnectionToWebProcess& connecti > #undef LOCAL_LOG_IF_ALLOWED > } > >-void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier) >+void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& connection, const String& label, const void* loggedObject, const NetworkStorageSession& networkStorageSession, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, const String& referrer, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, Optional<uint64_t> identifier) > { > ASSERT(shouldLogCookieInformation(connection, networkStorageSession.sessionID())); > >@@ -1099,17 +1104,17 @@ void NetworkResourceLoader::logCookieInformation(NetworkConnectionToWebProcess& > > void NetworkResourceLoader::addConsoleMessage(MessageSource messageSource, MessageLevel messageLevel, const String& message, unsigned long) > { >- send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, messageSource, messageLevel, message, identifier() }, m_parameters.webPageID); >+ send(Messages::WebPage::AddConsoleMessage { m_parameters.webFrameID, messageSource, messageLevel, message, identifier() }, m_parameters.webPageID.toUInt64()); > } > > void NetworkResourceLoader::sendCSPViolationReport(URL&& reportURL, Ref<FormData>&& report) > { >- send(Messages::WebPage::SendCSPViolationReport { m_parameters.webFrameID, WTFMove(reportURL), IPC::FormDataReference { WTFMove(report) } }, m_parameters.webPageID); >+ send(Messages::WebPage::SendCSPViolationReport { m_parameters.webFrameID, WTFMove(reportURL), IPC::FormDataReference { WTFMove(report) } }, m_parameters.webPageID.toUInt64()); > } > > void NetworkResourceLoader::enqueueSecurityPolicyViolationEvent(WebCore::SecurityPolicyViolationEvent::Init&& eventInit) > { >- send(Messages::WebPage::EnqueueSecurityPolicyViolationEvent { m_parameters.webFrameID, WTFMove(eventInit) }, m_parameters.webPageID); >+ send(Messages::WebPage::EnqueueSecurityPolicyViolationEvent { m_parameters.webFrameID, WTFMove(eventInit) }, m_parameters.webPageID.toUInt64()); > } > > void NetworkResourceLoader::logSlowCacheRetrieveIfNeeded(const NetworkCache::Cache::RetrieveInfo& info) >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoader.h b/Source/WebKit/NetworkProcess/NetworkResourceLoader.h >index a8a3005c142..a8f6d315798 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoader.h >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoader.h >@@ -84,7 +84,7 @@ public: > PAL::SessionID sessionID() const { return m_parameters.sessionID; } > ResourceLoadIdentifier identifier() const { return m_parameters.identifier; } > uint64_t frameID() const { return m_parameters.webFrameID; } >- uint64_t pageID() const { return m_parameters.webPageID; } >+ WebCore::PageIdentifier pageID() const { return m_parameters.webPageID; } > > struct SynchronousLoadData; > >@@ -110,7 +110,7 @@ public: > > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED > static bool shouldLogCookieInformation(NetworkConnectionToWebProcess&, const PAL::SessionID&); >- static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier); >+ static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier>, Optional<uint64_t> identifier); > #endif > > void disableExtraNetworkLoadMetricsCapture() { m_shouldCaptureExtraNetworkLoadMetrics = false; } >diff --git a/Source/WebKit/NetworkProcess/cache/NetworkCache.h b/Source/WebKit/NetworkProcess/cache/NetworkCache.h >index c7f386b3d7c..8bbc1697856 100644 >--- a/Source/WebKit/NetworkProcess/cache/NetworkCache.h >+++ b/Source/WebKit/NetworkProcess/cache/NetworkCache.h >@@ -28,6 +28,7 @@ > #include "NetworkCacheEntry.h" > #include "NetworkCacheStorage.h" > #include "ShareableResource.h" >+#include <WebCore/PageIdentifier.h> > #include <WebCore/ResourceResponse.h> > #include <wtf/CompletionHandler.h> > #include <wtf/OptionSet.h> >@@ -84,7 +85,7 @@ enum class UseDecision { > NoDueToExpiredRedirect > }; > >-using GlobalFrameID = std::pair<uint64_t /*webPageID*/, uint64_t /*webFrameID*/>; >+using GlobalFrameID = std::pair<WebCore::PageIdentifier, uint64_t /*webFrameID*/>; > > class Cache : public RefCounted<Cache> { > public: >diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h >index 965c6fa664b..2dd0e7d46bc 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h >+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h >@@ -42,7 +42,7 @@ class NetworkSessionCocoa; > class NetworkDataTaskCocoa final : public NetworkDataTask { > friend class NetworkSessionCocoa; > public: >- static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& request, uint64_t frameID, uint64_t pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, Optional<NetworkActivityTracker> networkActivityTracker) >+ static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& request, uint64_t frameID, WebCore::PageIdentifier pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, Optional<NetworkActivityTracker> networkActivityTracker) > { > return adoptRef(*new NetworkDataTaskCocoa(session, client, request, frameID, pageID, storedCredentialsPolicy, shouldContentSniff, shouldContentEncodingSniff, shouldClearReferrerOnHTTPSToHTTPRedirect, shouldPreconnectOnly, dataTaskIsForMainFrameNavigation, networkActivityTracker)); > } >@@ -70,12 +70,12 @@ public: > WebCore::NetworkLoadMetrics& networkLoadMetrics() { return m_networkLoadMetrics; } > > uint64_t frameID() const { return m_frameID; }; >- uint64_t pageID() const { return m_pageID; }; >+ WebCore::PageIdentifier pageID() const { return m_pageID; }; > > String description() const override; > > private: >- NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, uint64_t frameID, uint64_t pageID, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, Optional<NetworkActivityTracker>); >+ NetworkDataTaskCocoa(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, uint64_t frameID, WebCore::PageIdentifier, WebCore::StoredCredentialsPolicy, WebCore::ContentSniffingPolicy, WebCore::ContentEncodingSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly, bool dataTaskIsForMainFrameNavigation, Optional<NetworkActivityTracker>); > > bool tryPasswordBasedAuthentication(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&); > void applySniffingPoliciesAndBindRequestToInferfaceIfNeeded(__strong NSURLRequest*&, bool shouldContentSniff, bool shouldContentEncodingSniff); >@@ -93,7 +93,7 @@ private: > RetainPtr<NSURLSessionDataTask> m_task; > WebCore::NetworkLoadMetrics m_networkLoadMetrics; > uint64_t m_frameID; >- uint64_t m_pageID; >+ WebCore::PageIdentifier m_pageID; > > #if ENABLE(RESOURCE_LOAD_STATISTICS) > bool m_hasBeenSetToUseStatelessCookieStorage { false }; >diff --git a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >index 35e443b9ee9..28a05e80db6 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >+++ b/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm >@@ -160,7 +160,7 @@ static void updateTaskWithFirstPartyForSameSiteCookies(NSURLSessionDataTask* tas > #endif > } > >-NetworkDataTaskCocoa::NetworkDataTaskCocoa(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& requestWithCredentials, uint64_t frameID, uint64_t pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, Optional<NetworkActivityTracker> networkActivityTracker) >+NetworkDataTaskCocoa::NetworkDataTaskCocoa(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& requestWithCredentials, uint64_t frameID, WebCore::PageIdentifier pageID, WebCore::StoredCredentialsPolicy storedCredentialsPolicy, WebCore::ContentSniffingPolicy shouldContentSniff, WebCore::ContentEncodingSniffingPolicy shouldContentEncodingSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect, PreconnectOnly shouldPreconnectOnly, bool dataTaskIsForMainFrameNavigation, Optional<NetworkActivityTracker> networkActivityTracker) > : NetworkDataTask(session, client, requestWithCredentials, storedCredentialsPolicy, shouldClearReferrerOnHTTPSToHTTPRedirect, dataTaskIsForMainFrameNavigation) > , m_frameID(frameID) > , m_pageID(pageID) >@@ -236,7 +236,7 @@ NetworkDataTaskCocoa::NetworkDataTaskCocoa(NetworkSession& session, NetworkDataT > if (shouldBlockCookies) { > #if !RELEASE_LOG_DISABLED > if (m_session->shouldLogCookieInformation()) >- RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID, frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String); >+ RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID.toUInt64(), frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String); > #else > LOG(NetworkSession, "%llu Blocking cookies for URL %s", [m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String); > #endif >@@ -366,7 +366,7 @@ void NetworkDataTaskCocoa::willPerformHTTPRedirection(WebCore::ResourceResponse& > bool shouldBlockCookies = m_storedCredentialsPolicy == WebCore::StoredCredentialsPolicy::EphemeralStatelessCookieless || m_session->networkStorageSession().shouldBlockCookies(request, m_frameID, m_pageID); > #if !RELEASE_LOG_DISABLED > if (m_session->shouldLogCookieInformation()) >- RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID, m_frameID, (unsigned long)[m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data()); >+ RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID.toUInt64(), m_frameID, (unsigned long)[m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data()); > #else > LOG(NetworkSession, "%llu %s cookies for redirect URL %s", [m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data()); > #endif >@@ -379,7 +379,7 @@ void NetworkDataTaskCocoa::willPerformHTTPRedirection(WebCore::ResourceResponse& > if (!shouldBlockCookies) { > #if !RELEASE_LOG_DISABLED > if (m_session->shouldLogCookieInformation()) >- RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Not partitioning cookies for redirect URL %s", this, m_pageID, m_frameID, (unsigned long)[m_task taskIdentifier], request.url().string().utf8().data()); >+ RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Not partitioning cookies for redirect URL %s", this, m_pageID.toUInt64(), m_frameID, (unsigned long)[m_task taskIdentifier], request.url().string().utf8().data()); > #else > LOG(NetworkSession, "%llu Not partitioning cookies for redirect URL %s", [m_task taskIdentifier], request.url().string().utf8().data()); > #endif >diff --git a/Source/WebKit/Platform/IPC/MessageSender.h b/Source/WebKit/Platform/IPC/MessageSender.h >index d5f981e4534..f86454dda41 100644 >--- a/Source/WebKit/Platform/IPC/MessageSender.h >+++ b/Source/WebKit/Platform/IPC/MessageSender.h >@@ -34,9 +34,9 @@ class MessageSender { > public: > virtual ~MessageSender(); > >- template<typename U> bool send(const U& message) >+ template<typename U> bool send(const U& message, OptionSet<SendOption> sendOptions = { }) > { >- return send(message, messageSenderDestinationID(), { }); >+ return send(message, messageSenderDestinationID(), sendOptions); > } > > template<typename U> bool send(const U& message, uint64_t destinationID, OptionSet<SendOption> sendOptions = { }) >@@ -65,8 +65,8 @@ public: > return messageSenderConnection()->sendSync(WTFMove(message), WTFMove(reply), destinationID, timeout, sendSyncOptions); > } > >- template<typename T, typename... Args> >- void sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& completionHandler) >+ template<typename T, typename C> >+ void sendWithAsyncReply(T&& message, C&& completionHandler) > { > messageSenderConnection()->sendWithAsyncReply(WTFMove(message), WTFMove(completionHandler), messageSenderDestinationID()); > } >diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py >index 52514902abb..5b97530305b 100644 >--- a/Source/WebKit/Scripts/webkit/messages.py >+++ b/Source/WebKit/Scripts/webkit/messages.py >@@ -205,6 +205,7 @@ def forward_declarations_and_headers(receiver): > 'String', > 'WebCore::DocumentIdentifier', > 'WebCore::FetchIdentifier', >+ 'WebCore::PageIdentifier', > 'WebCore::PointerID', > 'WebCore::ProcessIdentifier', > 'WebCore::ServiceWorkerIdentifier', >diff --git a/Source/WebKit/Shared/API/APIPageHandle.cpp b/Source/WebKit/Shared/API/APIPageHandle.cpp >index a6a00995500..e605a45946f 100644 >--- a/Source/WebKit/Shared/API/APIPageHandle.cpp >+++ b/Source/WebKit/Shared/API/APIPageHandle.cpp >@@ -31,17 +31,17 @@ > > namespace API { > >-Ref<PageHandle> PageHandle::create(uint64_t pageID) >+Ref<PageHandle> PageHandle::create(WebCore::PageIdentifier pageID) > { > return adoptRef(*new PageHandle(pageID, false)); > } > >-Ref<PageHandle> PageHandle::createAutoconverting(uint64_t pageID) >+Ref<PageHandle> PageHandle::createAutoconverting(WebCore::PageIdentifier pageID) > { > return adoptRef(*new PageHandle(pageID, true)); > } > >-PageHandle::PageHandle(uint64_t pageID, bool isAutoconverting) >+PageHandle::PageHandle(WebCore::PageIdentifier pageID, bool isAutoconverting) > : m_pageID(pageID) > , m_isAutoconverting(isAutoconverting) > { >@@ -59,15 +59,16 @@ void PageHandle::encode(IPC::Encoder& encoder) const > > bool PageHandle::decode(IPC::Decoder& decoder, RefPtr<Object>& result) > { >- uint64_t pageID; >- if (!decoder.decode(pageID)) >+ Optional<WebCore::PageIdentifier> pageID; >+ decoder >> pageID; >+ if (!pageID) > return false; > > bool isAutoconverting; > if (!decoder.decode(isAutoconverting)) > return false; > >- result = isAutoconverting ? createAutoconverting(pageID) : create(pageID); >+ result = isAutoconverting ? createAutoconverting(*pageID) : create(*pageID); > return true; > } > >diff --git a/Source/WebKit/Shared/API/APIPageHandle.h b/Source/WebKit/Shared/API/APIPageHandle.h >index f30fafbdc31..7d7adc689e6 100644 >--- a/Source/WebKit/Shared/API/APIPageHandle.h >+++ b/Source/WebKit/Shared/API/APIPageHandle.h >@@ -27,6 +27,7 @@ > #define APIPageHandle_h > > #include "APIObject.h" >+#include <WebCore/PageIdentifier.h> > #include <wtf/Ref.h> > > namespace IPC { >@@ -38,20 +39,20 @@ namespace API { > > class PageHandle : public ObjectImpl<Object::Type::PageHandle> { > public: >- static Ref<PageHandle> create(uint64_t pageID); >- static Ref<PageHandle> createAutoconverting(uint64_t pageID); >+ static Ref<PageHandle> create(WebCore::PageIdentifier); >+ static Ref<PageHandle> createAutoconverting(WebCore::PageIdentifier); > virtual ~PageHandle(); > >- uint64_t pageID() const { return m_pageID; } >+ WebCore::PageIdentifier pageID() const { return m_pageID; } > bool isAutoconverting() const { return m_isAutoconverting; } > > void encode(IPC::Encoder&) const; > static bool decode(IPC::Decoder&, RefPtr<Object>&); > > private: >- explicit PageHandle(uint64_t pageID, bool isAutoconverting); >+ explicit PageHandle(WebCore::PageIdentifier, bool isAutoconverting); > >- const uint64_t m_pageID; >+ const WebCore::PageIdentifier m_pageID; > const bool m_isAutoconverting; > }; > >diff --git a/Source/WebKit/Shared/API/Cocoa/RemoteObjectRegistry.mm b/Source/WebKit/Shared/API/Cocoa/RemoteObjectRegistry.mm >index 1cb9e6c7d41..fe5b93871e6 100644 >--- a/Source/WebKit/Shared/API/Cocoa/RemoteObjectRegistry.mm >+++ b/Source/WebKit/Shared/API/Cocoa/RemoteObjectRegistry.mm >@@ -44,7 +44,7 @@ RemoteObjectRegistry::RemoteObjectRegistry(_WKRemoteObjectRegistry *remoteObject > , m_messageSender(page) > , m_takeBackgroundActivityToken([] { return ProcessThrottler::BackgroundActivityToken(); }) > , m_isRegisteredAsMessageReceiver(true) >- , m_messageReceiverID(page.pageID()) >+ , m_messageReceiverID(page.pageID().toUInt64()) > { > WebProcess::singleton().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), m_messageReceiverID, *this); > page.setRemoteObjectRegistry(*this); >diff --git a/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm b/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm >index 58cb1dd2b5e..7e97f176c08 100644 >--- a/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm >+++ b/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandle.mm >@@ -28,7 +28,7 @@ > > @implementation WKBrowsingContextHandle > >-- (id)_initWithPageID:(uint64_t)pageID >+- (id)_initWithPageID:(WebCore::PageIdentifier)pageID > { > if (!(self = [super init])) > return nil; >@@ -40,7 +40,7 @@ - (id)_initWithPageID:(uint64_t)pageID > > - (NSUInteger)hash > { >- return _pageID; >+ return _pageID.toUInt64(); > } > > - (BOOL)isEqual:(id)object >@@ -53,7 +53,7 @@ - (BOOL)isEqual:(id)object > > - (void)encodeWithCoder:(NSCoder *)coder > { >- [coder encodeInt64:_pageID forKey:@"pageID"]; >+ [coder encodeInt64:_pageID.toUInt64() forKey:@"pageID"]; > } > > - (id)initWithCoder:(NSCoder *)coder >@@ -61,7 +61,7 @@ - (id)initWithCoder:(NSCoder *)coder > if (!(self = [super init])) > return nil; > >- _pageID = [coder decodeInt64ForKey:@"pageID"]; >+ _pageID = makeObjectIdentifier<WebCore::PageIdentifierType>([coder decodeInt64ForKey:@"pageID"]); > > return self; > } >diff --git a/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h b/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h >index 2a9e646281a..43e41e24cd3 100644 >--- a/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h >+++ b/Source/WebKit/Shared/API/Cocoa/WKBrowsingContextHandleInternal.h >@@ -24,11 +24,12 @@ > */ > > #import "WKBrowsingContextHandle.h" >+#import <WebCore/PageIdentifier.h> > > @interface WKBrowsingContextHandle () > >-@property (nonatomic, readonly, getter = _pageID) uint64_t pageID; >+@property (nonatomic, readonly, getter=_pageID) WebCore::PageIdentifier pageID; > >-- (id)_initWithPageID:(uint64_t)pageID; >+- (id)_initWithPageID:(WebCore::PageIdentifier)pageID; > > @end >diff --git a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp >index eb8a0b6617a..d4e1c250081 100644 >--- a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp >+++ b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp >@@ -66,7 +66,7 @@ IPC::Connection* WebPaymentCoordinatorProxy::messageSenderConnection() const > > uint64_t WebPaymentCoordinatorProxy::messageSenderDestinationID() const > { >- return *m_destinationID; >+ return m_destinationID->toUInt64(); > } > > void WebPaymentCoordinatorProxy::canMakePayments(CompletionHandler<void(bool)>&& reply) >@@ -84,7 +84,7 @@ void WebPaymentCoordinatorProxy::openPaymentSetup(const String& merchantIdentifi > platformOpenPaymentSetup(merchantIdentifier, domainName, WTFMove(completionHandler)); > } > >-void WebPaymentCoordinatorProxy::showPaymentUI(uint64_t destinationID, PAL::SessionID sessionID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& paymentRequest, CompletionHandler<void(bool)>&& completionHandler) >+void WebPaymentCoordinatorProxy::showPaymentUI(WebCore::PageIdentifier destinationID, PAL::SessionID sessionID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& paymentRequest, CompletionHandler<void(bool)>&& completionHandler) > { > if (auto& coordinator = activePaymentCoordinatorProxy()) > coordinator->didCancelPaymentSession(); >diff --git a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h >index d237eab3dab..6e4a85cf2e2 100644 >--- a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h >+++ b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h >@@ -30,6 +30,7 @@ > #include "MessageReceiver.h" > #include "MessageSender.h" > #include "PaymentAuthorizationPresenter.h" >+#include <WebCore/PageIdentifier.h> > #include <WebCore/PaymentHeaders.h> > #include <wtf/Forward.h> > #include <wtf/RetainPtr.h> >@@ -115,7 +116,7 @@ private: > void canMakePayments(CompletionHandler<void(bool)>&&); > void canMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, PAL::SessionID, CompletionHandler<void(bool)>&&); > void openPaymentSetup(const String& merchantIdentifier, const String& domainName, CompletionHandler<void(bool)>&&); >- void showPaymentUI(uint64_t destinationID, PAL::SessionID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&); >+ void showPaymentUI(WebCore::PageIdentifier destinationID, PAL::SessionID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&); > void completeMerchantValidation(const WebCore::PaymentMerchantSession&); > void completeShippingMethodSelection(const Optional<WebCore::ShippingMethodUpdate>&); > void completeShippingContactSelection(const Optional<WebCore::ShippingContactUpdate>&); >@@ -147,7 +148,7 @@ private: > #endif > > Client& m_client; >- Optional<uint64_t> m_destinationID; >+ Optional<WebCore::PageIdentifier> m_destinationID; > > enum class State { > // Idle - Nothing's happening. >diff --git a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in >index dd313127bf4..1de4cddce4b 100644 >--- a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in >+++ b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in >@@ -30,7 +30,7 @@ messages -> WebPaymentCoordinatorProxy { > CanMakePaymentsWithActiveCard(String merchantIdentifier, String domainName, PAL::SessionID sessionID) -> (bool canMakePayments) Async > OpenPaymentSetup(String merchantIdentifier, String domainName) -> (bool result) Async > >- ShowPaymentUI(uint64_t destinationID, PAL::SessionID sessionID, String originatingURLString, Vector<String> linkIconURLStrings, WebCore::ApplePaySessionPaymentRequest paymentRequest) -> (bool result) Synchronous >+ ShowPaymentUI(WebCore::PageIdentifier destinationID, PAL::SessionID sessionID, String originatingURLString, Vector<String> linkIconURLStrings, WebCore::ApplePaySessionPaymentRequest paymentRequest) -> (bool result) Synchronous > CompleteMerchantValidation(WebCore::PaymentMerchantSession paymentMerchantSession) > CompleteShippingMethodSelection(Optional<WebCore::ShippingMethodUpdate> update) > CompleteShippingContactSelection(Optional<WebCore::ShippingContactUpdate> update) >diff --git a/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp b/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp >index 6eb335f07d3..9deb76ff132 100644 >--- a/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp >+++ b/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp >@@ -75,7 +75,7 @@ uint64_t AuthenticationManager::addChallengeToChallengeMap(Challenge&& challenge > return challengeID; > } > >-bool AuthenticationManager::shouldCoalesceChallenge(uint64_t pageID, uint64_t challengeID, const AuthenticationChallenge& challenge) const >+bool AuthenticationManager::shouldCoalesceChallenge(PageIdentifier pageID, uint64_t challengeID, const AuthenticationChallenge& challenge) const > { > if (!canCoalesceChallenge(challenge)) > return false; >@@ -108,7 +108,7 @@ Vector<uint64_t> AuthenticationManager::coalesceChallengesMatching(uint64_t chal > return challengesToCoalesce; > } > >-void AuthenticationManager::didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler) >+void AuthenticationManager::didReceiveAuthenticationChallenge(PageIdentifier pageID, uint64_t frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler) > { > ASSERT(pageID); > ASSERT(frameID); >@@ -124,7 +124,7 @@ void AuthenticationManager::didReceiveAuthenticationChallenge(uint64_t pageID, u > > void AuthenticationManager::didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler) > { >- uint64_t dummyPageID = 0; >+ PageIdentifier dummyPageID; > uint64_t challengeID = addChallengeToChallengeMap({ dummyPageID, authenticationChallenge, WTFMove(completionHandler) }); > > // Coalesce challenges in the same protection space and in the same page. >diff --git a/Source/WebKit/Shared/Authentication/AuthenticationManager.h b/Source/WebKit/Shared/Authentication/AuthenticationManager.h >index 7fe399e0b7e..86e744c108d 100644 >--- a/Source/WebKit/Shared/Authentication/AuthenticationManager.h >+++ b/Source/WebKit/Shared/Authentication/AuthenticationManager.h >@@ -29,6 +29,7 @@ > #include "NetworkProcessSupplement.h" > #include "WebProcessSupplement.h" > #include <WebCore/AuthenticationChallenge.h> >+#include <WebCore/PageIdentifier.h> > #include <wtf/CompletionHandler.h> > #include <wtf/Forward.h> > #include <wtf/HashMap.h> >@@ -60,7 +61,7 @@ public: > > static const char* supplementName(); > >- void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); >+ void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, uint64_t frameID, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); > void didReceiveAuthenticationChallenge(IPC::MessageSender& download, const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); > > void completeAuthenticationChallenge(uint64_t challengeID, AuthenticationChallengeDisposition, WebCore::Credential&&); >@@ -69,7 +70,7 @@ public: > > private: > struct Challenge { >- uint64_t pageID; >+ WebCore::PageIdentifier pageID; > WebCore::AuthenticationChallenge challenge; > ChallengeCompletionHandler completionHandler; > }; >@@ -83,7 +84,7 @@ private: > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; > > uint64_t addChallengeToChallengeMap(Challenge&&); >- bool shouldCoalesceChallenge(uint64_t pageID, uint64_t challengeID, const WebCore::AuthenticationChallenge&) const; >+ bool shouldCoalesceChallenge(WebCore::PageIdentifier, uint64_t challengeID, const WebCore::AuthenticationChallenge&) const; > > Vector<uint64_t> coalesceChallengesMatching(uint64_t challengeID) const; > >diff --git a/Source/WebKit/Shared/AuxiliaryProcess.h b/Source/WebKit/Shared/AuxiliaryProcess.h >index 32b0a475dc2..19253e2bab6 100644 >--- a/Source/WebKit/Shared/AuxiliaryProcess.h >+++ b/Source/WebKit/Shared/AuxiliaryProcess.h >@@ -62,6 +62,18 @@ public: > void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); > void removeMessageReceiver(IPC::StringReference messageReceiverName); > void removeMessageReceiver(IPC::MessageReceiver&); >+ >+ template <typename T> >+ void addMessageReceiver(IPC::StringReference messageReceiverName, ObjectIdentifier<T> destinationID, IPC::MessageReceiver& receiver) >+ { >+ addMessageReceiver(messageReceiverName, destinationID.toUInt64(), receiver); >+ } >+ >+ template <typename T> >+ void removeMessageReceiver(IPC::StringReference messageReceiverName, ObjectIdentifier<T> destinationID) >+ { >+ removeMessageReceiver(messageReceiverName, destinationID.toUInt64()); >+ } > > void setProcessSuppressionEnabled(bool); > >diff --git a/Source/WebKit/Shared/TextInputContext.h b/Source/WebKit/Shared/TextInputContext.h >index 4f75fd806f6..54d4277b853 100644 >--- a/Source/WebKit/Shared/TextInputContext.h >+++ b/Source/WebKit/Shared/TextInputContext.h >@@ -29,13 +29,14 @@ > #include <WebCore/DocumentIdentifier.h> > #include <WebCore/ElementIdentifier.h> > #include <WebCore/FloatRect.h> >+#include <WebCore/PageIdentifier.h> > > namespace WebKit { > > struct TextInputContext { > WebCore::FloatRect boundingRect; > >- uint64_t webPageIdentifier; >+ WebCore::PageIdentifier webPageIdentifier; > WebCore::DocumentIdentifier documentIdentifier; > WebCore::ElementIdentifier elementIdentifier; > >diff --git a/Source/WebKit/Shared/WebBackForwardListItem.cpp b/Source/WebKit/Shared/WebBackForwardListItem.cpp >index 9dbb36a4553..d900a16733a 100644 >--- a/Source/WebKit/Shared/WebBackForwardListItem.cpp >+++ b/Source/WebKit/Shared/WebBackForwardListItem.cpp >@@ -35,12 +35,12 @@ > namespace WebKit { > using namespace WebCore; > >-Ref<WebBackForwardListItem> WebBackForwardListItem::create(BackForwardListItemState&& backForwardListItemState, uint64_t pageID) >+Ref<WebBackForwardListItem> WebBackForwardListItem::create(BackForwardListItemState&& backForwardListItemState, PageIdentifier pageID) > { > return adoptRef(*new WebBackForwardListItem(WTFMove(backForwardListItemState), pageID)); > } > >-WebBackForwardListItem::WebBackForwardListItem(BackForwardListItemState&& backForwardListItemState, uint64_t pageID) >+WebBackForwardListItem::WebBackForwardListItem(BackForwardListItemState&& backForwardListItemState, PageIdentifier pageID) > : m_itemState(WTFMove(backForwardListItemState)) > , m_pageID(pageID) > , m_lastProcessIdentifier(m_itemState.identifier.processIdentifier) >diff --git a/Source/WebKit/Shared/WebBackForwardListItem.h b/Source/WebKit/Shared/WebBackForwardListItem.h >index 872ef18095d..ba34480cd5f 100644 >--- a/Source/WebKit/Shared/WebBackForwardListItem.h >+++ b/Source/WebKit/Shared/WebBackForwardListItem.h >@@ -27,6 +27,7 @@ > > #include "APIObject.h" > #include "SessionState.h" >+#include <WebCore/PageIdentifier.h> > #include <wtf/Ref.h> > #include <wtf/WeakPtr.h> > #include <wtf/text/WTFString.h> >@@ -46,7 +47,7 @@ class SuspendedPageProxy; > > class WebBackForwardListItem : public API::ObjectImpl<API::Object::Type::BackForwardListItem> { > public: >- static Ref<WebBackForwardListItem> create(BackForwardListItemState&&, uint64_t pageID); >+ static Ref<WebBackForwardListItem> create(BackForwardListItemState&&, WebCore::PageIdentifier); > virtual ~WebBackForwardListItem(); > > static WebBackForwardListItem* itemForID(const WebCore::BackForwardItemIdentifier&); >@@ -54,7 +55,7 @@ public: > > const WebCore::BackForwardItemIdentifier& itemID() const { return m_itemState.identifier; } > const BackForwardListItemState& itemState() { return m_itemState; } >- uint64_t pageID() const { return m_pageID; } >+ WebCore::PageIdentifier pageID() const { return m_pageID; } > > WebCore::ProcessIdentifier lastProcessIdentifier() const { return m_lastProcessIdentifier; } > void setLastProcessIdentifier(const WebCore::ProcessIdentifier& identifier) { m_lastProcessIdentifier = identifier; } >@@ -81,12 +82,12 @@ public: > #endif > > private: >- explicit WebBackForwardListItem(BackForwardListItemState&&, uint64_t pageID); >+ explicit WebBackForwardListItem(BackForwardListItemState&&, WebCore::PageIdentifier); > > void removeSuspendedPageFromProcessPool(); > > BackForwardListItemState m_itemState; >- uint64_t m_pageID; >+ WebCore::PageIdentifier m_pageID; > WebCore::ProcessIdentifier m_lastProcessIdentifier; > WeakPtr<SuspendedPageProxy> m_suspendedPage; > }; >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp >index e9da60aeebe..0cbfd0346aa 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp >+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp >@@ -392,7 +392,7 @@ Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decod > return WTF::nullopt; > parameters.backgroundColor = WTFMove(*backgroundColor); > >- Optional<Optional<uint64_t>> oldPageID; >+ Optional<Optional<PageIdentifier>> oldPageID; > decoder >> oldPageID; > if (!oldPageID) > return WTF::nullopt; >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h >index c2be84146b3..90127bc3103 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.h >+++ b/Source/WebKit/Shared/WebPageCreationParameters.h >@@ -39,6 +39,7 @@ > #include <WebCore/IntSize.h> > #include <WebCore/LayoutMilestone.h> > #include <WebCore/MediaProducer.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/Pagination.h> > #include <WebCore/ScrollTypes.h> > #include <WebCore/UserInterfaceLayoutDirection.h> >@@ -202,7 +203,7 @@ struct WebPageCreationParameters { > > Optional<WebCore::Color> backgroundColor; > >- Optional<uint64_t> oldPageID; >+ Optional<WebCore::PageIdentifier> oldPageID; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/Shared/mac/ObjCObjectGraph.mm b/Source/WebKit/Shared/mac/ObjCObjectGraph.mm >index c65484f5512..711a2619875 100644 >--- a/Source/WebKit/Shared/mac/ObjCObjectGraph.mm >+++ b/Source/WebKit/Shared/mac/ObjCObjectGraph.mm >@@ -302,7 +302,7 @@ bool ObjCObjectGraph::decode(IPC::Decoder& decoder, RetainPtr<id>& result) > if (!decoder.decode(pageID)) > return false; > >- result = adoptNS([[WKBrowsingContextHandle alloc] _initWithPageID:pageID]); >+ result = adoptNS([[WKBrowsingContextHandle alloc] _initWithPageID:makeObjectIdentifier<WebCore::PageIdentifierType>(pageID)]); > break; > } > >diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp >index ed86358201b..59701a13438 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp >@@ -1206,7 +1206,7 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase* > milestones.add(WebCore::DidFirstVisuallyNonEmptyLayout); > > if (milestones) >- webPageProxy->process().send(Messages::WebPage::ListenForLayoutMilestones(milestones), webPageProxy->pageID()); >+ webPageProxy->send(Messages::WebPage::ListenForLayoutMilestones(milestones)); > > webPageProxy->setLoaderClient(WTFMove(loaderClient)); > } >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >index 1075781af2c..2f9cfe94240 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp >@@ -54,6 +54,7 @@ > namespace WebKit { > > using namespace Inspector; >+using namespace WebCore; > > String AutomationCommandError::toProtocolString() > { >@@ -522,7 +523,7 @@ void WebAutomationSession::waitForNavigationToCompleteOnFrame(WebFrameProxy& fra > } > } > >-void WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout(HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>>& map) >+void WebAutomationSession::respondToPendingPageNavigationCallbacksWithTimeout(HashMap<PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>>& map) > { > Inspector::ErrorString timeoutError = STRING_FOR_PREDEFINED_ERROR_NAME(Timeout); > for (auto id : copyToVector(map.keys())) { >diff --git a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h >index 65eb3e46e5b..f39c061b578 100644 >--- a/Source/WebKit/UIProcess/Automation/WebAutomationSession.h >+++ b/Source/WebKit/UIProcess/Automation/WebAutomationSession.h >@@ -34,6 +34,7 @@ > #include "ShareableBitmap.h" > #include "SimulatedInputDispatcher.h" > #include "WebEvent.h" >+#include <WebCore/PageIdentifier.h> > #include <wtf/CompletionHandler.h> > #include <wtf/Forward.h> > #include <wtf/RunLoop.h> >@@ -225,7 +226,7 @@ private: > > void waitForNavigationToCompleteOnPage(WebPageProxy&, Inspector::Protocol::Automation::PageLoadStrategy, Seconds, Ref<Inspector::BackendDispatcher::CallbackBase>&&); > void waitForNavigationToCompleteOnFrame(WebFrameProxy&, Inspector::Protocol::Automation::PageLoadStrategy, Seconds, Ref<Inspector::BackendDispatcher::CallbackBase>&&); >- void respondToPendingPageNavigationCallbacksWithTimeout(HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>>&); >+ void respondToPendingPageNavigationCallbacksWithTimeout(HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>>&); > void respondToPendingFrameNavigationCallbacksWithTimeout(HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>>&); > void loadTimerFired(); > >@@ -280,22 +281,22 @@ private: > Ref<Inspector::AutomationBackendDispatcher> m_domainDispatcher; > std::unique_ptr<Inspector::AutomationFrontendDispatcher> m_domainNotifier; > >- HashMap<uint64_t, String> m_webPageHandleMap; >- HashMap<String, uint64_t> m_handleWebPageMap; >+ HashMap<WebCore::PageIdentifier, String> m_webPageHandleMap; >+ HashMap<String, WebCore::PageIdentifier> m_handleWebPageMap; > > HashMap<uint64_t, String> m_webFrameHandleMap; > HashMap<String, uint64_t> m_handleWebFrameMap; > >- HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingNormalNavigationInBrowsingContextCallbacksPerPage; >- HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingEagerNavigationInBrowsingContextCallbacksPerPage; >+ HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingNormalNavigationInBrowsingContextCallbacksPerPage; >+ HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingEagerNavigationInBrowsingContextCallbacksPerPage; > HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingNormalNavigationInBrowsingContextCallbacksPerFrame; > HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingEagerNavigationInBrowsingContextCallbacksPerFrame; >- HashMap<uint64_t, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingInspectorCallbacksPerPage; >+ HashMap<WebCore::PageIdentifier, RefPtr<Inspector::BackendDispatcher::CallbackBase>> m_pendingInspectorCallbacksPerPage; > #if ENABLE(WEBDRIVER_KEYBOARD_INTERACTIONS) >- HashMap<uint64_t, Function<void(Optional<AutomationCommandError>)>> m_pendingKeyboardEventsFlushedCallbacksPerPage; >+ HashMap<WebCore::PageIdentifier, Function<void(Optional<AutomationCommandError>)>> m_pendingKeyboardEventsFlushedCallbacksPerPage; > #endif > #if ENABLE(WEBDRIVER_MOUSE_INTERACTIONS) >- HashMap<uint64_t, Function<void(Optional<AutomationCommandError>)>> m_pendingMouseEventsFlushedCallbacksPerPage; >+ HashMap<WebCore::PageIdentifier, Function<void(Optional<AutomationCommandError>)>> m_pendingMouseEventsFlushedCallbacksPerPage; > #endif > > uint64_t m_nextEvaluateJavaScriptCallbackID { 1 }; >@@ -319,7 +320,7 @@ private: > // SimulatedInputDispatcher APIs take a set of input sources. We also intern these > // so that previous input source state is used as initial state for later commands. > HashSet<Ref<SimulatedInputSource>> m_inputSources; >- HashMap<uint64_t, Ref<SimulatedInputDispatcher>> m_inputDispatchersByPage; >+ HashMap<WebCore::PageIdentifier, Ref<SimulatedInputDispatcher>> m_inputDispatchersByPage; > #endif > #if ENABLE(WEBDRIVER_KEYBOARD_INTERACTIONS) > // Keep track of currently active modifiers across multiple keystrokes. >diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >index 9893d398b57..858a5bed6d6 100644 >--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >@@ -67,6 +67,18 @@ public: > void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); > void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); > void removeMessageReceiver(IPC::StringReference messageReceiverName); >+ >+ template <typename T> >+ void addMessageReceiver(IPC::StringReference messageReceiverName, ObjectIdentifier<T> destinationID, IPC::MessageReceiver& receiver) >+ { >+ addMessageReceiver(messageReceiverName, destinationID.toUInt64(), receiver); >+ } >+ >+ template <typename T> >+ void removeMessageReceiver(IPC::StringReference messageReceiverName, ObjectIdentifier<T> destinationID) >+ { >+ removeMessageReceiver(messageReceiverName, destinationID.toUInt64()); >+ } > > enum class State { > Launching, >diff --git a/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm b/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm >index f05d79c0d01..67065976861 100644 >--- a/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm >+++ b/Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm >@@ -527,94 +527,94 @@ void PlaybackSessionManagerProxy::handleControlledElementIDResponse(uint64_t con > > void PlaybackSessionManagerProxy::play(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::Play(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::Play(contextId)); > } > > void PlaybackSessionManagerProxy::pause(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::Pause(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::Pause(contextId)); > } > > void PlaybackSessionManagerProxy::togglePlayState(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::TogglePlayState(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::TogglePlayState(contextId)); > } > > void PlaybackSessionManagerProxy::beginScrubbing(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::BeginScrubbing(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::BeginScrubbing(contextId)); > } > > void PlaybackSessionManagerProxy::endScrubbing(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::EndScrubbing(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::EndScrubbing(contextId)); > } > > void PlaybackSessionManagerProxy::seekToTime(uint64_t contextId, double time, double toleranceBefore, double toleranceAfter) > { >- m_page->send(Messages::PlaybackSessionManager::SeekToTime(contextId, time, toleranceBefore, toleranceAfter), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::SeekToTime(contextId, time, toleranceBefore, toleranceAfter)); > } > > void PlaybackSessionManagerProxy::fastSeek(uint64_t contextId, double time) > { >- m_page->send(Messages::PlaybackSessionManager::FastSeek(contextId, time), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::FastSeek(contextId, time)); > } > > void PlaybackSessionManagerProxy::beginScanningForward(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::BeginScanningForward(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::BeginScanningForward(contextId)); > } > > void PlaybackSessionManagerProxy::beginScanningBackward(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::BeginScanningBackward(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::BeginScanningBackward(contextId)); > } > > void PlaybackSessionManagerProxy::endScanning(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::EndScanning(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::EndScanning(contextId)); > } > > void PlaybackSessionManagerProxy::selectAudioMediaOption(uint64_t contextId, uint64_t index) > { >- m_page->send(Messages::PlaybackSessionManager::SelectAudioMediaOption(contextId, index), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::SelectAudioMediaOption(contextId, index)); > } > > void PlaybackSessionManagerProxy::selectLegibleMediaOption(uint64_t contextId, uint64_t index) > { >- m_page->send(Messages::PlaybackSessionManager::SelectLegibleMediaOption(contextId, index), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::SelectLegibleMediaOption(contextId, index)); > } > > void PlaybackSessionManagerProxy::togglePictureInPicture(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::TogglePictureInPicture(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::TogglePictureInPicture(contextId)); > } > > void PlaybackSessionManagerProxy::toggleMuted(uint64_t contextId) > { >- m_page->send(Messages::PlaybackSessionManager::ToggleMuted(contextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::ToggleMuted(contextId)); > } > > void PlaybackSessionManagerProxy::setMuted(uint64_t contextId, bool muted) > { >- m_page->send(Messages::PlaybackSessionManager::SetMuted(contextId, muted), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::SetMuted(contextId, muted)); > } > > void PlaybackSessionManagerProxy::setVolume(uint64_t contextId, double volume) > { >- m_page->send(Messages::PlaybackSessionManager::SetVolume(contextId, volume), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::SetVolume(contextId, volume)); > } > > void PlaybackSessionManagerProxy::setPlayingOnSecondScreen(uint64_t contextId, bool value) > { > if (m_page) >- m_page->send(Messages::PlaybackSessionManager::SetPlayingOnSecondScreen(contextId, value), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::SetPlayingOnSecondScreen(contextId, value)); > } > > void PlaybackSessionManagerProxy::requestControlledElementID() > { > if (m_controlsManagerContextId) >- m_page->send(Messages::PlaybackSessionManager::HandleControlledElementIDRequest(m_controlsManagerContextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManager::HandleControlledElementIDRequest(m_controlsManagerContextId)); > } > > PlatformPlaybackSessionInterface* PlaybackSessionManagerProxy::controlsManagerInterface() >diff --git a/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm b/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm >index 6ba479e060a..c8d65c362aa 100644 >--- a/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm >+++ b/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm >@@ -620,43 +620,43 @@ void VideoFullscreenManagerProxy::preparedToExitFullscreen(uint64_t contextId) > > void VideoFullscreenManagerProxy::requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode, bool finishedWithMedia) > { >- m_page->send(Messages::VideoFullscreenManager::RequestFullscreenMode(contextId, mode, finishedWithMedia), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::RequestFullscreenMode(contextId, mode, finishedWithMedia)); > } > > void VideoFullscreenManagerProxy::requestUpdateInlineRect(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::RequestUpdateInlineRect(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::RequestUpdateInlineRect(contextId)); > } > > void VideoFullscreenManagerProxy::requestVideoContentLayer(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::RequestVideoContentLayer(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::RequestVideoContentLayer(contextId)); > } > > void VideoFullscreenManagerProxy::returnVideoContentLayer(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::ReturnVideoContentLayer(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::ReturnVideoContentLayer(contextId)); > } > > void VideoFullscreenManagerProxy::didSetupFullscreen(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::DidSetupFullscreen(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::DidSetupFullscreen(contextId)); > } > > void VideoFullscreenManagerProxy::willExitFullscreen(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::WillExitFullscreen(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::WillExitFullscreen(contextId)); > } > > void VideoFullscreenManagerProxy::didExitFullscreen(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::DidExitFullscreen(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::DidExitFullscreen(contextId)); > m_page->didExitFullscreen(); > } > > void VideoFullscreenManagerProxy::didEnterFullscreen(uint64_t contextId) > { >- m_page->send(Messages::VideoFullscreenManager::DidEnterFullscreen(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::DidEnterFullscreen(contextId)); > m_page->didEnterFullscreen(); > } > >@@ -670,7 +670,7 @@ void VideoFullscreenManagerProxy::didCleanupFullscreen(uint64_t contextId) > [CATransaction flush]; > [model->layerHostView() removeFromSuperview]; > model->setLayerHostView(nullptr); >- m_page->send(Messages::VideoFullscreenManager::DidCleanupFullscreen(contextId), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::DidCleanupFullscreen(contextId)); > > interface->setMode(HTMLMediaElementEnums::VideoFullscreenModeNone); > removeClientForContext(contextId); >@@ -688,25 +688,25 @@ void VideoFullscreenManagerProxy::setVideoLayerFrame(uint64_t contextId, WebCore > mach_port_name_t fencePort = fenceSendRight.leakSendRight(); > #endif > >- m_page->send(Messages::VideoFullscreenManager::SetVideoLayerFrameFenced(contextId, frame, IPC::Attachment(fencePort, MACH_MSG_TYPE_MOVE_SEND)), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::SetVideoLayerFrameFenced(contextId, frame, IPC::Attachment(fencePort, MACH_MSG_TYPE_MOVE_SEND))); > } > } > > void VideoFullscreenManagerProxy::setVideoLayerGravity(uint64_t contextId, WebCore::MediaPlayerEnums::VideoGravity gravity) > { >- m_page->send(Messages::VideoFullscreenManager::SetVideoLayerGravityEnum(contextId, (unsigned)gravity), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::SetVideoLayerGravityEnum(contextId, (unsigned)gravity)); > } > > void VideoFullscreenManagerProxy::fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode mode) > { > m_page->uiClient().hasVideoInPictureInPictureDidChange(m_page, mode & MediaPlayerEnums::VideoFullscreenModePictureInPicture); >- m_page->send(Messages::VideoFullscreenManager::FullscreenModeChanged(contextId, mode), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::FullscreenModeChanged(contextId, mode)); > } > > void VideoFullscreenManagerProxy::fullscreenMayReturnToInline(uint64_t contextId) > { > bool isViewVisible = m_page->isViewVisible(); >- m_page->send(Messages::VideoFullscreenManager::FullscreenMayReturnToInline(contextId, isViewVisible), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManager::FullscreenMayReturnToInline(contextId, isViewVisible)); > } > > #endif >diff --git a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >index f9146811c55..fc3efbe26bd 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm >@@ -202,7 +202,7 @@ void WebPageProxy::performDictionaryLookupAtLocation(const WebCore::FloatPoint& > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::PerformDictionaryLookupAtLocation(point), m_pageID); >+ send(Messages::WebPage::PerformDictionaryLookupAtLocation(point)); > } > > void WebPageProxy::performDictionaryLookupOfCurrentSelection() >@@ -210,7 +210,7 @@ void WebPageProxy::performDictionaryLookupOfCurrentSelection() > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::PerformDictionaryLookupOfCurrentSelection(), m_pageID); >+ send(Messages::WebPage::PerformDictionaryLookupOfCurrentSelection()); > } > > #if ENABLE(APPLE_PAY) >@@ -266,17 +266,17 @@ void WebPageProxy::didResumeSpeaking(WebCore::PlatformSpeechSynthesisUtterance&) > > void WebPageProxy::speakingErrorOccurred(WebCore::PlatformSpeechSynthesisUtterance&) > { >- process().send(Messages::WebPage::SpeakingErrorOccurred(), m_pageID); >+ send(Messages::WebPage::SpeakingErrorOccurred()); > } > > void WebPageProxy::boundaryEventOccurred(WebCore::PlatformSpeechSynthesisUtterance&, WebCore::SpeechBoundary speechBoundary, unsigned charIndex) > { >- process().send(Messages::WebPage::BoundaryEventOccurred(speechBoundary == WebCore::SpeechBoundary::SpeechWordBoundary, charIndex), m_pageID); >+ send(Messages::WebPage::BoundaryEventOccurred(speechBoundary == WebCore::SpeechBoundary::SpeechWordBoundary, charIndex)); > } > > void WebPageProxy::voicesDidChange() > { >- process().send(Messages::WebPage::VoicesDidChange(), m_pageID); >+ send(Messages::WebPage::VoicesDidChange()); > } > #endif // ENABLE(SPEECH_SYNTHESIS) > >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 2aa748f004f..08a3d308d3a 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -1997,13 +1997,13 @@ float WebViewImpl::intrinsicDeviceScaleFactor() const > > void WebViewImpl::windowDidOrderOffScreen() > { >- LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidOrderOffScreen", this, m_page->pageID()); >+ LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidOrderOffScreen", this, m_page->pageID().toUInt64()); > m_page->activityStateDidChange({ WebCore::ActivityState::IsVisible, WebCore::ActivityState::WindowIsActive }); > } > > void WebViewImpl::windowDidOrderOnScreen() > { >- LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidOrderOnScreen", this, m_page->pageID()); >+ LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidOrderOnScreen", this, m_page->pageID().toUInt64()); > m_page->activityStateDidChange({ WebCore::ActivityState::IsVisible, WebCore::ActivityState::WindowIsActive }); > } > >@@ -2071,7 +2071,7 @@ void WebViewImpl::windowDidChangeLayerHosting() > > void WebViewImpl::windowDidChangeOcclusionState() > { >- LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidChangeOcclusionState", this, m_page->pageID()); >+ LOG(ActivityState, "WebViewImpl %p (page %llu) windowDidChangeOcclusionState", this, m_page->pageID().toUInt64()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > >@@ -2234,19 +2234,19 @@ void WebViewImpl::viewDidChangeBackingProperties() > > void WebViewImpl::viewDidHide() > { >- LOG(ActivityState, "WebViewImpl %p (page %llu) viewDidHide", this, m_page->pageID()); >+ LOG(ActivityState, "WebViewImpl %p (page %llu) viewDidHide", this, m_page->pageID().toUInt64()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > > void WebViewImpl::viewDidUnhide() > { >- LOG(ActivityState, "WebViewImpl %p (page %llu) viewDidUnhide", this, m_page->pageID()); >+ LOG(ActivityState, "WebViewImpl %p (page %llu) viewDidUnhide", this, m_page->pageID().toUInt64()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > > void WebViewImpl::activeSpaceDidChange() > { >- LOG(ActivityState, "WebViewImpl %p (page %llu) activeSpaceDidChange", this, m_page->pageID()); >+ LOG(ActivityState, "WebViewImpl %p (page %llu) activeSpaceDidChange", this, m_page->pageID().toUInt64()); > m_page->activityStateDidChange(WebCore::ActivityState::IsVisible); > } > >diff --git a/Source/WebKit/UIProcess/DrawingAreaProxy.cpp b/Source/WebKit/UIProcess/DrawingAreaProxy.cpp >index b5b4e0ad221..ecf5da0a910 100644 >--- a/Source/WebKit/UIProcess/DrawingAreaProxy.cpp >+++ b/Source/WebKit/UIProcess/DrawingAreaProxy.cpp >@@ -48,12 +48,12 @@ DrawingAreaProxy::DrawingAreaProxy(DrawingAreaType type, WebPageProxy& webPagePr > , m_viewExposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::viewExposedRectChangedTimerFired) > #endif > { >- process.addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier.toUInt64(), *this); >+ process.addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier, *this); > } > > DrawingAreaProxy::~DrawingAreaProxy() > { >- process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier.toUInt64()); >+ process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier); > } > > bool DrawingAreaProxy::setSize(const IntSize& size, const IntSize& scrollDelta) >diff --git a/Source/WebKit/UIProcess/GeolocationPermissionRequestManagerProxy.cpp b/Source/WebKit/UIProcess/GeolocationPermissionRequestManagerProxy.cpp >index ca7687f6b52..b9301285984 100644 >--- a/Source/WebKit/UIProcess/GeolocationPermissionRequestManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/GeolocationPermissionRequestManagerProxy.cpp >@@ -62,7 +62,7 @@ void GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDe > return; > > #if ENABLE(GEOLOCATION) >- m_page.process().send(Messages::WebPage::DidReceiveGeolocationPermissionDecision(geolocationID, allowed), m_page.pageID()); >+ m_page.send(Messages::WebPage::DidReceiveGeolocationPermissionDecision(geolocationID, allowed)); > #else > UNUSED_PARAM(allowed); > #endif >diff --git a/Source/WebKit/UIProcess/InspectorTargetProxy.cpp b/Source/WebKit/UIProcess/InspectorTargetProxy.cpp >index 62b0729f8a5..0f41020ea78 100644 >--- a/Source/WebKit/UIProcess/InspectorTargetProxy.cpp >+++ b/Source/WebKit/UIProcess/InspectorTargetProxy.cpp >@@ -50,19 +50,19 @@ InspectorTargetProxy::InspectorTargetProxy(WebPageProxy& page, const String& tar > void InspectorTargetProxy::connect(Inspector::FrontendChannel& channel) > { > if (m_page.hasRunningProcess()) >- m_page.process().send(Messages::WebPage::ConnectInspector(identifier(), channel.connectionType()), m_page.pageID()); >+ m_page.send(Messages::WebPage::ConnectInspector(identifier(), channel.connectionType())); > } > > void InspectorTargetProxy::disconnect(Inspector::FrontendChannel&) > { > if (m_page.hasRunningProcess()) >- m_page.process().send(Messages::WebPage::DisconnectInspector(identifier()), m_page.pageID()); >+ m_page.send(Messages::WebPage::DisconnectInspector(identifier())); > } > > void InspectorTargetProxy::sendMessageToTargetBackend(const String& message) > { > if (m_page.hasRunningProcess()) >- m_page.process().send(Messages::WebPage::SendMessageToTargetBackend(identifier(), message), m_page.pageID()); >+ m_page.send(Messages::WebPage::SendMessageToTargetBackend(identifier(), message)); > } > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp b/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp >index 3443b385fac..2d9966e3c83 100644 >--- a/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp >@@ -311,7 +311,7 @@ void NetworkProcessProxy::didCreateNetworkConnectionToWebProcess(const IPC::Atta > #endif > } > >-void NetworkProcessProxy::didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID) >+void NetworkProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, uint64_t frameID, WebCore::AuthenticationChallenge&& coreChallenge, uint64_t challengeID) > { > #if ENABLE(SERVICE_WORKER) > if (auto* serviceWorkerProcessProxy = m_processPool.serviceWorkerProcessProxyFromPageID(pageID)) { >@@ -371,7 +371,7 @@ void NetworkProcessProxy::didFinishLaunching(ProcessLauncher* launcher, IPC::Con > #endif > } > >-void NetworkProcessProxy::logDiagnosticMessage(uint64_t pageID, const String& message, const String& description, WebCore::ShouldSample shouldSample) >+void NetworkProcessProxy::logDiagnosticMessage(PageIdentifier pageID, const String& message, const String& description, WebCore::ShouldSample shouldSample) > { > WebPageProxy* page = WebProcessProxy::webPage(pageID); > // FIXME: We do this null-check because by the time the decision to log is made, the page may be gone. We should refactor to avoid this, >@@ -382,7 +382,7 @@ void NetworkProcessProxy::logDiagnosticMessage(uint64_t pageID, const String& me > page->logDiagnosticMessage(message, description, shouldSample); > } > >-void NetworkProcessProxy::logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result, WebCore::ShouldSample shouldSample) >+void NetworkProcessProxy::logDiagnosticMessageWithResult(PageIdentifier pageID, const String& message, const String& description, uint32_t result, WebCore::ShouldSample shouldSample) > { > WebPageProxy* page = WebProcessProxy::webPage(pageID); > // FIXME: We do this null-check because by the time the decision to log is made, the page may be gone. We should refactor to avoid this, >@@ -393,7 +393,7 @@ void NetworkProcessProxy::logDiagnosticMessageWithResult(uint64_t pageID, const > page->logDiagnosticMessageWithResult(message, description, result, shouldSample); > } > >-void NetworkProcessProxy::logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample shouldSample) >+void NetworkProcessProxy::logDiagnosticMessageWithValue(PageIdentifier pageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample shouldSample) > { > WebPageProxy* page = WebProcessProxy::webPage(pageID); > // FIXME: We do this null-check because by the time the decision to log is made, the page may be gone. We should refactor to avoid this, >@@ -736,7 +736,7 @@ void NetworkProcessProxy::setGrandfathered(PAL::SessionID sessionID, const Regis > sendWithAsyncReply(Messages::NetworkProcess::SetGrandfathered(sessionID, resourceDomain, isGrandfathered), WTFMove(completionHandler)); > } > >-void NetworkProcessProxy::requestStorageAccessConfirm(uint64_t pageID, uint64_t frameID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, CompletionHandler<void(bool)>&& completionHandler) >+void NetworkProcessProxy::requestStorageAccessConfirm(PageIdentifier pageID, uint64_t frameID, const RegistrableDomain& subFrameDomain, const RegistrableDomain& topFrameDomain, CompletionHandler<void(bool)>&& completionHandler) > { > WebPageProxy* page = WebProcessProxy::webPage(pageID); > if (!page) { >@@ -908,7 +908,7 @@ void NetworkProcessProxy::notifyResourceLoadStatisticsTelemetryFinished(unsigned > WebProcessProxy::notifyPageStatisticsTelemetryFinished(API::Dictionary::create(messageBody).ptr()); > } > >-void NetworkProcessProxy::committedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, uint64_t pageID, CompletionHandler<void()>&& completionHandler) >+void NetworkProcessProxy::committedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, PageIdentifier pageID, CompletionHandler<void()>&& completionHandler) > { > if (!canSendMessage()) { > completionHandler(); >diff --git a/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h b/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h >index 20a7998c4dc..2bec68fd897 100644 >--- a/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h >+++ b/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h >@@ -81,8 +81,6 @@ public: > using NavigatedToDomain = WebCore::RegistrableDomain; > using DomainInNeedOfStorageAccess = WebCore::RegistrableDomain; > using OpenerDomain = WebCore::RegistrableDomain; >- using OpenerPageID = uint64_t; >- using PageID = uint64_t; > using FrameID = uint64_t; > > explicit NetworkProcessProxy(WebProcessPool&); >@@ -131,7 +129,7 @@ public: > void setPrevalentResourceForDebugMode(PAL::SessionID, const RegistrableDomain&, CompletionHandler<void()>&&); > void setVeryPrevalentResource(PAL::SessionID, const RegistrableDomain&, CompletionHandler<void()>&&); > void getAllStorageAccessEntries(PAL::SessionID, CompletionHandler<void(Vector<String> domains)>&&); >- void requestStorageAccessConfirm(PageID, FrameID, const SubFrameDomain&, const TopFrameDomain&, CompletionHandler<void(bool)>&&); >+ void requestStorageAccessConfirm(WebCore::PageIdentifier, FrameID, const SubFrameDomain&, const TopFrameDomain&, CompletionHandler<void(bool)>&&); > void resetParametersToDefaultValues(PAL::SessionID, CompletionHandler<void()>&&); > void scheduleClearInMemoryAndPersistent(PAL::SessionID, ShouldGrandfatherStatistics, CompletionHandler<void()>&&); > void scheduleClearInMemoryAndPersistent(PAL::SessionID, Optional<WallTime> modifiedSince, ShouldGrandfatherStatistics, CompletionHandler<void()>&&); >@@ -145,7 +143,7 @@ public: > void setResourceLoadStatisticsDebugMode(PAL::SessionID, bool debugMode, CompletionHandler<void()>&&); > void setShouldClassifyResourcesBeforeDataRecordsRemoval(PAL::SessionID, bool, CompletionHandler<void()>&&); > void resetCacheMaxAgeCapForPrevalentResources(PAL::SessionID, CompletionHandler<void()>&&); >- void committedCrossSiteLoadWithLinkDecoration(PAL::SessionID, const NavigatedFromDomain&, const NavigatedToDomain&, PageID, CompletionHandler<void()>&&); >+ void committedCrossSiteLoadWithLinkDecoration(PAL::SessionID, const NavigatedFromDomain&, const NavigatedToDomain&, WebCore::PageIdentifier, CompletionHandler<void()>&&); > void setCrossSiteLoadWithLinkDecorationForTesting(PAL::SessionID, const NavigatedFromDomain&, const NavigatedToDomain&, CompletionHandler<void()>&&); > void resetCrossSiteLoadsWithLinkDecorationForTesting(PAL::SessionID, CompletionHandler<void()>&&); > void deleteCookiesForTesting(PAL::SessionID, const RegistrableDomain&, bool includeHttpOnlyCookies, CompletionHandler<void()>&&); >@@ -207,13 +205,13 @@ private: > // Message handlers > void didReceiveNetworkProcessProxyMessage(IPC::Connection&, IPC::Decoder&); > void didCreateNetworkConnectionToWebProcess(const IPC::Attachment&); >- void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, WebCore::AuthenticationChallenge&&, uint64_t challengeID); >+ void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, uint64_t frameID, WebCore::AuthenticationChallenge&&, uint64_t challengeID); > void didFetchWebsiteData(uint64_t callbackID, const WebsiteData&); > void didDeleteWebsiteData(uint64_t callbackID); > void didDeleteWebsiteDataForOrigins(uint64_t callbackID); >- void logDiagnosticMessage(uint64_t pageID, const String& message, const String& description, WebCore::ShouldSample); >- void logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result, WebCore::ShouldSample); >- void logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample); >+ void logDiagnosticMessage(WebCore::PageIdentifier, const String& message, const String& description, WebCore::ShouldSample); >+ void logDiagnosticMessageWithResult(WebCore::PageIdentifier, const String& message, const String& description, uint32_t result, WebCore::ShouldSample); >+ void logDiagnosticMessageWithValue(WebCore::PageIdentifier, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample); > void logGlobalDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample); > #if ENABLE(RESOURCE_LOAD_STATISTICS) > void logTestingEvent(PAL::SessionID, const String& event); >diff --git a/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in b/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in >index be98e66630f..22fffd19881 100644 >--- a/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in >+++ b/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in >@@ -23,7 +23,7 @@ > messages -> NetworkProcessProxy LegacyReceiver { > DidCreateNetworkConnectionToWebProcess(IPC::Attachment connectionIdentifier) > >- DidReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID) >+ DidReceiveAuthenticationChallenge(WebCore::PageIdentifier pageID, uint64_t frameID, WebCore::AuthenticationChallenge challenge, uint64_t challengeID) > > DidFetchWebsiteData(uint64_t callbackID, struct WebKit::WebsiteData websiteData) > DidDeleteWebsiteData(uint64_t callbackID) >@@ -35,9 +35,9 @@ messages -> NetworkProcessProxy LegacyReceiver { > SetIsHoldingLockedFiles(bool isHoldingLockedFiles) > > # Diagnostic messages logging >- LogDiagnosticMessage(uint64_t pageID, String message, String description, enum:bool WebCore::ShouldSample shouldSample) >- LogDiagnosticMessageWithResult(uint64_t pageID, String message, String description, uint32_t result, enum:bool WebCore::ShouldSample shouldSample) >- LogDiagnosticMessageWithValue(uint64_t pageID, String message, String description, double value, unsigned significantFigures, enum:bool WebCore::ShouldSample shouldSample) >+ LogDiagnosticMessage(WebCore::PageIdentifier pageID, String message, String description, enum:bool WebCore::ShouldSample shouldSample) >+ LogDiagnosticMessageWithResult(WebCore::PageIdentifier pageID, String message, String description, uint32_t result, enum:bool WebCore::ShouldSample shouldSample) >+ LogDiagnosticMessageWithValue(WebCore::PageIdentifier pageID, String message, String description, double value, unsigned significantFigures, enum:bool WebCore::ShouldSample shouldSample) > LogGlobalDiagnosticMessageWithValue(String message, String description, double value, unsigned significantFigures, enum:bool WebCore::ShouldSample shouldSample) > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >@@ -46,7 +46,7 @@ messages -> NetworkProcessProxy LegacyReceiver { > NotifyWebsiteDataDeletionForRegistrableDomainsFinished() > NotifyWebsiteDataScanForRegistrableDomainsFinished() > NotifyResourceLoadStatisticsTelemetryFinished(unsigned totalPrevalentResources, unsigned totalPrevalentResourcesWithUserInteraction, unsigned top3SubframeUnderTopFrameOrigins) >- RequestStorageAccessConfirm(uint64_t pageID, uint64_t frameID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool userDidGrantAccess) Async >+ RequestStorageAccessConfirm(WebCore::PageIdentifier pageID, uint64_t frameID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool userDidGrantAccess) Async > DeleteWebsiteDataInUIProcessForRegistrableDomains(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> dataTypes, OptionSet<WebKit::WebsiteDataFetchOption> fetchOptions, Vector<WebCore::RegistrableDomain> domains) -> (HashSet<WebCore::RegistrableDomain> domainsWithMatchingDataRecords) Async > #endif > #if ENABLE(CONTENT_EXTENSIONS) >diff --git a/Source/WebKit/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp b/Source/WebKit/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp >index f8761b1f3f4..3f28732ab5e 100644 >--- a/Source/WebKit/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp >@@ -50,7 +50,7 @@ Ref<NotificationPermissionRequest> NotificationPermissionRequestManagerProxy::cr > { > auto request = NotificationPermissionRequest::create([this, notificationID, page = makeRef(m_page)](bool allowed) { > m_pendingRequests.take(notificationID); >- page->process().send(Messages::WebPage::DidReceiveNotificationPermissionDecision(notificationID, allowed), page->pageID()); >+ page->send(Messages::WebPage::DidReceiveNotificationPermissionDecision(notificationID, allowed)); > }); > m_pendingRequests.add(notificationID, request.ptr()); > return request; >diff --git a/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp b/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp >index fae1f3fca88..2aaff1ec2a6 100644 >--- a/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.cpp >@@ -97,7 +97,7 @@ void WebNotificationManagerProxy::show(WebPageProxy* webPage, const String& titl > { > uint64_t globalNotificationID = generateGlobalNotificationID(); > auto notification = WebNotification::create(title, body, iconURL, tag, lang, dir, originString, globalNotificationID); >- std::pair<uint64_t, uint64_t> notificationIDPair = std::make_pair(webPage->pageID(), pageNotificationID); >+ std::pair<PageIdentifier, uint64_t> notificationIDPair = std::make_pair(webPage->pageID(), pageNotificationID); > m_globalNotificationMap.set(globalNotificationID, notificationIDPair); > m_notifications.set(notificationIDPair, std::make_pair(globalNotificationID, notification.copyRef())); > m_provider->show(*webPage, notification.get()); >@@ -119,12 +119,12 @@ void WebNotificationManagerProxy::didDestroyNotification(WebPageProxy* webPage, > } > } > >-static bool pageIDsMatch(uint64_t pageID, uint64_t, uint64_t desiredPageID, const Vector<uint64_t>&) >+static bool pageIDsMatch(PageIdentifier pageID, uint64_t, PageIdentifier desiredPageID, const Vector<uint64_t>&) > { > return pageID == desiredPageID; > } > >-static bool pageAndNotificationIDsMatch(uint64_t pageID, uint64_t pageNotificationID, uint64_t desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs) >+static bool pageAndNotificationIDsMatch(PageIdentifier pageID, uint64_t pageNotificationID, PageIdentifier desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs) > { > return pageID == desiredPageID && desiredPageNotificationIDs.contains(pageNotificationID); > } >@@ -141,13 +141,13 @@ void WebNotificationManagerProxy::clearNotifications(WebPageProxy* webPage, cons > > void WebNotificationManagerProxy::clearNotifications(WebPageProxy* webPage, const Vector<uint64_t>& pageNotificationIDs, NotificationFilterFunction filterFunction) > { >- uint64_t targetPageID = webPage->pageID(); >+ auto targetPageID = webPage->pageID(); > > Vector<uint64_t> globalNotificationIDs; > globalNotificationIDs.reserveCapacity(m_globalNotificationMap.size()); > > for (auto it = m_notifications.begin(), end = m_notifications.end(); it != end; ++it) { >- uint64_t webPageID = it->key.first; >+ auto webPageID = it->key.first; > uint64_t pageNotificationID = it->key.second; > if (!filterFunction(webPageID, pageNotificationID, targetPageID, pageNotificationIDs)) > continue; >@@ -170,7 +170,7 @@ void WebNotificationManagerProxy::providerDidShowNotification(uint64_t globalNot > if (it == m_globalNotificationMap.end()) > return; > >- uint64_t webPageID = it->value.first; >+ auto webPageID = it->value.first; > WebPageProxy* webPage = WebProcessProxy::webPage(webPageID); > if (!webPage) > return; >@@ -185,7 +185,7 @@ void WebNotificationManagerProxy::providerDidClickNotification(uint64_t globalNo > if (it == m_globalNotificationMap.end()) > return; > >- uint64_t webPageID = it->value.first; >+ auto webPageID = it->value.first; > WebPageProxy* webPage = WebProcessProxy::webPage(webPageID); > if (!webPage) > return; >diff --git a/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h b/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h >index f727ed472c5..e78daba6ffb 100644 >--- a/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h >+++ b/Source/WebKit/UIProcess/Notifications/WebNotificationManagerProxy.h >@@ -78,7 +78,7 @@ public: > private: > explicit WebNotificationManagerProxy(WebProcessPool*); > >- typedef bool (*NotificationFilterFunction)(uint64_t pageID, uint64_t pageNotificationID, uint64_t desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs); >+ typedef bool (*NotificationFilterFunction)(WebCore::PageIdentifier pageID, uint64_t pageNotificationID, WebCore::PageIdentifier desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs); > void clearNotifications(WebPageProxy*, const Vector<uint64_t>& pageNotificationIDs, NotificationFilterFunction); > > // WebContextSupplement >@@ -88,9 +88,9 @@ private: > > std::unique_ptr<API::NotificationProvider> m_provider; > // Pair comprised of web page ID and the web process's notification ID >- HashMap<uint64_t, std::pair<uint64_t, uint64_t>> m_globalNotificationMap; >+ HashMap<uint64_t, std::pair<WebCore::PageIdentifier, uint64_t>> m_globalNotificationMap; > // Key pair comprised of web page ID and the web process's notification ID; value pair comprised of global notification ID, and notification object >- HashMap<std::pair<uint64_t, uint64_t>, std::pair<uint64_t, RefPtr<WebNotification>>> m_notifications; >+ HashMap<std::pair<WebCore::PageIdentifier, uint64_t>, std::pair<uint64_t, RefPtr<WebNotification>>> m_notifications; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp >index 45a1f0f5b5c..518893b0842 100644 >--- a/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp >+++ b/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp >@@ -47,6 +47,8 @@ > > namespace WebKit { > >+using namespace WebCore; >+ > #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(m_page.isAlwaysOnLoggingAllowed(), channel, "%p - ProvisionalPageProxy::" fmt, this, ##__VA_ARGS__) > #define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(m_page.isAlwaysOnLoggingAllowed(), channel, "%p - ProvisionalPageProxy::" fmt, this, ##__VA_ARGS__) > >@@ -61,7 +63,7 @@ ProvisionalPageProxy::ProvisionalPageProxy(WebPageProxy& page, Ref<WebProcessPro > , m_suspensionToken(m_process->throttler().foregroundActivityToken()) > #endif > { >- RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "ProvisionalPageProxy: pageID = %" PRIu64 " navigationID = %" PRIu64 " suspendedPage: %p", m_page.pageID(), navigationID, suspendedPage.get()); >+ RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "ProvisionalPageProxy: pageID = %" PRIu64 " navigationID = %" PRIu64 " suspendedPage: %p", m_page.pageID().toUInt64(), navigationID, suspendedPage.get()); > > m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID(), *this); > m_process->addProvisionalPageProxy(*this); >@@ -100,7 +102,7 @@ ProvisionalPageProxy::~ProvisionalPageProxy() > m_process->processPool().pageEndUsingWebsiteDataStore(m_page.pageID(), m_process->websiteDataStore()); > > m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID()); >- m_process->send(Messages::WebPage::Close(), m_page.pageID()); >+ send(Messages::WebPage::Close()); > m_process->removeVisitedLinkStoreUser(m_page.visitedLinkStore(), m_page.pageID()); > > RunLoop::main().dispatch([process = m_process.copyRef()] { >@@ -117,7 +119,7 @@ void ProvisionalPageProxy::connectionWillOpen(IPC::Connection& connection) > > void ProvisionalPageProxy::processDidTerminate() > { >- RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "processDidTerminate: pageID = %" PRIu64, m_page.pageID()); >+ RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "processDidTerminate: pageID = %" PRIu64, m_page.pageID().toUInt64()); > m_page.provisionalProcessDidTerminate(); > } > >@@ -132,7 +134,7 @@ void ProvisionalPageProxy::cancel() > if (m_provisionalLoadURL.isEmpty()) > return; > >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame for pageID = %" PRIu64, m_page.pageID()); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame for pageID = %" PRIu64, m_page.pageID().toUInt64()); > ASSERT(m_mainFrame); > auto error = WebKit::cancelledError(m_request); > error.setType(WebCore::ResourceError::Type::Cancellation); >@@ -151,14 +153,14 @@ void ProvisionalPageProxy::initializeWebPage() > > void ProvisionalPageProxy::loadData(API::Navigation& navigation, const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, Optional<WebsitePoliciesData>&& websitePolicies) > { >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadData: pageID = %" PRIu64, m_page.pageID()); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadData: pageID = %" PRIu64, m_page.pageID().toUInt64()); > > m_page.loadDataWithNavigationShared(m_process.copyRef(), navigation, data, MIMEType, encoding, baseURL, userData, WebCore::ShouldTreatAsContinuingLoad::Yes, WTFMove(websitePolicies)); > } > > void ProvisionalPageProxy::loadRequest(API::Navigation& navigation, WebCore::ResourceRequest&& request, WebCore::ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy, API::Object* userData, Optional<WebsitePoliciesData>&& websitePolicies) > { >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadRequest: pageID = %" PRIu64, m_page.pageID()); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "loadRequest: pageID = %" PRIu64, m_page.pageID().toUInt64()); > > // If this is a client-side redirect continuing in a new process, then the new process will overwrite the fromItem's URL. In this case, > // we need to make sure we update fromItem's processIdentifier as we want future navigations to this BackForward item to happen in the >@@ -171,7 +173,7 @@ void ProvisionalPageProxy::loadRequest(API::Navigation& navigation, WebCore::Res > > void ProvisionalPageProxy::goToBackForwardItem(API::Navigation& navigation, WebBackForwardListItem& item, Optional<WebsitePoliciesData>&& websitePolicies) > { >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "goToBackForwardItem: pageID = %" PRIu64, m_page.pageID()); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "goToBackForwardItem: pageID = %" PRIu64, m_page.pageID().toUInt64()); > > auto itemStates = m_page.backForwardList().filteredItemStates([this, targetItem = &item](auto& item) { > if (auto* page = item.suspendedPage()) { >@@ -180,8 +182,8 @@ void ProvisionalPageProxy::goToBackForwardItem(API::Navigation& navigation, WebB > } > return &item != targetItem; > }); >- m_process->send(Messages::WebPage::UpdateBackForwardListForReattach(WTFMove(itemStates)), m_page.pageID()); >- m_process->send(Messages::WebPage::GoToBackForwardItem(navigation.navigationID(), item.itemID(), *navigation.backForwardFrameLoadType(), WebCore::ShouldTreatAsContinuingLoad::Yes, WTFMove(websitePolicies)), m_page.pageID()); >+ send(Messages::WebPage::UpdateBackForwardListForReattach(WTFMove(itemStates))); >+ send(Messages::WebPage::GoToBackForwardItem(navigation.navigationID(), item.itemID(), *navigation.backForwardFrameLoadType(), WebCore::ShouldTreatAsContinuingLoad::Yes, WTFMove(websitePolicies))); > m_process->responsivenessTimer().start(); > } > >@@ -196,7 +198,7 @@ inline bool ProvisionalPageProxy::validateInput(uint64_t frameID, const Optional > > void ProvisionalPageProxy::didCreateMainFrame(uint64_t frameID) > { >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateMainFrame: pageID = %" PRIu64 ", frameID = %" PRIu64, m_page.pageID(), frameID); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCreateMainFrame: pageID = %" PRIu64 ", frameID = %" PRIu64, m_page.pageID().toUInt64(), frameID); > ASSERT(!m_mainFrame); > > m_mainFrame = WebFrameProxy::create(m_page, frameID); >@@ -234,7 +236,7 @@ void ProvisionalPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, uin > if (!validateInput(frameID, navigationID)) > return; > >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didStartProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID(), frameID, navigationID); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didStartProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID, navigationID); > ASSERT(m_provisionalLoadURL.isNull()); > m_provisionalLoadURL = url; > >@@ -254,7 +256,7 @@ void ProvisionalPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, cons > if (!validateInput(frameID, navigationID)) > return; > >- RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "didFailProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID(), frameID, navigationID); >+ RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "didFailProvisionalLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID, navigationID); > ASSERT(!m_provisionalLoadURL.isNull()); > m_provisionalLoadURL = { }; > >@@ -270,7 +272,7 @@ void ProvisionalPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navi > if (!validateInput(frameID, navigationID)) > return; > >- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCommitLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID(), frameID, navigationID); >+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "didCommitLoadForFrame: pageID = %" PRIu64 ", frameID = %" PRIu64 ", navigationID = %" PRIu64, m_page.pageID().toUInt64(), frameID, navigationID); > m_provisionalLoadURL = { }; > m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID()); > >@@ -295,7 +297,7 @@ void ProvisionalPageProxy::didChangeProvisionalURLForFrame(uint64_t frameID, uin > } > > void ProvisionalPageProxy::decidePolicyForNavigationActionAsync(uint64_t frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier, >- uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, >+ uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, > WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, uint64_t listenerID) > { > if (!validateInput(frameID, navigationID)) >@@ -341,7 +343,7 @@ void ProvisionalPageProxy::backForwardGoToItem(const WebCore::BackForwardItemIde > } > > void ProvisionalPageProxy::decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier identifier, >- uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, uint64_t originatingPageID, >+ uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, > const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, > const UserData& userData, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&& reply) > { >@@ -374,6 +376,16 @@ void ProvisionalPageProxy::registerWebProcessAccessibilityToken(const IPC::DataR > } > #endif > >+IPC::Connection* ProvisionalPageProxy::messageSenderConnection() const >+{ >+ return m_process->connection(); >+} >+ >+uint64_t ProvisionalPageProxy::messageSenderDestinationID() const >+{ >+ return m_page.pageID().toUInt64(); >+} >+ > void ProvisionalPageProxy::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) > { > ASSERT(decoder.messageReceiverName() == Messages::WebPageProxy::messageReceiverName()); >diff --git a/Source/WebKit/UIProcess/ProvisionalPageProxy.h b/Source/WebKit/UIProcess/ProvisionalPageProxy.h >index 6456c1f916d..b863fdd03b1 100644 >--- a/Source/WebKit/UIProcess/ProvisionalPageProxy.h >+++ b/Source/WebKit/UIProcess/ProvisionalPageProxy.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "MessageReceiver.h" >+#include "MessageSender.h" > #include "SandboxExtension.h" > #include "WebFramePolicyListenerProxy.h" > #include "WebPageProxyMessages.h" >@@ -58,7 +59,7 @@ struct NavigationActionData; > struct URLSchemeTaskParameters; > struct WebNavigationDataStore; > >-class ProvisionalPageProxy : public IPC::MessageReceiver, public CanMakeWeakPtr<ProvisionalPageProxy> { >+class ProvisionalPageProxy : private IPC::MessageReceiver, private IPC::MessageSender, public CanMakeWeakPtr<ProvisionalPageProxy> { > WTF_MAKE_FAST_ALLOCATED; > public: > ProvisionalPageProxy(WebPageProxy&, Ref<WebProcessProxy>&&, std::unique_ptr<SuspendedPageProxy>, uint64_t navigationID, bool isServerRedirect, const WebCore::ResourceRequest&, ProcessSwapRequestedByClient); >@@ -92,9 +93,13 @@ private: > // IPC::MessageReceiver > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final; > void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final; >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() const final; >+ uint64_t messageSenderDestinationID() const final; > > void decidePolicyForNavigationActionAsync(uint64_t frameID, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, FrameInfoData&&, >- uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, >+ Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, > WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); > void decidePolicyForResponse(uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, const WebCore::ResourceResponse&, > const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); >@@ -110,7 +115,7 @@ private: > void startURLSchemeTask(URLSchemeTaskParameters&&); > void backForwardGoToItem(const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); > void decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, >- FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, >+ FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, > WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); > #if USE(QUICK_LOOK) > void didRequestPasswordForQuickLookDocumentInMainFrame(const String& fileName); >diff --git a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm >index 0559c9874bd..278ca854f30 100644 >--- a/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm >+++ b/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm >@@ -115,7 +115,7 @@ RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy(WebPageProxy& w > IOSurfacePool::sharedPool().setPoolSize(0); > #endif > >- process.addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_identifier.toUInt64(), *this); >+ process.addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_identifier, *this); > > if (m_webPageProxy.preferences().tiledScrollingIndicatorVisible()) > initializeDebugIndicator(); >@@ -124,7 +124,7 @@ RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy(WebPageProxy& w > RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy() > { > m_callbacks.invalidate(CallbackBase::Error::OwnerWasInvalidated); >- process().removeMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_identifier.toUInt64()); >+ process().removeMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_identifier); > > #if PLATFORM(IOS_FAMILY) > [m_displayLinkHandler invalidate]; >diff --git a/Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp b/Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp >index 6679d45bd99..086aeb0795c 100644 >--- a/Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp >+++ b/Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp >@@ -59,7 +59,7 @@ void RemoteWebInspectorProxy::load(const String& debuggableType, const String& b > m_debuggableType = debuggableType; > m_backendCommandsURL = backendCommandsURL; > >- m_inspectorPage->process().send(Messages::RemoteWebInspectorUI::Initialize(debuggableType, backendCommandsURL), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::RemoteWebInspectorUI::Initialize(debuggableType, backendCommandsURL)); > m_inspectorPage->loadRequest(URL(URL(), WebInspectorProxy::inspectorPageURL())); > } > >@@ -81,7 +81,7 @@ void RemoteWebInspectorProxy::show() > > void RemoteWebInspectorProxy::sendMessageToFrontend(const String& message) > { >- m_inspectorPage->process().send(Messages::RemoteWebInspectorUI::SendMessageToFrontend(message), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::RemoteWebInspectorUI::SendMessageToFrontend(message)); > } > > void RemoteWebInspectorProxy::frontendDidClose() >diff --git a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >index 5a14fbe4dcd..b2f7729fd39 100644 >--- a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp >@@ -90,7 +90,7 @@ void ServiceWorkerProcessProxy::updatePreferencesStore(const WebPreferencesStore > send(Messages::WebSWContextManagerConnection::UpdatePreferencesStore { store }, 0); > } > >-void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, Ref<AuthenticationChallengeProxy>&& challenge) >+void ServiceWorkerProcessProxy::didReceiveAuthenticationChallenge(PageIdentifier pageID, uint64_t frameID, Ref<AuthenticationChallengeProxy>&& challenge) > { > UNUSED_PARAM(pageID); > UNUSED_PARAM(frameID); >diff --git a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h >index 93245f0dc76..e9365afac4f 100644 >--- a/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h >+++ b/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h >@@ -41,14 +41,14 @@ public: > > static bool hasRegisteredServiceWorkers(const String& serviceWorkerDirectory); > >- void didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, Ref<AuthenticationChallengeProxy>&&); >+ void didReceiveAuthenticationChallenge(WebCore::PageIdentifier, uint64_t frameID, Ref<AuthenticationChallengeProxy>&&); > > void start(const WebPreferencesStore&, Optional<PAL::SessionID> initialSessionID); > void setUserAgent(const String&); > void updatePreferencesStore(const WebPreferencesStore&); > > const WebCore::RegistrableDomain& registrableDomain() { return m_registrableDomain; } >- uint64_t pageID() const { return m_serviceWorkerPageID; } >+ WebCore::PageIdentifier pageID() const { return m_serviceWorkerPageID; } > > private: > // AuxiliaryProcessProxy >@@ -59,7 +59,7 @@ private: > ServiceWorkerProcessProxy(WebProcessPool&, const WebCore::RegistrableDomain&, WebsiteDataStore&); > > WebCore::RegistrableDomain m_registrableDomain; >- uint64_t m_serviceWorkerPageID { 0 }; >+ WebCore::PageIdentifier m_serviceWorkerPageID; > }; > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/SuspendedPageProxy.cpp b/Source/WebKit/UIProcess/SuspendedPageProxy.cpp >index 1346fcc05c5..ebe4174cc3c 100644 >--- a/Source/WebKit/UIProcess/SuspendedPageProxy.cpp >+++ b/Source/WebKit/UIProcess/SuspendedPageProxy.cpp >@@ -92,7 +92,7 @@ SuspendedPageProxy::SuspendedPageProxy(WebPageProxy& page, Ref<WebProcessProxy>& > m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_page.pageID(), *this); > > m_suspensionTimeoutTimer.startOneShot(suspensionTimeout); >- m_process->send(Messages::WebPage::SetIsSuspended(true), m_page.pageID()); >+ send(Messages::WebPage::SetIsSuspended(true)); > } > > SuspendedPageProxy::~SuspendedPageProxy() >@@ -147,7 +147,7 @@ void SuspendedPageProxy::unsuspend() > ASSERT(m_suspensionState == SuspensionState::Suspended); > > m_suspensionState = SuspensionState::Resumed; >- m_process->send(Messages::WebPage::SetIsSuspended(false), m_page.pageID()); >+ send(Messages::WebPage::SetIsSuspended(false)); > } > > void SuspendedPageProxy::close() >@@ -159,7 +159,7 @@ void SuspendedPageProxy::close() > > RELEASE_LOG(ProcessSwapping, "%p - SuspendedPageProxy::close()", this); > m_isClosed = true; >- m_process->send(Messages::WebPage::Close(), m_page.pageID()); >+ send(Messages::WebPage::Close()); > } > > void SuspendedPageProxy::pageEnteredAcceleratedCompositingMode() >@@ -242,11 +242,21 @@ void SuspendedPageProxy::didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, > { > } > >+IPC::Connection* SuspendedPageProxy::messageSenderConnection() const >+{ >+ return m_process->connection(); >+} >+ >+uint64_t SuspendedPageProxy::messageSenderDestinationID() const >+{ >+ return m_page.pageID().toUInt64(); >+} >+ > #if !LOG_DISABLED > > const char* SuspendedPageProxy::loggingString() const > { >- return debugString("(0x", hex(reinterpret_cast<uintptr_t>(this)), " page ID ", m_page.pageID(), ", m_suspensionState ", static_cast<unsigned>(m_suspensionState), ')'); >+ return debugString("(0x", hex(reinterpret_cast<uintptr_t>(this)), " page ID ", m_page.pageID().toUInt64(), ", m_suspensionState ", static_cast<unsigned>(m_suspensionState), ')'); > } > > #endif >diff --git a/Source/WebKit/UIProcess/SuspendedPageProxy.h b/Source/WebKit/UIProcess/SuspendedPageProxy.h >index 0dad054b272..635eba000dc 100644 >--- a/Source/WebKit/UIProcess/SuspendedPageProxy.h >+++ b/Source/WebKit/UIProcess/SuspendedPageProxy.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "Connection.h" >+#include "MessageSender.h" > #include "ProcessThrottler.h" > #include "WebBackForwardListItem.h" > #include "WebPageProxyMessages.h" >@@ -39,7 +40,7 @@ class WebProcessProxy; > > enum class ShouldDelayClosingUntilEnteringAcceleratedCompositingMode : bool { No, Yes }; > >-class SuspendedPageProxy final: public IPC::MessageReceiver, public CanMakeWeakPtr<SuspendedPageProxy> { >+class SuspendedPageProxy final: private IPC::MessageReceiver, private IPC::MessageSender, public CanMakeWeakPtr<SuspendedPageProxy> { > WTF_MAKE_FAST_ALLOCATED; > public: > SuspendedPageProxy(WebPageProxy&, Ref<WebProcessProxy>&&, uint64_t mainFrameID, ShouldDelayClosingUntilEnteringAcceleratedCompositingMode); >@@ -71,6 +72,10 @@ private: > // IPC::MessageReceiver > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final; > void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final; >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() const final; >+ uint64_t messageSenderDestinationID() const final; > > WebPageProxy& m_page; > Ref<WebProcessProxy> m_process; >diff --git a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp >index 9711b233721..01b6d12e459 100644 >--- a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp >+++ b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp >@@ -73,7 +73,7 @@ WebUserContentControllerProxy::~WebUserContentControllerProxy() > { > webUserContentControllerProxies().remove(m_identifier); > for (auto* process : m_processes) { >- process->removeMessageReceiver(Messages::WebUserContentControllerProxy::messageReceiverName(), identifier().toUInt64()); >+ process->removeMessageReceiver(Messages::WebUserContentControllerProxy::messageReceiverName(), identifier()); > process->didDestroyWebUserContentControllerProxy(*this); > } > #if ENABLE(CONTENT_EXTENSIONS) >@@ -85,7 +85,7 @@ WebUserContentControllerProxy::~WebUserContentControllerProxy() > void WebUserContentControllerProxy::addProcess(WebProcessProxy& webProcessProxy, WebPageCreationParameters& parameters) > { > if (m_processes.add(&webProcessProxy).isNewEntry) >- webProcessProxy.addMessageReceiver(Messages::WebUserContentControllerProxy::messageReceiverName(), identifier().toUInt64(), *this); >+ webProcessProxy.addMessageReceiver(Messages::WebUserContentControllerProxy::messageReceiverName(), identifier(), *this); > > ASSERT(parameters.userContentWorlds.isEmpty()); > for (const auto& world : m_userContentWorlds) >@@ -115,7 +115,7 @@ void WebUserContentControllerProxy::removeProcess(WebProcessProxy& webProcessPro > ASSERT(m_processes.contains(&webProcessProxy)); > > m_processes.remove(&webProcessProxy); >- webProcessProxy.removeMessageReceiver(Messages::WebUserContentControllerProxy::messageReceiverName(), identifier().toUInt64()); >+ webProcessProxy.removeMessageReceiver(Messages::WebUserContentControllerProxy::messageReceiverName(), identifier()); > } > > void WebUserContentControllerProxy::addUserContentWorldUse(API::UserContentWorld& world) >@@ -327,7 +327,7 @@ void WebUserContentControllerProxy::removeAllUserMessageHandlers(API::UserConten > removeUserContentWorldUses(world, numberRemoved); > } > >-void WebUserContentControllerProxy::didPostMessage(IPC::Connection& connection, uint64_t pageID, const FrameInfoData& frameInfoData, uint64_t messageHandlerID, const IPC::DataReference& dataReference) >+void WebUserContentControllerProxy::didPostMessage(IPC::Connection& connection, PageIdentifier pageID, const FrameInfoData& frameInfoData, uint64_t messageHandlerID, const IPC::DataReference& dataReference) > { > WebPageProxy* page = WebProcessProxy::webPage(pageID); > if (!page) >diff --git a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h >index 623301116ed..0ed36a59cc3 100644 >--- a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h >+++ b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h >@@ -28,6 +28,7 @@ > #include "APIObject.h" > #include "MessageReceiver.h" > #include "UserContentControllerIdentifier.h" >+#include <WebCore/PageIdentifier.h> > #include <wtf/Forward.h> > #include <wtf/HashCountedSet.h> > #include <wtf/HashMap.h> >@@ -110,7 +111,7 @@ private: > // IPC::MessageReceiver. > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; > >- void didPostMessage(IPC::Connection&, uint64_t pageID, const FrameInfoData&, uint64_t messageHandlerID, const IPC::DataReference&); >+ void didPostMessage(IPC::Connection&, WebCore::PageIdentifier, const FrameInfoData&, uint64_t messageHandlerID, const IPC::DataReference&); > > void addUserContentWorldUse(API::UserContentWorld&); > void removeUserContentWorldUses(API::UserContentWorld&, unsigned numberOfUsesToRemove); >diff --git a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.messages.in b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.messages.in >index 81714351fce..25a4e291274 100644 >--- a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.messages.in >+++ b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.messages.in >@@ -24,5 +24,5 @@ > */ > > messages -> WebUserContentControllerProxy { >-DidPostMessage(uint64_t pageID, struct WebKit::FrameInfoData frameInfoData, uint64_t messageHandlerID, IPC::DataReference message) WantsConnection >+DidPostMessage(WebCore::PageIdentifier pageID, struct WebKit::FrameInfoData frameInfoData, uint64_t messageHandlerID, IPC::DataReference message) WantsConnection > } >diff --git a/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp b/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp >index 1f260291cc7..bd37ba0c96f 100644 >--- a/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp >@@ -119,7 +119,7 @@ void UserMediaPermissionRequestManagerProxy::captureDevicesChanged() > if (m_grantedRequests.isEmpty() && !*originHasPersistentAccess) > return; > >- m_page.process().send(Messages::WebPage::CaptureDevicesChanged(), m_page.pageID()); >+ m_page.send(Messages::WebPage::CaptureDevicesChanged()); > }; > > auto origin = WebCore::SecurityOrigin::create(m_page.mainFrame()->url()); >@@ -182,7 +182,7 @@ void UserMediaPermissionRequestManagerProxy::denyRequest(uint64_t userMediaID, U > ALWAYS_LOG(LOGIDENTIFIER, userMediaID, ", reason: ", reason); > > #if ENABLE(MEDIA_STREAM) >- m_page.process().send(Messages::WebPage::UserMediaAccessWasDenied(userMediaID, toWebCore(reason), invalidConstraint), m_page.pageID()); >+ m_page.send(Messages::WebPage::UserMediaAccessWasDenied(userMediaID, toWebCore(reason), invalidConstraint)); > #else > UNUSED_PARAM(reason); > UNUSED_PARAM(invalidConstraint); >@@ -296,11 +296,11 @@ bool UserMediaPermissionRequestManagerProxy::grantAccess(const UserMediaPermissi > } > > ++m_hasPendingCapture; >- m_page.process().connection()->sendWithAsyncReply(Messages::WebPage::UserMediaAccessWasGranted { request.userMediaID(), request.audioDevice(), request.videoDevice(), request.deviceIdentifierHashSalt() }, [this, weakThis = makeWeakPtr(this)] { >+ m_page.sendWithAsyncReply(Messages::WebPage::UserMediaAccessWasGranted { request.userMediaID(), request.audioDevice(), request.videoDevice(), request.deviceIdentifierHashSalt() }, [this, weakThis = makeWeakPtr(this)] { > if (!weakThis) > return; > --m_hasPendingCapture; >- }, m_page.pageID()); >+ }); > return true; > } > #endif >@@ -608,7 +608,7 @@ void UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame(uint6 > > bool revealIdsAndLabels = originHasPersistentAccess || wasGrantedVideoOrAudioAccess(frameID, userMediaDocumentOrigin.get(), topLevelDocumentOrigin.get()); > >- m_page.process().send(Messages::WebPage::DidCompleteMediaDeviceEnumeration { userMediaID, computeFilteredDeviceList(revealIdsAndLabels, deviceIDHashSalt), deviceIDHashSalt, originHasPersistentAccess }, m_page.pageID()); >+ m_page.send(Messages::WebPage::DidCompleteMediaDeviceEnumeration { userMediaID, computeFilteredDeviceList(revealIdsAndLabels, deviceIDHashSalt), deviceIDHashSalt, originHasPersistentAccess }); > }); > }; > >diff --git a/Source/WebKit/UIProcess/ViewGestureController.cpp b/Source/WebKit/UIProcess/ViewGestureController.cpp >index 248182d8092..76806d4843f 100644 >--- a/Source/WebKit/UIProcess/ViewGestureController.cpp >+++ b/Source/WebKit/UIProcess/ViewGestureController.cpp >@@ -66,10 +66,10 @@ static const float minimumScrollEventRatioForSwipe = 0.5; > static const float swipeSnapshotRemovalRenderTreeSizeTargetFraction = 0.5; > #endif > >-static HashMap<uint64_t, ViewGestureController*>& viewGestureControllersForAllPages() >+static HashMap<PageIdentifier, ViewGestureController*>& viewGestureControllersForAllPages() > { > // The key in this map is the associated page ID. >- static NeverDestroyed<HashMap<uint64_t, ViewGestureController*>> viewGestureControllers; >+ static NeverDestroyed<HashMap<PageIdentifier, ViewGestureController*>> viewGestureControllers; > return viewGestureControllers.get(); > } > >@@ -116,7 +116,7 @@ void ViewGestureController::connectToProcess() > m_isConnectedToProcess = true; > } > >-ViewGestureController* ViewGestureController::controllerForGesture(uint64_t pageID, ViewGestureController::GestureID gestureID) >+ViewGestureController* ViewGestureController::controllerForGesture(PageIdentifier pageID, ViewGestureController::GestureID gestureID) > { > auto gestureControllerIter = viewGestureControllersForAllPages().find(pageID); > if (gestureControllerIter == viewGestureControllersForAllPages().end()) >@@ -547,7 +547,7 @@ void ViewGestureController::forceRepaintIfNeeded() > > m_hasOutstandingRepaintRequest = true; > >- uint64_t pageID = m_webPageProxy.pageID(); >+ auto pageID = m_webPageProxy.pageID(); > GestureID gestureID = m_currentGestureID; > m_webPageProxy.forceRepaint(VoidCallback::create([pageID, gestureID] (CallbackBase::Error error) { > if (auto gestureController = controllerForGesture(pageID, gestureID)) >@@ -617,7 +617,7 @@ void ViewGestureController::requestRenderTreeSizeNotificationIfNeeded() > auto& process = m_webPageProxy.provisionalPageProxy() ? m_webPageProxy.provisionalPageProxy()->process() : m_webPageProxy.process(); > auto threshold = m_snapshotRemovalTracker.renderTreeSizeThreshold(); > >- process.send(Messages::ViewGestureGeometryCollector::SetRenderTreeSizeNotificationThreshold(threshold), m_webPageProxy.pageID()); >+ process.send(Messages::ViewGestureGeometryCollector::SetRenderTreeSizeNotificationThreshold(threshold), m_webPageProxy.pageID().toUInt64()); > } > #endif > >diff --git a/Source/WebKit/UIProcess/ViewGestureController.h b/Source/WebKit/UIProcess/ViewGestureController.h >index 431c2766d08..c1670d3a94c 100644 >--- a/Source/WebKit/UIProcess/ViewGestureController.h >+++ b/Source/WebKit/UIProcess/ViewGestureController.h >@@ -29,6 +29,7 @@ > #include "SameDocumentNavigationType.h" > #include <WebCore/Color.h> > #include <WebCore/FloatRect.h> >+#include <WebCore/PageIdentifier.h> > #include <wtf/MonotonicTime.h> > #include <wtf/RetainPtr.h> > #include <wtf/RunLoop.h> >@@ -175,7 +176,7 @@ private: > // IPC::MessageReceiver. > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; > >- static ViewGestureController* controllerForGesture(uint64_t pageID, GestureID); >+ static ViewGestureController* controllerForGesture(WebCore::PageIdentifier, GestureID); > > static GestureID takeNextGestureID(); > void willBeginGesture(ViewGestureType); >diff --git a/Source/WebKit/UIProcess/VisitedLinkStore.cpp b/Source/WebKit/UIProcess/VisitedLinkStore.cpp >index f2e7b934057..991dc2fcff9 100644 >--- a/Source/WebKit/UIProcess/VisitedLinkStore.cpp >+++ b/Source/WebKit/UIProcess/VisitedLinkStore.cpp >@@ -109,7 +109,7 @@ void VisitedLinkStore::webProcessDidCloseConnection(WebProcessProxy&, IPC::Conne > // FIXME: Implement. > } > >-void VisitedLinkStore::addVisitedLinkHashFromPage(uint64_t pageID, SharedStringHash linkHash) >+void VisitedLinkStore::addVisitedLinkHashFromPage(PageIdentifier pageID, SharedStringHash linkHash) > { > if (auto* webPageProxy = WebProcessProxy::webPage(pageID)) { > if (!webPageProxy->addsVisitedLinks()) >diff --git a/Source/WebKit/UIProcess/VisitedLinkStore.h b/Source/WebKit/UIProcess/VisitedLinkStore.h >index 06f20ba91cb..02b49bac55e 100644 >--- a/Source/WebKit/UIProcess/VisitedLinkStore.h >+++ b/Source/WebKit/UIProcess/VisitedLinkStore.h >@@ -67,7 +67,7 @@ private: > void didInvalidateSharedMemory() final; > void didUpdateSharedStringHashes(const Vector<WebCore::SharedStringHash>& addedHashes, const Vector<WebCore::SharedStringHash>& removedHashes) final; > >- void addVisitedLinkHashFromPage(uint64_t pageID, WebCore::SharedStringHash); >+ void addVisitedLinkHashFromPage(WebCore::PageIdentifier, WebCore::SharedStringHash); > > void sendStoreHandleToProcess(WebProcessProxy&); > >diff --git a/Source/WebKit/UIProcess/VisitedLinkStore.messages.in b/Source/WebKit/UIProcess/VisitedLinkStore.messages.in >index e7862e365b0..2e66c42808e 100644 >--- a/Source/WebKit/UIProcess/VisitedLinkStore.messages.in >+++ b/Source/WebKit/UIProcess/VisitedLinkStore.messages.in >@@ -21,5 +21,5 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > messages -> VisitedLinkStore { >- AddVisitedLinkHashFromPage(uint64_t pageID, uint64_t linkHash) >+ AddVisitedLinkHashFromPage(WebCore::PageIdentifier pageID, uint64_t linkHash) > } >diff --git a/Source/WebKit/UIProcess/WebEditCommandProxy.cpp b/Source/WebKit/UIProcess/WebEditCommandProxy.cpp >index 87b0afc20c2..0dbe0afb433 100644 >--- a/Source/WebKit/UIProcess/WebEditCommandProxy.cpp >+++ b/Source/WebKit/UIProcess/WebEditCommandProxy.cpp >@@ -55,7 +55,7 @@ void WebEditCommandProxy::unapply() > if (!m_page || !m_page->hasRunningProcess()) > return; > >- m_page->process().send(Messages::WebPage::UnapplyEditCommand(m_commandID), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); >+ m_page->send(Messages::WebPage::UnapplyEditCommand(m_commandID), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); > m_page->registerEditCommand(*this, UndoOrRedo::Redo); > } > >@@ -64,7 +64,7 @@ void WebEditCommandProxy::reapply() > if (!m_page || !m_page->hasRunningProcess()) > return; > >- m_page->process().send(Messages::WebPage::ReapplyEditCommand(m_commandID), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); >+ m_page->send(Messages::WebPage::ReapplyEditCommand(m_commandID), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); > m_page->registerEditCommand(*this, UndoOrRedo::Undo); > } > >diff --git a/Source/WebKit/UIProcess/WebFrameProxy.cpp b/Source/WebKit/UIProcess/WebFrameProxy.cpp >index 5c851b72755..b01b3050516 100644 >--- a/Source/WebKit/UIProcess/WebFrameProxy.cpp >+++ b/Source/WebKit/UIProcess/WebFrameProxy.cpp >@@ -83,7 +83,7 @@ void WebFrameProxy::loadURL(const URL& url) > if (!m_page) > return; > >- m_page->process().send(Messages::WebPage::LoadURLInFrame(url, m_frameID), m_page->pageID()); >+ m_page->send(Messages::WebPage::LoadURLInFrame(url, m_frameID)); > } > > void WebFrameProxy::loadData(const IPC::DataReference& data, const String& MIMEType, const String& encodingName, const URL& baseURL) >@@ -92,7 +92,7 @@ void WebFrameProxy::loadData(const IPC::DataReference& data, const String& MIMET > if (!m_page) > return; > >- m_page->process().send(Messages::WebPage::LoadDataInFrame(data, MIMEType, encodingName, baseURL, m_frameID), m_page->pageID()); >+ m_page->send(Messages::WebPage::LoadDataInFrame(data, MIMEType, encodingName, baseURL, m_frameID)); > } > > void WebFrameProxy::stopLoading() const >@@ -103,7 +103,7 @@ void WebFrameProxy::stopLoading() const > if (!m_page->hasRunningProcess()) > return; > >- m_page->process().send(Messages::WebPage::StopLoadingFrame(m_frameID), m_page->pageID()); >+ m_page->send(Messages::WebPage::StopLoadingFrame(m_frameID)); > } > > bool WebFrameProxy::canProvideSource() const >@@ -262,7 +262,7 @@ void WebFrameProxy::collapseSelection() > if (!m_page) > return; > >- m_page->process().send(Messages::WebPage::CollapseSelectionInFrame(m_frameID), m_page->pageID()); >+ m_page->send(Messages::WebPage::CollapseSelectionInFrame(m_frameID)); > } > #endif > >diff --git a/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp b/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >index 8e93b1dc2d0..ec698e160cc 100644 >--- a/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >+++ b/Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >@@ -56,13 +56,13 @@ WebFullScreenManagerProxy::~WebFullScreenManagerProxy() > void WebFullScreenManagerProxy::willEnterFullScreen() > { > m_page.fullscreenClient().willEnterFullscreen(&m_page); >- m_page.process().send(Messages::WebFullScreenManager::WillEnterFullScreen(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::WillEnterFullScreen()); > } > > void WebFullScreenManagerProxy::didEnterFullScreen() > { > m_page.fullscreenClient().didEnterFullscreen(&m_page); >- m_page.process().send(Messages::WebFullScreenManager::DidEnterFullScreen(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::DidEnterFullScreen()); > > if (m_page.isControlledByAutomation()) { > if (WebAutomationSession* automationSession = m_page.process().processPool().automationSession()) >@@ -73,13 +73,13 @@ void WebFullScreenManagerProxy::didEnterFullScreen() > void WebFullScreenManagerProxy::willExitFullScreen() > { > m_page.fullscreenClient().willExitFullscreen(&m_page); >- m_page.process().send(Messages::WebFullScreenManager::WillExitFullScreen(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::WillExitFullScreen()); > } > > void WebFullScreenManagerProxy::didExitFullScreen() > { > m_page.fullscreenClient().didExitFullscreen(&m_page); >- m_page.process().send(Messages::WebFullScreenManager::DidExitFullScreen(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::DidExitFullScreen()); > > if (m_page.isControlledByAutomation()) { > if (WebAutomationSession* automationSession = m_page.process().processPool().automationSession()) >@@ -89,12 +89,12 @@ void WebFullScreenManagerProxy::didExitFullScreen() > > void WebFullScreenManagerProxy::setAnimatingFullScreen(bool animating) > { >- m_page.process().send(Messages::WebFullScreenManager::SetAnimatingFullScreen(animating), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::SetAnimatingFullScreen(animating)); > } > > void WebFullScreenManagerProxy::requestExitFullScreen() > { >- m_page.process().send(Messages::WebFullScreenManager::RequestExitFullScreen(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::RequestExitFullScreen()); > } > > void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, CompletionHandler<void(bool)>&& completionHandler) >@@ -108,27 +108,27 @@ void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, Completion > > void WebFullScreenManagerProxy::saveScrollPosition() > { >- m_page.process().send(Messages::WebFullScreenManager::SaveScrollPosition(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::SaveScrollPosition()); > } > > void WebFullScreenManagerProxy::restoreScrollPosition() > { >- m_page.process().send(Messages::WebFullScreenManager::RestoreScrollPosition(), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::RestoreScrollPosition()); > } > > void WebFullScreenManagerProxy::setFullscreenInsets(const WebCore::FloatBoxExtent& insets) > { >- m_page.process().send(Messages::WebFullScreenManager::SetFullscreenInsets(insets), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::SetFullscreenInsets(insets)); > } > > void WebFullScreenManagerProxy::setFullscreenAutoHideDuration(Seconds duration) > { >- m_page.process().send(Messages::WebFullScreenManager::SetFullscreenAutoHideDuration(duration), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::SetFullscreenAutoHideDuration(duration)); > } > > void WebFullScreenManagerProxy::setFullscreenControlsHidden(bool hidden) > { >- m_page.process().send(Messages::WebFullScreenManager::SetFullscreenControlsHidden(hidden), m_page.pageID()); >+ m_page.send(Messages::WebFullScreenManager::SetFullscreenControlsHidden(hidden)); > } > > void WebFullScreenManagerProxy::close() >diff --git a/Source/WebKit/UIProcess/WebInspectorProxy.cpp b/Source/WebKit/UIProcess/WebInspectorProxy.cpp >index 12bb261d07c..fe90ccc89a1 100644 >--- a/Source/WebKit/UIProcess/WebInspectorProxy.cpp >+++ b/Source/WebKit/UIProcess/WebInspectorProxy.cpp >@@ -101,7 +101,7 @@ void WebInspectorProxy::sendMessageToFrontend(const String& message) > if (!m_inspectorPage) > return; > >- m_inspectorPage->process().send(Messages::WebInspectorUI::SendMessageToFrontend(message), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::SendMessageToFrontend(message)); > } > > // Public APIs >@@ -127,7 +127,7 @@ void WebInspectorProxy::connect() > createFrontendPage(); > > m_inspectedPage->process().send(Messages::WebInspectorInterruptDispatcher::NotifyNeedDebuggerBreak(), 0); >- m_inspectedPage->process().send(Messages::WebInspector::Show(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::Show()); > } > > void WebInspectorProxy::show() >@@ -161,7 +161,7 @@ void WebInspectorProxy::close() > if (!m_inspectedPage) > return; > >- m_inspectedPage->process().send(Messages::WebInspector::Close(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::Close()); > > closeFrontendPageAndWindow(); > } >@@ -199,7 +199,7 @@ void WebInspectorProxy::updateForNewPageProcess(WebPageProxy* inspectedPage) > m_inspectedPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID(), *this); > > if (m_inspectorPage) >- m_inspectorPage->process().send(Messages::WebInspectorUI::UpdateConnection(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::UpdateConnection()); > } > > void WebInspectorProxy::setFrontendConnection(IPC::Attachment connectionIdentifier) >@@ -207,7 +207,7 @@ void WebInspectorProxy::setFrontendConnection(IPC::Attachment connectionIdentifi > if (!m_inspectedPage) > return; > >- m_inspectedPage->process().send(Messages::WebInspector::SetFrontendConnection(connectionIdentifier), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::SetFrontendConnection(connectionIdentifier)); > } > > void WebInspectorProxy::showConsole() >@@ -217,7 +217,7 @@ void WebInspectorProxy::showConsole() > > createFrontendPage(); > >- m_inspectedPage->process().send(Messages::WebInspector::ShowConsole(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::ShowConsole()); > } > > void WebInspectorProxy::showResources() >@@ -227,7 +227,7 @@ void WebInspectorProxy::showResources() > > createFrontendPage(); > >- m_inspectedPage->process().send(Messages::WebInspector::ShowResources(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::ShowResources()); > } > > void WebInspectorProxy::showTimelines() >@@ -237,7 +237,7 @@ void WebInspectorProxy::showTimelines() > > createFrontendPage(); > >- m_inspectedPage->process().send(Messages::WebInspector::ShowTimelines(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::ShowTimelines()); > } > > void WebInspectorProxy::showMainResourceForFrame(WebFrameProxy* frame) >@@ -247,7 +247,7 @@ void WebInspectorProxy::showMainResourceForFrame(WebFrameProxy* frame) > > createFrontendPage(); > >- m_inspectedPage->process().send(Messages::WebInspector::ShowMainResourceForFrame(frame->frameID()), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::ShowMainResourceForFrame(frame->frameID())); > } > > void WebInspectorProxy::attachBottom() >@@ -278,19 +278,19 @@ void WebInspectorProxy::attach(AttachmentSide side) > if (m_isVisible) > inspectorPagePreferences().setInspectorStartsAttached(true); > >- m_inspectedPage->process().send(Messages::WebInspector::SetAttached(true), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::SetAttached(true)); > > switch (m_attachmentSide) { > case AttachmentSide::Bottom: >- m_inspectorPage->process().send(Messages::WebInspectorUI::AttachedBottom(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::AttachedBottom()); > break; > > case AttachmentSide::Right: >- m_inspectorPage->process().send(Messages::WebInspectorUI::AttachedRight(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::AttachedRight()); > break; > > case AttachmentSide::Left: >- m_inspectorPage->process().send(Messages::WebInspectorUI::AttachedLeft(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::AttachedLeft()); > break; > } > >@@ -307,8 +307,8 @@ void WebInspectorProxy::detach() > if (m_isVisible) > inspectorPagePreferences().setInspectorStartsAttached(false); > >- m_inspectedPage->process().send(Messages::WebInspector::SetAttached(false), m_inspectedPage->pageID()); >- m_inspectorPage->process().send(Messages::WebInspectorUI::Detached(), m_inspectorPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::SetAttached(false)); >+ m_inspectorPage->send(Messages::WebInspectorUI::Detached()); > > platformDetach(); > } >@@ -341,9 +341,9 @@ void WebInspectorProxy::togglePageProfiling() > return; > > if (m_isProfilingPage) >- m_inspectedPage->process().send(Messages::WebInspector::StopPageProfiling(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::StopPageProfiling()); > else >- m_inspectedPage->process().send(Messages::WebInspector::StartPageProfiling(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::StartPageProfiling()); > > // FIXME: have the WebProcess notify us on state changes. > m_isProfilingPage = !m_isProfilingPage; >@@ -356,10 +356,10 @@ void WebInspectorProxy::toggleElementSelection() > > if (m_elementSelectionActive) { > m_ignoreElementSelectionChange = true; >- m_inspectedPage->process().send(Messages::WebInspector::StopElementSelection(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::StopElementSelection()); > } else { > connect(); >- m_inspectedPage->process().send(Messages::WebInspector::StartElementSelection(), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::StartElementSelection()); > } > } > >@@ -412,7 +412,7 @@ void WebInspectorProxy::openLocalInspectorFrontend(bool canAttach, bool underTes > if (!m_inspectorPage) > return; > >- m_inspectorPage->process().send(Messages::WebInspectorUI::EstablishConnection(m_inspectedPage->pageID(), m_underTest, inspectionLevel()), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::EstablishConnection(m_inspectedPage->pageID(), m_underTest, inspectionLevel())); > > ASSERT(!m_isActiveFrontend); > m_isActiveFrontend = true; >@@ -423,26 +423,26 @@ void WebInspectorProxy::openLocalInspectorFrontend(bool canAttach, bool underTes > m_isAttached = shouldOpenAttached(); > m_attachmentSide = static_cast<AttachmentSide>(inspectorPagePreferences().inspectorAttachmentSide()); > >- m_inspectedPage->process().send(Messages::WebInspector::SetAttached(m_isAttached), m_inspectedPage->pageID()); >+ m_inspectedPage->send(Messages::WebInspector::SetAttached(m_isAttached)); > > if (m_isAttached) { > switch (m_attachmentSide) { > case AttachmentSide::Bottom: >- m_inspectorPage->process().send(Messages::WebInspectorUI::AttachedBottom(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::AttachedBottom()); > break; > > case AttachmentSide::Right: >- m_inspectorPage->process().send(Messages::WebInspectorUI::AttachedRight(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::AttachedRight()); > break; > > case AttachmentSide::Left: >- m_inspectorPage->process().send(Messages::WebInspectorUI::AttachedLeft(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::AttachedLeft()); > break; > } > } else >- m_inspectorPage->process().send(Messages::WebInspectorUI::Detached(), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::Detached()); > >- m_inspectorPage->process().send(Messages::WebInspectorUI::SetDockingUnavailable(!m_canAttach), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::SetDockingUnavailable(!m_canAttach)); > } > > m_inspectorPage->loadRequest(URL(URL(), m_underTest ? WebInspectorProxy::inspectorTestPageURL() : WebInspectorProxy::inspectorPageURL())); >@@ -458,7 +458,7 @@ void WebInspectorProxy::open() > > SetForScope<bool> isOpening(m_isOpening, true); > m_isVisible = true; >- m_inspectorPage->process().send(Messages::WebInspectorUI::SetIsVisible(m_isVisible), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::SetIsVisible(m_isVisible)); > > if (m_isAttached) > platformAttach(); >@@ -485,7 +485,7 @@ void WebInspectorProxy::closeFrontendPageAndWindow() > > untrackInspectorPage(m_inspectorPage); > >- m_inspectorPage->process().send(Messages::WebInspectorUI::SetIsVisible(m_isVisible), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::SetIsVisible(m_isVisible)); > m_inspectorPage->process().removeMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->pageID()); > > if (m_isActiveFrontend) { >@@ -549,7 +549,7 @@ void WebInspectorProxy::attachAvailabilityChanged(bool available) > return; > > if (m_inspectorPage && !m_underTest) >- m_inspectorPage->process().send(Messages::WebInspectorUI::SetDockingUnavailable(!m_canAttach), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::SetDockingUnavailable(!m_canAttach)); > > platformAttachAvailabilityChanged(m_canAttach); > } >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 656c8dcc59c..2a54de9d6cd 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -381,12 +381,12 @@ void WebPageProxy::forMostVisibleWebPageIfAny(PAL::SessionID sessionID, const Se > completionHandler(selectedPage); > } > >-Ref<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, uint64_t pageID, Ref<API::PageConfiguration>&& configuration) >+Ref<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, PageIdentifier pageID, Ref<API::PageConfiguration>&& configuration) > { > return adoptRef(*new WebPageProxy(pageClient, process, pageID, WTFMove(configuration))); > } > >-WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uint64_t pageID, Ref<API::PageConfiguration>&& configuration) >+WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, PageIdentifier pageID, Ref<API::PageConfiguration>&& configuration) > : m_pageClient(makeWeakPtr(pageClient)) > , m_configuration(WTFMove(configuration)) > , m_navigationClient(makeUniqueRef<API::NavigationClient>()) >@@ -435,7 +435,7 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin > #endif > , m_resetRecentCrashCountTimer(RunLoop::main(), this, &WebPageProxy::resetRecentCrashCount) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "constructor: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "constructor: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (!m_configuration->drawsBackground()) > m_backgroundColor = Color(Color::transparent); >@@ -489,7 +489,7 @@ WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, uin > > WebPageProxy::~WebPageProxy() > { >- RELEASE_LOG_IF_ALLOWED(Loading, "destructor: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "destructor: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > ASSERT(m_process->webPage(m_pageID) != this); > #if !ASSERT_DISABLED >@@ -613,7 +613,7 @@ void WebPageProxy::setUIClient(std::unique_ptr<API::UIClient>&& uiClient) > m_uiClient = WTFMove(uiClient); > > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::SetCanRunBeforeUnloadConfirmPanel(m_uiClient->canRunBeforeUnloadConfirmPanel()), m_pageID); >+ send(Messages::WebPage::SetCanRunBeforeUnloadConfirmPanel(m_uiClient->canRunBeforeUnloadConfirmPanel())); > > setCanRunModal(m_uiClient->canRunModal()); > setNeedsFontAttributes(m_uiClient->needsFontAttributes()); >@@ -630,7 +630,7 @@ void WebPageProxy::setIconLoadingClient(std::unique_ptr<API::IconLoadingClient>& > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetUseIconLoadingClient(hasClient), m_pageID); >+ send(Messages::WebPage::SetUseIconLoadingClient(hasClient)); > } > > void WebPageProxy::setFindClient(std::unique_ptr<API::FindClient>&& findClient) >@@ -708,7 +708,7 @@ void WebPageProxy::launchProcess(const RegistrableDomain& registrableDomain) > ASSERT(!m_isClosed); > ASSERT(!hasRunningProcess()); > >- RELEASE_LOG_IF_ALLOWED(Loading, "launchProcess: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "launchProcess: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > m_process->removeWebPage(*this, WebProcessProxy::EndsUsingDataStore::Yes); > m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID); >@@ -763,7 +763,7 @@ bool WebPageProxy::suspendCurrentPageIfPossible(API::Navigation& navigation, Opt > RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Suspending current page for process pid %i", m_process->processIdentifier()); > auto suspendedPage = std::make_unique<SuspendedPageProxy>(*this, m_process.copyRef(), *mainFrameID, shouldDelayClosingUntilEnteringAcceleratedCompositingMode); > >- LOG(ProcessSwapping, "WebPageProxy %" PRIu64 " created suspended page %s for process pid %i, back/forward item %s" PRIu64, pageID(), suspendedPage->loggingString(), m_process->processIdentifier(), fromItem ? fromItem->itemID().logString() : 0); >+ LOG(ProcessSwapping, "WebPageProxy %" PRIu64 " created suspended page %s for process pid %i, back/forward item %s" PRIu64, pageID().toUInt64(), suspendedPage->loggingString(), m_process->processIdentifier(), fromItem ? fromItem->itemID().logString() : 0); > > // If the client forced a swap then it may not be web-compatible to keep the previous page because other windows may have an opener link to it. We thus close it as soon as we > // can do so without flashing. >@@ -781,7 +781,7 @@ bool WebPageProxy::suspendCurrentPageIfPossible(API::Navigation& navigation, Opt > void WebPageProxy::swapToWebProcess(Ref<WebProcessProxy>&& process, std::unique_ptr<DrawingAreaProxy>&& drawingArea, RefPtr<WebFrameProxy>&& mainFrame) > { > ASSERT(!m_isClosed); >- RELEASE_LOG_IF_ALLOWED(Loading, "swapToWebProcess: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "swapToWebProcess: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > m_process = WTFMove(process); > m_websiteDataStore = m_process->websiteDataStore(); >@@ -873,10 +873,10 @@ void WebPageProxy::didAttachToRunningProcess() > > RefPtr<API::Navigation> WebPageProxy::launchProcessForReload() > { >- RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (m_isClosed) { >- RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > >@@ -885,14 +885,14 @@ RefPtr<API::Navigation> WebPageProxy::launchProcessForReload() > launchProcess(registrableDomain); > > if (!m_backForwardList->currentItem()) { >- RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: no current item to reload: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessForReload: no current item to reload: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > > auto navigation = m_navigationState->createReloadNavigation(); > > // We allow stale content when reloading a WebProcess that's been killed or crashed. >- m_process->send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), m_backForwardList->currentItem()->itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, WTF::nullopt), m_pageID); >+ send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), m_backForwardList->currentItem()->itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, WTF::nullopt)); > m_process->responsivenessTimer().start(); > > return navigation; >@@ -900,10 +900,10 @@ RefPtr<API::Navigation> WebPageProxy::launchProcessForReload() > > RefPtr<API::Navigation> WebPageProxy::launchProcessWithItem(WebBackForwardListItem& item) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessWithItem: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessWithItem: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (m_isClosed) { >- RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessWithItem: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "launchProcessWithItem: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > >@@ -915,7 +915,7 @@ RefPtr<API::Navigation> WebPageProxy::launchProcessWithItem(WebBackForwardListIt > > auto navigation = m_navigationState->createBackForwardNavigation(item, m_backForwardList->currentItem(), FrameLoadType::IndexedBackForward); > >- m_process->send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), item.itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, WTF::nullopt), m_pageID); >+ send(Messages::WebPage::GoToBackForwardItem(navigation->navigationID(), item.itemID(), FrameLoadType::IndexedBackForward, ShouldTreatAsContinuingLoad::No, WTF::nullopt)); > m_process->responsivenessTimer().start(); > > return navigation; >@@ -956,7 +956,7 @@ void WebPageProxy::close() > if (m_isClosed) > return; > >- RELEASE_LOG_IF_ALLOWED(Loading, "close: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "close: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > m_isClosed = true; > >@@ -1009,7 +1009,7 @@ void WebPageProxy::close() > > m_process->processPool().removeAllSuspendedPagesForPage(*this); > >- m_process->send(Messages::WebPage::Close(), m_pageID); >+ send(Messages::WebPage::Close()); > m_process->removeWebPage(*this, WebProcessProxy::EndsUsingDataStore::Yes); > m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID); > m_process->processPool().supplement<WebNotificationManagerProxy>()->clearNotifications(this); >@@ -1031,14 +1031,14 @@ bool WebPageProxy::tryClose() > if (!hasRunningProcess()) > return true; > >- RELEASE_LOG_IF_ALLOWED(Loading, "tryClose: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "tryClose: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > // Close without delay if the process allows it. Our goal is to terminate > // the process, so we check a per-process status bit. > if (m_process->isSuddenTerminationEnabled()) > return true; > >- m_process->send(Messages::WebPage::TryClose(), m_pageID); >+ send(Messages::WebPage::TryClose()); > m_process->responsivenessTimer().start(); > return false; > } >@@ -1077,7 +1077,7 @@ RefPtr<API::Navigation> WebPageProxy::loadRequest(ResourceRequest&& request, Sho > if (m_isClosed) > return nullptr; > >- RELEASE_LOG_IF_ALLOWED(Loading, "loadRequest: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadRequest: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (!hasRunningProcess()) > launchProcess(RegistrableDomain { request.url() }); >@@ -1091,7 +1091,7 @@ void WebPageProxy::loadRequestWithNavigationShared(Ref<WebProcessProxy>&& proces > { > ASSERT(!m_isClosed); > >- RELEASE_LOG_IF_ALLOWED(Loading, "loadRequestWithNavigation: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadRequestWithNavigation: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64()); > > auto transaction = m_pageLoadState.transaction(); > >@@ -1114,16 +1114,16 @@ void WebPageProxy::loadRequestWithNavigationShared(Ref<WebProcessProxy>&& proces > willAcquireUniversalFileReadSandboxExtension(process); > addPlatformLoadParameters(loadParameters); > >- process->send(Messages::WebPage::LoadRequest(loadParameters), m_pageID); >+ sendToProcess(process, Messages::WebPage::LoadRequest(loadParameters)); > process->responsivenessTimer().start(); > } > > RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, const String& resourceDirectoryURLString, API::Object* userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (m_isClosed) { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > >@@ -1132,7 +1132,7 @@ RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, cons > > URL fileURL = URL(URL(), fileURLString); > if (!fileURL.isLocalFile()) { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: file is not local: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: file is not local: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > >@@ -1142,7 +1142,7 @@ RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, cons > else { > resourceDirectoryURL = URL(URL(), resourceDirectoryURLString); > if (!resourceDirectoryURL.isLocalFile()) { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: resource URL is not local: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadFile: resource URL is not local: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > } >@@ -1164,7 +1164,7 @@ RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, cons > addPlatformLoadParameters(loadParameters); > > m_process->assumeReadAccessToBaseURL(*this, resourceDirectoryURL); >- m_process->send(Messages::WebPage::LoadRequest(loadParameters), m_pageID); >+ send(Messages::WebPage::LoadRequest(loadParameters)); > m_process->responsivenessTimer().start(); > > return navigation; >@@ -1172,10 +1172,10 @@ RefPtr<API::Navigation> WebPageProxy::loadFile(const String& fileURLString, cons > > RefPtr<API::Navigation> WebPageProxy::loadData(const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadData: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadData: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (m_isClosed) { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadData: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadData: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return nullptr; > } > >@@ -1189,7 +1189,7 @@ RefPtr<API::Navigation> WebPageProxy::loadData(const IPC::DataReference& data, c > > void WebPageProxy::loadDataWithNavigationShared(Ref<WebProcessProxy>&& process, API::Navigation& navigation, const IPC::DataReference& data, const String& MIMEType, const String& encoding, const String& baseURL, API::Object* userData, ShouldTreatAsContinuingLoad shouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& websitePolicies) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadDataWithNavigation: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadDataWithNavigation: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64()); > > ASSERT(!m_isClosed); > >@@ -1209,19 +1209,19 @@ void WebPageProxy::loadDataWithNavigationShared(Ref<WebProcessProxy>&& process, > addPlatformLoadParameters(loadParameters); > > process->assumeReadAccessToBaseURL(*this, baseURL); >- process->send(Messages::WebPage::LoadData(loadParameters), m_pageID); >+ sendToProcess(process, Messages::WebPage::LoadData(loadParameters)); > process->responsivenessTimer().start(); > } > > void WebPageProxy::loadAlternateHTML(const IPC::DataReference& htmlData, const String& encoding, const URL& baseURL, const URL& unreachableURL, API::Object* userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > // When the UIProcess is in the process of handling a failing provisional load, do not attempt to > // start a second alternative HTML load as this will prevent the page load state from being > // handled properly. > if (m_isClosed || m_isLoadingAlternateHTMLStringForFailingProvisionalLoad) { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML: page is closed (or other): webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadAlternateHTML: page is closed (or other): webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return; > } > >@@ -1252,16 +1252,16 @@ void WebPageProxy::loadAlternateHTML(const IPC::DataReference& htmlData, const S > > m_process->assumeReadAccessToBaseURL(*this, baseURL); > m_process->assumeReadAccessToBaseURL(*this, unreachableURL); >- m_process->send(Messages::WebPage::LoadAlternateHTML(loadParameters), m_pageID); >+ send(Messages::WebPage::LoadAlternateHTML(loadParameters)); > m_process->responsivenessTimer().start(); > } > > void WebPageProxy::loadWebArchiveData(API::Data* webArchiveData, API::Object* userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (m_isClosed) { >- RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "loadWebArchiveData: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return; > } > >@@ -1279,16 +1279,16 @@ void WebPageProxy::loadWebArchiveData(API::Data* webArchiveData, API::Object* us > loadParameters.userData = UserData(process().transformObjectsToHandles(userData).get()); > addPlatformLoadParameters(loadParameters); > >- m_process->send(Messages::WebPage::LoadData(loadParameters), m_pageID); >+ send(Messages::WebPage::LoadData(loadParameters)); > m_process->responsivenessTimer().start(); > } > > void WebPageProxy::navigateToPDFLinkWithSimulatedClick(const String& urlString, IntPoint documentPoint, IntPoint screenPoint) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (m_isClosed) { >- RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is closed: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return; > } > >@@ -1298,20 +1298,20 @@ void WebPageProxy::navigateToPDFLinkWithSimulatedClick(const String& urlString, > if (!hasRunningProcess()) > launchProcess(RegistrableDomain { URL(URL(), urlString) }); > >- m_process->send(Messages::WebPage::NavigateToPDFLinkWithSimulatedClick(urlString, documentPoint, screenPoint), m_pageID); >+ send(Messages::WebPage::NavigateToPDFLinkWithSimulatedClick(urlString, documentPoint, screenPoint)); > m_process->responsivenessTimer().start(); > } > > void WebPageProxy::stopLoading() > { >- RELEASE_LOG_IF_ALLOWED(Loading, "stopLoading: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "stopLoading: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (!hasRunningProcess()) { >- RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is not valid: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "navigateToPDFLinkWithSimulatedClick: page is not valid: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return; > } > >- m_process->send(Messages::WebPage::StopLoading(), m_pageID); >+ send(Messages::WebPage::StopLoading()); > if (m_provisionalPage) { > m_provisionalPage->cancel(); > m_provisionalPage = nullptr; >@@ -1321,7 +1321,7 @@ void WebPageProxy::stopLoading() > > RefPtr<API::Navigation> WebPageProxy::reload(OptionSet<WebCore::ReloadOption> options) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "reload: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "reload: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > SandboxExtension::Handle sandboxExtensionHandle; > >@@ -1346,7 +1346,7 @@ RefPtr<API::Navigation> WebPageProxy::reload(OptionSet<WebCore::ReloadOption> op > if (options.contains(WebCore::ReloadOption::DisableContentBlockers)) > navigation->setUserContentExtensionsEnabled(false); > >- m_process->send(Messages::WebPage::Reload(navigation->navigationID(), options.toRaw(), sandboxExtensionHandle), m_pageID); >+ send(Messages::WebPage::Reload(navigation->navigationID(), options.toRaw(), sandboxExtensionHandle)); > m_process->responsivenessTimer().start(); > > return navigation; >@@ -1398,7 +1398,7 @@ RefPtr<API::Navigation> WebPageProxy::goToBackForwardItem(WebBackForwardListItem > > RefPtr<API::Navigation> WebPageProxy::goToBackForwardItem(WebBackForwardListItem& item, FrameLoadType frameLoadType) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "goToBackForwardItem: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "goToBackForwardItem: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > LOG(Loading, "WebPageProxy %p goToBackForwardItem to item URL %s", this, item.url().utf8().data()); > > if (!hasRunningProcess()) >@@ -1412,7 +1412,7 @@ RefPtr<API::Navigation> WebPageProxy::goToBackForwardItem(WebBackForwardListItem > if (!m_backForwardList->currentItem()->itemIsInSameDocument(item)) > navigation = m_navigationState->createBackForwardNavigation(item, m_backForwardList->currentItem(), frameLoadType); > >- m_process->send(Messages::WebPage::GoToBackForwardItem(navigation ? navigation->navigationID() : 0, item.itemID(), frameLoadType, ShouldTreatAsContinuingLoad::No, WTF::nullopt), m_pageID); >+ send(Messages::WebPage::GoToBackForwardItem(navigation ? navigation->navigationID() : 0, item.itemID(), frameLoadType, ShouldTreatAsContinuingLoad::No, WTF::nullopt)); > m_process->responsivenessTimer().start(); > > return navigation; >@@ -1420,14 +1420,14 @@ RefPtr<API::Navigation> WebPageProxy::goToBackForwardItem(WebBackForwardListItem > > void WebPageProxy::tryRestoreScrollPosition() > { >- RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (!hasRunningProcess()) { >- RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition: page is not valid: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "tryRestoreScrollPosition: page is not valid: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > return; > } > >- m_process->send(Messages::WebPage::TryRestoreScrollPosition(), m_pageID); >+ send(Messages::WebPage::TryRestoreScrollPosition()); > } > > void WebPageProxy::didChangeBackForwardList(WebBackForwardListItem* added, Vector<Ref<WebBackForwardListItem>>&& removed) >@@ -1489,7 +1489,7 @@ void WebPageProxy::setControlledByAutomation(bool controlled) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetControlledByAutomation(controlled), m_pageID); >+ send(Messages::WebPage::SetControlledByAutomation(controlled)); > m_process->processPool().sendToNetworkingProcess(Messages::NetworkProcess::SetSessionIsControlledByAutomation(m_websiteDataStore->sessionID(), m_controlledByAutomation)); > } > >@@ -1514,7 +1514,7 @@ void WebPageProxy::setIndicating(bool indicating) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetIndicating(indicating), m_pageID); >+ send(Messages::WebPage::SetIndicating(indicating)); > } > > bool WebPageProxy::allowsRemoteInspection() const >@@ -1550,7 +1550,7 @@ void WebPageProxy::clearInspectorTargets() > > void WebPageProxy::createInspectorTargets() > { >- String pageTargetId = makeString("page-", m_pageID); >+ String pageTargetId = makeString("page-", m_pageID.toUInt64()); > m_inspectorController->createInspectorTarget(pageTargetId, Inspector::InspectorTargetType::Page); > } > >@@ -1561,7 +1561,7 @@ void WebPageProxy::setBackgroundColor(const Optional<Color>& color) > > m_backgroundColor = color; > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::SetBackgroundColor(color), m_pageID); >+ send(Messages::WebPage::SetBackgroundColor(color)); > } > > void WebPageProxy::setTopContentInset(float contentInset) >@@ -1577,9 +1577,9 @@ void WebPageProxy::setTopContentInset(float contentInset) > MachSendRight fence = m_drawingArea->createFence(); > > auto fenceAttachment = IPC::Attachment(fence.leakSendRight(), MACH_MSG_TYPE_MOVE_SEND); >- m_process->send(Messages::WebPage::SetTopContentInsetFenced(contentInset, fenceAttachment), m_pageID); >+ send(Messages::WebPage::SetTopContentInsetFenced(contentInset, fenceAttachment)); > #else >- m_process->send(Messages::WebPage::SetTopContentInset(contentInset), m_pageID); >+ send(Messages::WebPage::SetTopContentInset(contentInset)); > #endif > } > >@@ -1591,7 +1591,7 @@ void WebPageProxy::setUnderlayColor(const Color& color) > m_underlayColor = color; > > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::SetUnderlayColor(color), m_pageID); >+ send(Messages::WebPage::SetUnderlayColor(color)); > } > > void WebPageProxy::viewWillStartLiveResize() >@@ -1600,14 +1600,14 @@ void WebPageProxy::viewWillStartLiveResize() > return; > > closeOverlayedViews(); >- m_process->send(Messages::WebPage::ViewWillStartLiveResize(), m_pageID); >+ send(Messages::WebPage::ViewWillStartLiveResize()); > } > > void WebPageProxy::viewWillEndLiveResize() > { > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::ViewWillEndLiveResize(), m_pageID); >+ send(Messages::WebPage::ViewWillEndLiveResize()); > } > > void WebPageProxy::setViewNeedsDisplay(const Region& region) >@@ -1701,7 +1701,7 @@ void WebPageProxy::viewDidEnterWindow() > LayerHostingMode layerHostingMode = pageClient().viewLayerHostingMode(); > if (m_layerHostingMode != layerHostingMode) { > m_layerHostingMode = layerHostingMode; >- m_process->send(Messages::WebPage::SetLayerHostingMode(layerHostingMode), m_pageID); >+ send(Messages::WebPage::SetLayerHostingMode(layerHostingMode)); > } > } > >@@ -1750,7 +1750,7 @@ void WebPageProxy::dispatchActivityStateChange() > auto activityStateChangeID = m_activityStateChangeWantsSynchronousReply ? takeNextActivityStateChangeID() : static_cast<ActivityStateChangeID>(ActivityStateChangeAsynchronous); > > if (changed || activityStateChangeID != ActivityStateChangeAsynchronous || !m_nextActivityStateChangeCallbacks.isEmpty()) >- m_process->send(Messages::WebPage::SetActivityState(m_activityState, activityStateChangeID, m_nextActivityStateChangeCallbacks), m_pageID); >+ send(Messages::WebPage::SetActivityState(m_activityState, activityStateChangeID, m_nextActivityStateChangeCallbacks)); > > m_nextActivityStateChangeCallbacks.clear(); > >@@ -1853,7 +1853,7 @@ void WebPageProxy::layerHostingModeDidChange() > return; > > m_layerHostingMode = layerHostingMode; >- m_process->send(Messages::WebPage::SetLayerHostingMode(layerHostingMode), m_pageID); >+ send(Messages::WebPage::SetLayerHostingMode(layerHostingMode)); > } > > void WebPageProxy::waitForDidUpdateActivityState(ActivityStateChangeID activityStateChangeID) >@@ -1895,21 +1895,21 @@ void WebPageProxy::setInitialFocus(bool forward, bool isKeyboardEventValid, cons > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::SetInitialFocus(forward, isKeyboardEventValid, keyboardEvent, callbackID), m_pageID); >+ send(Messages::WebPage::SetInitialFocus(forward, isKeyboardEventValid, keyboardEvent, callbackID)); > } > > void WebPageProxy::clearSelection() > { > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::ClearSelection(), m_pageID); >+ send(Messages::WebPage::ClearSelection()); > } > > void WebPageProxy::restoreSelectionInFocusedEditableElement() > { > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::RestoreSelectionInFocusedEditableElement(), m_pageID); >+ send(Messages::WebPage::RestoreSelectionInFocusedEditableElement()); > } > > void WebPageProxy::validateCommand(const String& commandName, WTF::Function<void (const String&, bool, int32_t, CallbackBase::Error)>&& callbackFunction) >@@ -1920,7 +1920,7 @@ void WebPageProxy::validateCommand(const String& commandName, WTF::Function<void > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::ValidateCommand(commandName, callbackID), m_pageID); >+ send(Messages::WebPage::ValidateCommand(commandName, callbackID)); > } > > void WebPageProxy::increaseListLevel() >@@ -1928,7 +1928,7 @@ void WebPageProxy::increaseListLevel() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::IncreaseListLevel(), m_pageID); >+ send(Messages::WebPage::IncreaseListLevel()); > } > > void WebPageProxy::decreaseListLevel() >@@ -1936,7 +1936,7 @@ void WebPageProxy::decreaseListLevel() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::DecreaseListLevel(), m_pageID); >+ send(Messages::WebPage::DecreaseListLevel()); > } > > void WebPageProxy::changeListType() >@@ -1944,7 +1944,7 @@ void WebPageProxy::changeListType() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ChangeListType(), m_pageID); >+ send(Messages::WebPage::ChangeListType()); > } > > void WebPageProxy::setBaseWritingDirection(WritingDirection direction) >@@ -1952,7 +1952,7 @@ void WebPageProxy::setBaseWritingDirection(WritingDirection direction) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetBaseWritingDirection(direction), m_pageID); >+ send(Messages::WebPage::SetBaseWritingDirection(direction)); > } > > void WebPageProxy::updateFontAttributesAfterEditorStateChange() >@@ -1976,7 +1976,7 @@ void WebPageProxy::setNeedsFontAttributes(bool needsFontAttributes) > m_needsFontAttributes = needsFontAttributes; > > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::SetNeedsFontAttributes(needsFontAttributes), m_pageID); >+ send(Messages::WebPage::SetNeedsFontAttributes(needsFontAttributes)); > } > > bool WebPageProxy::maintainsInactiveSelection() const >@@ -1999,7 +1999,7 @@ void WebPageProxy::scheduleFullEditorStateUpdate() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ScheduleFullEditorStateUpdate(), m_pageID); >+ send(Messages::WebPage::ScheduleFullEditorStateUpdate()); > } > > void WebPageProxy::selectAll() >@@ -2007,7 +2007,7 @@ void WebPageProxy::selectAll() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SelectAll(), m_pageID); >+ send(Messages::WebPage::SelectAll()); > } > > void WebPageProxy::executeEditCommand(const String& commandName, const String& argument, WTF::Function<void(CallbackBase::Error)>&& callbackFunction) >@@ -2018,7 +2018,7 @@ void WebPageProxy::executeEditCommand(const String& commandName, const String& a > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::ExecuteEditCommandWithCallback(commandName, argument, callbackID), m_pageID); >+ send(Messages::WebPage::ExecuteEditCommandWithCallback(commandName, argument, callbackID)); > } > > void WebPageProxy::executeEditCommand(const String& commandName, const String& argument) >@@ -2031,7 +2031,7 @@ void WebPageProxy::executeEditCommand(const String& commandName, const String& a > if (commandName == ignoreSpellingCommandName) > ++m_pendingLearnOrIgnoreWordMessageCount; > >- m_process->send(Messages::WebPage::ExecuteEditCommand(commandName, argument), m_pageID); >+ send(Messages::WebPage::ExecuteEditCommand(commandName, argument)); > } > > void WebPageProxy::requestFontAttributesAtSelectionStart(Function<void(const WebCore::FontAttributes&, CallbackBase::Error)>&& callback) >@@ -2042,7 +2042,7 @@ void WebPageProxy::requestFontAttributesAtSelectionStart(Function<void(const Web > } > > auto callbackID = m_callbacks.put(WTFMove(callback), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::RequestFontAttributesAtSelectionStart(callbackID), m_pageID); >+ send(Messages::WebPage::RequestFontAttributesAtSelectionStart(callbackID)); > } > > void WebPageProxy::fontAttributesCallback(const WebCore::FontAttributes& attributes, CallbackID callbackID) >@@ -2063,7 +2063,7 @@ void WebPageProxy::setEditable(bool editable) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetEditable(editable), m_pageID); >+ send(Messages::WebPage::SetEditable(editable)); > } > > void WebPageProxy::setMediaStreamCaptureMuted(bool muted) >@@ -2128,9 +2128,9 @@ void WebPageProxy::performDragControllerAction(DragControllerAction action, Drag > > ASSERT(dragData.platformData()); > WebSelectionData selection(*dragData.platformData()); >- m_process->send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), selection, dragData.flags()), m_pageID); >+ send(Messages::WebPage::PerformDragControllerAction(action, dragData.clientPosition(), dragData.globalPosition(), dragData.draggingSourceOperationMask(), selection, dragData.flags())); > #else >- m_process->send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload), m_pageID); >+ send(Messages::WebPage::PerformDragControllerAction(action, dragData, sandboxExtensionHandle, sandboxExtensionsForUpload)); > #endif > } > >@@ -2160,7 +2160,7 @@ void WebPageProxy::dragEnded(const IntPoint& clientPosition, const IntPoint& glo > { > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::DragEnded(clientPosition, globalPosition, operation), m_pageID); >+ send(Messages::WebPage::DragEnded(clientPosition, globalPosition, operation)); > setDragCaretRect({ }); > } > >@@ -2172,13 +2172,13 @@ void WebPageProxy::didPerformDragOperation(bool handled) > void WebPageProxy::didStartDrag() > { > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::DidStartDrag(), m_pageID); >+ send(Messages::WebPage::DidStartDrag()); > } > > void WebPageProxy::dragCancelled() > { > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::DragCancelled(), m_pageID); >+ send(Messages::WebPage::DragCancelled()); > } > > void WebPageProxy::didEndDragging() >@@ -2277,7 +2277,7 @@ void WebPageProxy::processNextQueuedMouseEvent() > } > > LOG(MouseHandling, "UIProcess: sent mouse event %s (queue size %zu)", webMouseEventTypeString(eventType), m_mouseEventQueue.size()); >- m_process->send(Messages::WebPage::MouseEvent(event), m_pageID); >+ send(Messages::WebPage::MouseEvent(event)); > } > > #if MERGE_WHEEL_EVENTS >@@ -2437,7 +2437,7 @@ void WebPageProxy::handleKeyboardEvent(const NativeWebKeyboardEvent& event) > > if (m_keyEventQueue.size() == 1) { // Otherwise, sent from DidReceiveEvent message handler. > LOG(KeyHandling, " UI process: sent keyEvent from handleKeyboardEvent"); >- m_process->send(Messages::WebPage::KeyEvent(event), m_pageID); >+ send(Messages::WebPage::KeyEvent(event)); > } > } > >@@ -2643,7 +2643,7 @@ void WebPageProxy::handleTouchEventSynchronously(NativeWebTouchEvent& event) > > m_process->responsivenessTimer().start(); > bool handled = false; >- bool replyReceived = m_process->sendSync(Messages::WebPage::TouchEventSync(event), Messages::WebPage::TouchEventSync::Reply(handled), m_pageID, 1_s); >+ bool replyReceived = sendSync(Messages::WebPage::TouchEventSync(event), Messages::WebPage::TouchEventSync::Reply(handled), 1_s); > // If the sync request has timed out, we should consider the event handled. The Web Process is too busy to answer any questions, so the default action is also likely to have issues. > if (!replyReceived) > handled = true; >@@ -2687,7 +2687,7 @@ void WebPageProxy::handleTouchEvent(const NativeWebTouchEvent& event) > if (!m_isPageSuspended) { > m_touchEventQueue.append(event); > m_process->responsivenessTimer().start(); >- m_process->send(Messages::WebPage::TouchEvent(event), m_pageID); >+ send(Messages::WebPage::TouchEvent(event)); > } else { > if (m_touchEventQueue.isEmpty()) { > bool isEventHandled = false; >@@ -2708,12 +2708,12 @@ void WebPageProxy::handleTouchEvent(const NativeWebTouchEvent& event) > #if ENABLE(POINTER_EVENTS) > void WebPageProxy::cancelPointer(WebCore::PointerID pointerId, const WebCore::IntPoint& documentPoint) > { >- m_process->send(Messages::WebPage::CancelPointer(pointerId, documentPoint), m_pageID); >+ send(Messages::WebPage::CancelPointer(pointerId, documentPoint)); > } > > void WebPageProxy::touchWithIdentifierWasRemoved(WebCore::PointerID pointerId) > { >- m_process->send(Messages::WebPage::TouchWithIdentifierWasRemoved(pointerId), m_pageID); >+ send(Messages::WebPage::TouchWithIdentifierWasRemoved(pointerId)); > } > #endif > >@@ -2722,7 +2722,7 @@ void WebPageProxy::scrollBy(ScrollDirection direction, ScrollGranularity granula > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ScrollBy(direction, granularity), m_pageID); >+ send(Messages::WebPage::ScrollBy(direction, granularity)); > } > > void WebPageProxy::centerSelectionInVisibleArea() >@@ -2730,7 +2730,7 @@ void WebPageProxy::centerSelectionInVisibleArea() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::CenterSelectionInVisibleArea(), m_pageID); >+ send(Messages::WebPage::CenterSelectionInVisibleArea()); > } > > class WebPageProxy::PolicyDecisionSender : public RefCounted<PolicyDecisionSender> { >@@ -2873,7 +2873,7 @@ void WebPageProxy::receivedPolicyDecision(PolicyAction action, API::Navigation* > void WebPageProxy::commitProvisionalPage(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t frameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<WebCore::HasInsecureContent> forcedHasInsecureContent, const UserData& userData) > { > ASSERT(m_provisionalPage); >- RELEASE_LOG_IF_ALLOWED(Loading, "commitProvisionalPage: previousPID = %i, newPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_provisionalPage->process().processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "commitProvisionalPage: previousPID = %i, newPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_provisionalPage->process().processIdentifier(), m_pageID.toUInt64()); > > Optional<uint64_t> mainFrameIDInPreviousProcess = m_mainFrame ? makeOptional(m_mainFrame->frameID()) : WTF::nullopt; > >@@ -2896,7 +2896,7 @@ void WebPageProxy::commitProvisionalPage(uint64_t frameID, uint64_t navigationID > > // There is no way we'll be able to return to the page in the previous page so close it. > if (!didSuspendPreviousPage) >- m_process->send(Messages::WebPage::Close(), pageID()); >+ send(Messages::WebPage::Close()); > > swapToWebProcess(m_provisionalPage->process(), m_provisionalPage->takeDrawingArea(), m_provisionalPage->mainFrame()); > >@@ -2913,7 +2913,7 @@ void WebPageProxy::commitProvisionalPage(uint64_t frameID, uint64_t navigationID > > void WebPageProxy::continueNavigationInNewProcess(API::Navigation& navigation, std::unique_ptr<SuspendedPageProxy>&& suspendedPageProxy, Ref<WebProcessProxy>&& newProcess, ProcessSwapRequestedByClient processSwapRequestedByClient, Optional<WebsitePoliciesData>&& websitePolicies) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "continueNavigationInNewProcess: webPID = %i, pageID = %" PRIu64 ", newProcessPID = %i, hasSuspendedPage = %i", m_process->processIdentifier(), m_pageID, newProcess->processIdentifier(), !!suspendedPageProxy); >+ RELEASE_LOG_IF_ALLOWED(Loading, "continueNavigationInNewProcess: webPID = %i, pageID = %" PRIu64 ", newProcessPID = %i, hasSuspendedPage = %i", m_process->processIdentifier(), m_pageID.toUInt64(), newProcess->processIdentifier(), !!suspendedPageProxy); > LOG(Loading, "Continuing navigation %" PRIu64 " '%s' in a new web process", navigation.navigationID(), navigation.loggingString()); > > if (m_provisionalPage) { >@@ -2938,7 +2938,7 @@ void WebPageProxy::continueNavigationInNewProcess(API::Navigation& navigation, s > if (m_backForwardList->currentItem() && (navigation.lockBackForwardList() == LockBackForwardList::Yes || navigation.lockHistory() == LockHistory::Yes)) { > // If WebCore is supposed to lock the history for this load, then the new process needs to know about the current history item so it can update > // it instead of creating a new one. >- newProcess->send(Messages::WebPage::SetCurrentHistoryItemForReattach(m_backForwardList->currentItem()->itemState()), m_pageID); >+ sendToProcess(newProcess, Messages::WebPage::SetCurrentHistoryItemForReattach(m_backForwardList->currentItem()->itemState())); > } > > // FIXME: Work out timing of responding with the last policy delegate, etc >@@ -2988,7 +2988,7 @@ void WebPageProxy::setUserAgent(String&& userAgent) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetUserAgent(m_userAgent), m_pageID); >+ send(Messages::WebPage::SetUserAgent(m_userAgent)); > } > > void WebPageProxy::setApplicationNameForUserAgent(const String& applicationName) >@@ -3025,7 +3025,7 @@ void WebPageProxy::resumeActiveDOMObjectsAndAnimations() > > m_isPageSuspended = false; > >- m_process->send(Messages::WebPage::ResumeActiveDOMObjectsAndAnimations(), m_pageID); >+ send(Messages::WebPage::ResumeActiveDOMObjectsAndAnimations()); > } > > void WebPageProxy::suspendActiveDOMObjectsAndAnimations() >@@ -3035,7 +3035,7 @@ void WebPageProxy::suspendActiveDOMObjectsAndAnimations() > > m_isPageSuspended = true; > >- m_process->send(Messages::WebPage::SuspendActiveDOMObjectsAndAnimations(), m_pageID); >+ send(Messages::WebPage::SuspendActiveDOMObjectsAndAnimations()); > } > > bool WebPageProxy::supportsTextEncoding() const >@@ -3052,7 +3052,7 @@ void WebPageProxy::setCustomTextEncodingName(const String& encodingName) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetCustomTextEncodingName(encodingName), m_pageID); >+ send(Messages::WebPage::SetCustomTextEncodingName(encodingName)); > } > > SessionState WebPageProxy::sessionState(WTF::Function<bool (WebBackForwardListItem&)>&& filter) const >@@ -3074,7 +3074,7 @@ SessionState WebPageProxy::sessionState(WTF::Function<bool (WebBackForwardListIt > > RefPtr<API::Navigation> WebPageProxy::restoreFromSessionState(SessionState sessionState, bool navigate) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "restoreFromSessionState: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "restoreFromSessionState: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > m_sessionRestorationRenderTreeSize = 0; > m_hitRenderTreeSizeThreshold = false; >@@ -3083,7 +3083,7 @@ RefPtr<API::Navigation> WebPageProxy::restoreFromSessionState(SessionState sessi > > if (hasBackForwardList) { > m_backForwardList->restoreFromState(WTFMove(sessionState.backForwardListState)); >- process().send(Messages::WebPage::RestoreSession(m_backForwardList->itemStates()), m_pageID); >+ send(Messages::WebPage::RestoreSession(m_backForwardList->itemStates())); > > auto transaction = m_pageLoadState.transaction(); > m_pageLoadState.setCanGoBack(transaction, m_backForwardList->backItem()); >@@ -3131,7 +3131,7 @@ void WebPageProxy::setTextZoomFactor(double zoomFactor) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetTextZoomFactor(m_textZoomFactor), m_pageID); >+ send(Messages::WebPage::SetTextZoomFactor(m_textZoomFactor)); > } > > void WebPageProxy::setPageZoomFactor(double zoomFactor) >@@ -3146,7 +3146,7 @@ void WebPageProxy::setPageZoomFactor(double zoomFactor) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetPageZoomFactor(m_pageZoomFactor), m_pageID); >+ send(Messages::WebPage::SetPageZoomFactor(m_pageZoomFactor)); > } > > void WebPageProxy::setPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor) >@@ -3162,7 +3162,7 @@ void WebPageProxy::setPageAndTextZoomFactors(double pageZoomFactor, double textZ > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetPageAndTextZoomFactors(m_pageZoomFactor, m_textZoomFactor), m_pageID); >+ send(Messages::WebPage::SetPageAndTextZoomFactors(m_pageZoomFactor, m_textZoomFactor)); > } > > double WebPageProxy::pageZoomFactor() const >@@ -3192,7 +3192,7 @@ void WebPageProxy::scalePage(double scale, const IntPoint& origin) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ScalePage(scale, origin), m_pageID); >+ send(Messages::WebPage::ScalePage(scale, origin)); > } > > void WebPageProxy::scalePageInViewCoordinates(double scale, const IntPoint& centerInViewCoordinates) >@@ -3204,7 +3204,7 @@ void WebPageProxy::scalePageInViewCoordinates(double scale, const IntPoint& cent > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ScalePageInViewCoordinates(scale, centerInViewCoordinates), m_pageID); >+ send(Messages::WebPage::ScalePageInViewCoordinates(scale, centerInViewCoordinates)); > } > > void WebPageProxy::scaleView(double scale) >@@ -3216,7 +3216,7 @@ void WebPageProxy::scaleView(double scale) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ScaleView(scale), m_pageID); >+ send(Messages::WebPage::ScaleView(scale)); > } > > void WebPageProxy::setIntrinsicDeviceScaleFactor(float scaleFactor) >@@ -3235,7 +3235,7 @@ void WebPageProxy::windowScreenDidChange(PlatformDisplayID displayID) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::WindowScreenDidChange(displayID), m_pageID); >+ send(Messages::WebPage::WindowScreenDidChange(displayID)); > } > > float WebPageProxy::deviceScaleFactor() const >@@ -3274,7 +3274,7 @@ void WebPageProxy::accessibilitySettingsDidChange() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::AccessibilitySettingsDidChange(), m_pageID); >+ send(Messages::WebPage::AccessibilitySettingsDidChange()); > } > > void WebPageProxy::setUseFixedLayout(bool fixed) >@@ -3291,7 +3291,7 @@ void WebPageProxy::setUseFixedLayout(bool fixed) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetUseFixedLayout(fixed), m_pageID); >+ send(Messages::WebPage::SetUseFixedLayout(fixed)); > } > > void WebPageProxy::setFixedLayoutSize(const IntSize& size) >@@ -3304,7 +3304,7 @@ void WebPageProxy::setFixedLayoutSize(const IntSize& size) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetFixedLayoutSize(size), m_pageID); >+ send(Messages::WebPage::SetFixedLayoutSize(size)); > } > > void WebPageProxy::setAlwaysShowsHorizontalScroller(bool alwaysShowsHorizontalScroller) >@@ -3317,7 +3317,7 @@ void WebPageProxy::setAlwaysShowsHorizontalScroller(bool alwaysShowsHorizontalSc > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetAlwaysShowsHorizontalScroller(alwaysShowsHorizontalScroller), m_pageID); >+ send(Messages::WebPage::SetAlwaysShowsHorizontalScroller(alwaysShowsHorizontalScroller)); > } > > void WebPageProxy::setAlwaysShowsVerticalScroller(bool alwaysShowsVerticalScroller) >@@ -3330,7 +3330,7 @@ void WebPageProxy::setAlwaysShowsVerticalScroller(bool alwaysShowsVerticalScroll > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetAlwaysShowsVerticalScroller(alwaysShowsVerticalScroller), m_pageID); >+ send(Messages::WebPage::SetAlwaysShowsVerticalScroller(alwaysShowsVerticalScroller)); > } > > void WebPageProxy::listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone> milestones) >@@ -3343,7 +3343,7 @@ void WebPageProxy::listenForLayoutMilestones(OptionSet<WebCore::LayoutMilestone> > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ListenForLayoutMilestones(milestones), m_pageID); >+ send(Messages::WebPage::ListenForLayoutMilestones(milestones)); > } > > void WebPageProxy::setSuppressScrollbarAnimations(bool suppressAnimations) >@@ -3356,7 +3356,7 @@ void WebPageProxy::setSuppressScrollbarAnimations(bool suppressAnimations) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetSuppressScrollbarAnimations(suppressAnimations), m_pageID); >+ send(Messages::WebPage::SetSuppressScrollbarAnimations(suppressAnimations)); > } > > bool WebPageProxy::rubberBandsAtLeft() const >@@ -3408,7 +3408,7 @@ void WebPageProxy::setEnableVerticalRubberBanding(bool enableVerticalRubberBandi > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetEnableVerticalRubberBanding(enableVerticalRubberBanding), m_pageID); >+ send(Messages::WebPage::SetEnableVerticalRubberBanding(enableVerticalRubberBanding)); > } > > bool WebPageProxy::verticalRubberBandingIsEnabled() const >@@ -3425,7 +3425,7 @@ void WebPageProxy::setEnableHorizontalRubberBanding(bool enableHorizontalRubberB > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetEnableHorizontalRubberBanding(enableHorizontalRubberBanding), m_pageID); >+ send(Messages::WebPage::SetEnableHorizontalRubberBanding(enableHorizontalRubberBanding)); > } > > bool WebPageProxy::horizontalRubberBandingIsEnabled() const >@@ -3442,7 +3442,7 @@ void WebPageProxy::setBackgroundExtendsBeyondPage(bool backgroundExtendsBeyondPa > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetBackgroundExtendsBeyondPage(backgroundExtendsBeyondPage), m_pageID); >+ send(Messages::WebPage::SetBackgroundExtendsBeyondPage(backgroundExtendsBeyondPage)); > } > > bool WebPageProxy::backgroundExtendsBeyondPage() const >@@ -3459,7 +3459,7 @@ void WebPageProxy::setPaginationMode(WebCore::Pagination::Mode mode) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetPaginationMode(mode), m_pageID); >+ send(Messages::WebPage::SetPaginationMode(mode)); > } > > void WebPageProxy::setPaginationBehavesLikeColumns(bool behavesLikeColumns) >@@ -3471,7 +3471,7 @@ void WebPageProxy::setPaginationBehavesLikeColumns(bool behavesLikeColumns) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetPaginationBehavesLikeColumns(behavesLikeColumns), m_pageID); >+ send(Messages::WebPage::SetPaginationBehavesLikeColumns(behavesLikeColumns)); > } > > void WebPageProxy::setPageLength(double pageLength) >@@ -3483,7 +3483,7 @@ void WebPageProxy::setPageLength(double pageLength) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetPageLength(pageLength), m_pageID); >+ send(Messages::WebPage::SetPageLength(pageLength)); > } > > void WebPageProxy::setGapBetweenPages(double gap) >@@ -3495,7 +3495,7 @@ void WebPageProxy::setGapBetweenPages(double gap) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetGapBetweenPages(gap), m_pageID); >+ send(Messages::WebPage::SetGapBetweenPages(gap)); > } > > void WebPageProxy::setPaginationLineGridEnabled(bool lineGridEnabled) >@@ -3507,7 +3507,7 @@ void WebPageProxy::setPaginationLineGridEnabled(bool lineGridEnabled) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::SetPaginationLineGridEnabled(lineGridEnabled), m_pageID); >+ send(Messages::WebPage::SetPaginationLineGridEnabled(lineGridEnabled)); > } > > void WebPageProxy::pageScaleFactorDidChange(double scaleFactor) >@@ -3532,27 +3532,27 @@ void WebPageProxy::findStringMatches(const String& string, FindOptions options, > return; > } > >- m_process->send(Messages::WebPage::FindStringMatches(string, options, maxMatchCount), m_pageID); >+ send(Messages::WebPage::FindStringMatches(string, options, maxMatchCount)); > } > > void WebPageProxy::findString(const String& string, FindOptions options, unsigned maxMatchCount) > { >- m_process->send(Messages::WebPage::FindString(string, options, maxMatchCount), m_pageID); >+ send(Messages::WebPage::FindString(string, options, maxMatchCount)); > } > > void WebPageProxy::getImageForFindMatch(int32_t matchIndex) > { >- m_process->send(Messages::WebPage::GetImageForFindMatch(matchIndex), m_pageID); >+ send(Messages::WebPage::GetImageForFindMatch(matchIndex)); > } > > void WebPageProxy::selectFindMatch(int32_t matchIndex) > { >- m_process->send(Messages::WebPage::SelectFindMatch(matchIndex), m_pageID); >+ send(Messages::WebPage::SelectFindMatch(matchIndex)); > } > > void WebPageProxy::hideFindUI() > { >- m_process->send(Messages::WebPage::HideFindUI(), m_pageID); >+ send(Messages::WebPage::HideFindUI()); > } > > void WebPageProxy::countStringMatches(const String& string, FindOptions options, unsigned maxMatchCount) >@@ -3560,7 +3560,7 @@ void WebPageProxy::countStringMatches(const String& string, FindOptions options, > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::CountStringMatches(string, options, maxMatchCount), m_pageID); >+ send(Messages::WebPage::CountStringMatches(string, options, maxMatchCount)); > } > > void WebPageProxy::replaceMatches(Vector<uint32_t>&& matchIndices, const String& replacementText, bool selectionOnly, Function<void(uint64_t, CallbackBase::Error)>&& callback) >@@ -3571,7 +3571,7 @@ void WebPageProxy::replaceMatches(Vector<uint32_t>&& matchIndices, const String& > } > > auto callbackID = m_callbacks.put(WTFMove(callback), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::ReplaceMatches(WTFMove(matchIndices), replacementText, selectionOnly, callbackID), m_pageID); >+ send(Messages::WebPage::ReplaceMatches(WTFMove(matchIndices), replacementText, selectionOnly, callbackID)); > } > > void WebPageProxy::launchInitialProcessIfNecessary() >@@ -3596,14 +3596,14 @@ void WebPageProxy::runJavaScriptInMainFrameScriptWorld(const String& script, boo > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::RunJavaScriptInMainFrameScriptWorld(script, forceUserGesture, worldName, callbackID), m_pageID); >+ send(Messages::WebPage::RunJavaScriptInMainFrameScriptWorld(script, forceUserGesture, worldName, callbackID)); > } > > void WebPageProxy::runJavaScriptInFrame(uint64_t frameID, const String& script, bool forceUserGesture, WTF::Function<void(API::SerializedScriptValue*, bool hadException, const ExceptionDetails&, CallbackBase::Error)>&& callbackFunction) > { > ASSERT(mainFrame()->frameID() != frameID); > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::RunJavaScriptInFrame(frameID, script, forceUserGesture, callbackID), m_pageID); >+ send(Messages::WebPage::RunJavaScriptInFrame(frameID, script, forceUserGesture, callbackID)); > } > > void WebPageProxy::getRenderTreeExternalRepresentation(WTF::Function<void (const String&, CallbackBase::Error)>&& callbackFunction) >@@ -3614,7 +3614,7 @@ void WebPageProxy::getRenderTreeExternalRepresentation(WTF::Function<void (const > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetRenderTreeExternalRepresentation(callbackID), m_pageID); >+ send(Messages::WebPage::GetRenderTreeExternalRepresentation(callbackID)); > } > > void WebPageProxy::getSourceForFrame(WebFrameProxy* frame, WTF::Function<void (const String&, CallbackBase::Error)>&& callbackFunction) >@@ -3626,7 +3626,7 @@ void WebPageProxy::getSourceForFrame(WebFrameProxy* frame, WTF::Function<void (c > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > m_loadDependentStringCallbackIDs.add(callbackID); >- m_process->send(Messages::WebPage::GetSourceForFrame(frame->frameID(), callbackID), m_pageID); >+ send(Messages::WebPage::GetSourceForFrame(frame->frameID(), callbackID)); > } > > void WebPageProxy::getContentsAsString(WTF::Function<void (const String&, CallbackBase::Error)>&& callbackFunction) >@@ -3638,7 +3638,7 @@ void WebPageProxy::getContentsAsString(WTF::Function<void (const String&, Callba > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > m_loadDependentStringCallbackIDs.add(callbackID); >- m_process->send(Messages::WebPage::GetContentsAsString(callbackID), m_pageID); >+ send(Messages::WebPage::GetContentsAsString(callbackID)); > } > > #if PLATFORM(COCOA) >@@ -3649,7 +3649,7 @@ void WebPageProxy::getContentsAsAttributedString(CompletionHandler<void(const At > return; > } > >- m_process->connection()->sendWithAsyncReply(Messages::WebPage::GetContentsAsAttributedString(), WTFMove(completionHandler), m_pageID); >+ sendWithAsyncReply(Messages::WebPage::GetContentsAsAttributedString(), WTFMove(completionHandler)); > } > #endif > >@@ -3662,7 +3662,7 @@ void WebPageProxy::getBytecodeProfile(WTF::Function<void (const String&, Callbac > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > m_loadDependentStringCallbackIDs.add(callbackID); >- m_process->send(Messages::WebPage::GetBytecodeProfile(callbackID), m_pageID); >+ send(Messages::WebPage::GetBytecodeProfile(callbackID)); > } > > void WebPageProxy::getSamplingProfilerOutput(WTF::Function<void (const String&, CallbackBase::Error)>&& callbackFunction) >@@ -3674,7 +3674,7 @@ void WebPageProxy::getSamplingProfilerOutput(WTF::Function<void (const String&, > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > m_loadDependentStringCallbackIDs.add(callbackID); >- m_process->send(Messages::WebPage::GetSamplingProfilerOutput(callbackID), m_pageID); >+ send(Messages::WebPage::GetSamplingProfilerOutput(callbackID)); > } > > #if ENABLE(MHTML) >@@ -3686,7 +3686,7 @@ void WebPageProxy::getContentsAsMHTMLData(Function<void (API::Data*, CallbackBas > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetContentsAsMHTMLData(callbackID), m_pageID); >+ send(Messages::WebPage::GetContentsAsMHTMLData(callbackID)); > } > #endif > >@@ -3698,7 +3698,7 @@ void WebPageProxy::getSelectionOrContentsAsString(WTF::Function<void (const Stri > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetSelectionOrContentsAsString(callbackID), m_pageID); >+ send(Messages::WebPage::GetSelectionOrContentsAsString(callbackID)); > } > > void WebPageProxy::getSelectionAsWebArchiveData(Function<void (API::Data*, CallbackBase::Error)>&& callbackFunction) >@@ -3709,7 +3709,7 @@ void WebPageProxy::getSelectionAsWebArchiveData(Function<void (API::Data*, Callb > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetSelectionAsWebArchiveData(callbackID), m_pageID); >+ send(Messages::WebPage::GetSelectionAsWebArchiveData(callbackID)); > } > > void WebPageProxy::getMainResourceDataOfFrame(WebFrameProxy* frame, Function<void (API::Data*, CallbackBase::Error)>&& callbackFunction) >@@ -3720,7 +3720,7 @@ void WebPageProxy::getMainResourceDataOfFrame(WebFrameProxy* frame, Function<voi > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetMainResourceDataOfFrame(frame->frameID(), callbackID), m_pageID); >+ send(Messages::WebPage::GetMainResourceDataOfFrame(frame->frameID(), callbackID)); > } > > void WebPageProxy::getResourceDataFromFrame(WebFrameProxy* frame, API::URL* resourceURL, Function<void (API::Data*, CallbackBase::Error)>&& callbackFunction) >@@ -3731,7 +3731,7 @@ void WebPageProxy::getResourceDataFromFrame(WebFrameProxy* frame, API::URL* reso > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetResourceDataFromFrame(frame->frameID(), resourceURL->string(), callbackID), m_pageID); >+ send(Messages::WebPage::GetResourceDataFromFrame(frame->frameID(), resourceURL->string(), callbackID)); > } > > void WebPageProxy::getWebArchiveOfFrame(WebFrameProxy* frame, Function<void (API::Data*, CallbackBase::Error)>&& callbackFunction) >@@ -3742,7 +3742,7 @@ void WebPageProxy::getWebArchiveOfFrame(WebFrameProxy* frame, Function<void (API > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::GetWebArchiveOfFrame(frame->frameID(), callbackID), m_pageID); >+ send(Messages::WebPage::GetWebArchiveOfFrame(frame->frameID(), callbackID)); > } > > void WebPageProxy::forceRepaint(RefPtr<VoidCallback>&& callback) >@@ -3776,7 +3776,7 @@ void WebPageProxy::forceRepaint(RefPtr<VoidCallback>&& callback) > > auto callbackID = m_callbacks.put(WTFMove(didForceRepaintCallback), m_process->throttler().backgroundActivityToken()); > m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); >- m_process->send(Messages::WebPage::ForceRepaint(callbackID), m_pageID); >+ send(Messages::WebPage::ForceRepaint(callbackID)); > } > > static OptionSet<IPC::SendOption> printingSendOptions(bool isPerformingDOMPrintOperation) >@@ -3802,7 +3802,7 @@ void WebPageProxy::preferencesDidChange() > // even if nothing changed in UI process, so that overrides get removed. > > // Preferences need to be updated during synchronous printing to make "print backgrounds" preference work when toggled from a print dialog checkbox. >- m_process->send(Messages::WebPage::PreferencesDidChange(preferencesStore()), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::PreferencesDidChange(preferencesStore()), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > > void WebPageProxy::didCreateMainFrame(uint64_t frameID) >@@ -3932,8 +3932,8 @@ void WebPageProxy::didStartProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& > if (frame->isMainFrame() && navigationID) > navigation = navigationState().navigation(navigationID); > >- LOG(Loading, "WebPageProxy %" PRIu64 " in process pid %i didStartProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", m_pageID, process->processIdentifier(), frameID, navigationID, url.string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(Loading, "didStartProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID, frameID); >+ LOG(Loading, "WebPageProxy %" PRIu64 " in process pid %i didStartProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", m_pageID.toUInt64(), process->processIdentifier(), frameID, navigationID, url.string().utf8().data()); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didStartProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID); > > auto transaction = m_pageLoadState.transaction(); > >@@ -3985,7 +3985,7 @@ void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t f > void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, uint64_t frameID, uint64_t navigationID, ResourceRequest&& request, const UserData& userData) > { > LOG(Loading, "WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame to frameID %" PRIu64 ", navigationID %" PRIu64 ", url %s", frameID, navigationID, request.url().string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(Loading, "didReceiveServerRedirectForProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didReceiveServerRedirectForProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4014,7 +4014,7 @@ void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared(Ref< > > void WebPageProxy::willPerformClientRedirectForFrame(uint64_t frameID, const String& url, double delay, WebCore::LockBackForwardList) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "willPerformClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "willPerformClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4027,7 +4027,7 @@ void WebPageProxy::willPerformClientRedirectForFrame(uint64_t frameID, const Str > > void WebPageProxy::didCancelClientRedirectForFrame(uint64_t frameID) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didCancelClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didCancelClientRedirectForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4074,8 +4074,8 @@ void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, const Securi > > void WebPageProxy::didFailProvisionalLoadForFrameShared(Ref<WebProcessProxy>&& process, uint64_t frameID, const SecurityOriginData& frameSecurityOrigin, uint64_t navigationID, const String& provisionalURL, const ResourceError& error, WillContinueLoading willContinueLoading, const UserData& userData) > { >- LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " in web process pid %i didFailProvisionalLoadForFrame to provisionalURL %s", m_pageID, process->processIdentifier(), provisionalURL.utf8().data()); >- RELEASE_LOG_IF_ALLOWED(Process, "didFailProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", process->processIdentifier(), m_pageID, frameID, error.domain().utf8().data(), error.errorCode()); >+ LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " in web process pid %i didFailProvisionalLoadForFrame to provisionalURL %s", m_pageID.toUInt64(), process->processIdentifier(), provisionalURL.utf8().data()); >+ RELEASE_LOG_IF_ALLOWED(Process, "didFailProvisionalLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", process->processIdentifier(), m_pageID.toUInt64(), frameID, error.domain().utf8().data(), error.errorCode()); > > PageClientProtector protector(pageClient()); > >@@ -4141,9 +4141,9 @@ static bool isNonUniqueNavigationWithLinkDecoration(const SecurityOriginData req > > void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID, const String& mimeType, bool frameHasCustomContentProvider, uint32_t opaqueFrameLoadType, const WebCore::CertificateInfo& certificateInfo, bool containsPluginDocument, Optional<HasInsecureContent> hasInsecureContent, const UserData& userData) > { >- LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " didCommitLoadForFrame in navigation %" PRIu64, m_pageID, navigationID); >+ LOG(Loading, "(Loading) WebPageProxy %" PRIu64 " didCommitLoadForFrame in navigation %" PRIu64, m_pageID.toUInt64(), navigationID); > LOG(BackForward, "(Back/Forward) After load commit, back/forward list is now:%s", m_backForwardList->loggingString()); >- RELEASE_LOG_IF_ALLOWED(Loading, "didCommitLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didCommitLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4254,7 +4254,7 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID > > void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData& userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didFinishDocumentLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didFinishDocumentLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4278,7 +4278,7 @@ void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, uint64_t navi > void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, const UserData& userData) > { > LOG(Loading, "WebPageProxy::didFinishLoadForFrame - WebPageProxy %p with navigationID %" PRIu64 " didFinishLoad", this, navigationID); >- RELEASE_LOG_IF_ALLOWED(Loading, "didFinishLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didFinishLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4323,7 +4323,7 @@ void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, uint64_t navigationID > > void WebPageProxy::didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, const ResourceError& error, const UserData& userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didFailLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", m_process->processIdentifier(), m_pageID, frameID, error.domain().utf8().data(), error.errorCode()); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didFailLoadForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64 ", domain = %s, code = %d", m_process->processIdentifier(), m_pageID.toUInt64(), frameID, error.domain().utf8().data(), error.errorCode()); > > PageClientProtector protector(pageClient()); > >@@ -4365,7 +4365,7 @@ void WebPageProxy::didFailLoadForFrame(uint64_t frameID, uint64_t navigationID, > > void WebPageProxy::didSameDocumentNavigationForFrame(uint64_t frameID, uint64_t navigationID, uint32_t opaqueSameDocumentNavigationType, URL&& url, const UserData& userData) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didSameDocumentNavigationForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didSameDocumentNavigationForFrame: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4535,7 +4535,7 @@ void WebPageProxy::beginSafeBrowsingCheck(const URL&, bool, WebFramePolicyListen > #endif > > void WebPageProxy::decidePolicyForNavigationActionAsync(uint64_t frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, uint64_t navigationID, >- NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, >+ NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, > IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, uint64_t listenerID) > { > decidePolicyForNavigationActionAsyncShared(m_process.copyRef(), frameID, WTFMove(frameSecurityOrigin), identifier, navigationID, WTFMove(navigationActionData), >@@ -4543,7 +4543,7 @@ void WebPageProxy::decidePolicyForNavigationActionAsync(uint64_t frameID, WebCor > } > > void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&& process, uint64_t frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, >- WebCore::PolicyCheckIdentifier identifier, uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, uint64_t originatingPageID, >+ WebCore::PolicyCheckIdentifier identifier, uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, > const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, > const UserData& userData, uint64_t listenerID) > { >@@ -4551,7 +4551,7 @@ void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProx > MESSAGE_CHECK(process, frame); > > auto sender = PolicyDecisionSender::create(identifier, [this, protectedThis = makeRef(*this), frameID, listenerID, process = process.copyRef()] (auto... args) { >- process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID); >+ process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID.toUInt64()); > }); > > decidePolicyForNavigationAction(process.copyRef(), *frame, WTFMove(frameSecurityOrigin), navigationID, WTFMove(navigationActionData), WTFMove(frameInfoData), originatingPageID, >@@ -4559,7 +4559,7 @@ void WebPageProxy::decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProx > } > > void WebPageProxy::decidePolicyForNavigationAction(Ref<WebProcessProxy>&& process, WebFrameProxy& frame, WebCore::SecurityOriginData&& frameSecurityOrigin, uint64_t navigationID, >- NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfoData, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, >+ NavigationActionData&& navigationActionData, FrameInfoData&& originatingFrameInfoData, Optional<PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, > IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData& userData, Ref<PolicyDecisionSender>&& sender) > { > LOG(Loading, "WebPageProxy::decidePolicyForNavigationAction - Original URL %s, current target URL %s", originalRequest.url().string().utf8().data(), request.url().string().utf8().data()); >@@ -4699,7 +4699,7 @@ void WebPageProxy::decidePolicyForNavigationAction(Ref<WebProcessProxy>&& proces > if (!fromAPI && originatingFrame == &frame) > sourceFrameInfo = destinationFrameInfo.copyRef(); > else if (!fromAPI) >- sourceFrameInfo = API::FrameInfo::create(originatingFrameInfoData, originatingPageID ? process->webPage(originatingPageID) : nullptr); >+ sourceFrameInfo = API::FrameInfo::create(originatingFrameInfoData, originatingPageID ? process->webPage(*originatingPageID) : nullptr); > > auto userInitiatedActivity = process->userInitiatedActivity(navigationActionData.userGestureTokenIdentifier); > bool shouldOpenAppLinks = !m_shouldSuppressAppLinksInNextNavigationPolicyDecision >@@ -4772,7 +4772,7 @@ void WebPageProxy::logFrameNavigation(const WebFrameProxy& frame, const URL& pag > #endif > > void WebPageProxy::decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, >- uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, uint64_t originatingPageID, >+ uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, > const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, > const UserData& userData, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&& reply) > { >@@ -4790,7 +4790,7 @@ void WebPageProxy::decidePolicyForNavigationActionSync(uint64_t frameID, bool is > } > > void WebPageProxy::decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&& process, uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&& frameSecurityOrigin, PolicyCheckIdentifier identifier, >- uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, uint64_t originatingPageID, >+ uint64_t navigationID, NavigationActionData&& navigationActionData, FrameInfoData&& frameInfoData, Optional<PageIdentifier> originatingPageID, > const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&& request, IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, > const UserData& userData, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&& reply) > { >@@ -4821,7 +4821,7 @@ void WebPageProxy::decidePolicyForNewWindowAction(uint64_t frameID, const Securi > ASSERT_UNUSED(safeBrowsingWarning, !safeBrowsingWarning); > > auto sender = PolicyDecisionSender::create(identifier, [this, protectedThis = WTFMove(protectedThis), frameID, listenerID] (auto... args) { >- m_process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID); >+ send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...)); > }); > > receivedPolicyDecision(policyAction, nullptr, WTF::nullopt, WTFMove(sender)); >@@ -4870,7 +4870,7 @@ void WebPageProxy::decidePolicyForResponseShared(Ref<WebProcessProxy>&& process, > ASSERT_UNUSED(safeBrowsingWarning, !safeBrowsingWarning); > > auto sender = PolicyDecisionSender::create(identifier, [this, protectedThis = WTFMove(protectedThis), frameID, listenerID, process = WTFMove(process)] (auto... args) { >- process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID); >+ process->send(Messages::WebPage::DidReceivePolicyDecision(frameID, listenerID, args...), m_pageID.toUInt64()); > }); > > receivedPolicyDecision(policyAction, navigation.get(), WTF::nullopt, WTFMove(sender)); >@@ -4907,7 +4907,7 @@ void WebPageProxy::willSubmitForm(uint64_t frameID, uint64_t sourceFrameID, cons > MESSAGE_CHECK(m_process, sourceFrame); > > m_formClient->willSubmitForm(*this, *frame, *sourceFrame, textFieldValues, m_process->transformHandlesToObjects(userData.object()).get(), [this, protectedThis = makeRef(*this), frameID, listenerID]() { >- m_process->send(Messages::WebPage::ContinueWillSubmitForm(frameID, listenerID), m_pageID); >+ send(Messages::WebPage::ContinueWillSubmitForm(frameID, listenerID)); > }); > } > >@@ -4923,7 +4923,7 @@ void WebPageProxy::didNavigateWithNavigationData(const WebNavigationDataStore& s > > void WebPageProxy::didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&& process, const WebNavigationDataStore& store, uint64_t frameID) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didNavigateWithNavigationDataShared: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didNavigateWithNavigationDataShared: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64()); > > PageClientProtector protector(pageClient()); > >@@ -4943,7 +4943,7 @@ void WebPageProxy::didPerformClientRedirect(const String& sourceURLString, const > > void WebPageProxy::didPerformClientRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, uint64_t frameID) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didPerformClientRedirectShared: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID, frameID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didPerformClientRedirectShared: webPID = %i, pageID = %" PRIu64 ", frameID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64(), frameID); > > PageClientProtector protector(pageClient()); > >@@ -4970,7 +4970,7 @@ void WebPageProxy::didPerformServerRedirect(const String& sourceURLString, const > > void WebPageProxy::didPerformServerRedirectShared(Ref<WebProcessProxy>&& process, const String& sourceURLString, const String& destinationURLString, uint64_t frameID) > { >- RELEASE_LOG_IF_ALLOWED(Loading, "didPerformServerRedirect: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Loading, "didPerformServerRedirect: webPID = %i, pageID = %" PRIu64, process->processIdentifier(), m_pageID.toUInt64()); > > PageClientProtector protector(pageClient()); > >@@ -5018,14 +5018,14 @@ WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_6 > #endif > } > >-void WebPageProxy::createNewPage(const FrameInfoData& originatingFrameInfoData, uint64_t originatingPageID, ResourceRequest&& request, WindowFeatures&& windowFeatures, NavigationActionData&& navigationActionData, Messages::WebPageProxy::CreateNewPage::DelayedReply&& reply) >+void WebPageProxy::createNewPage(const FrameInfoData& originatingFrameInfoData, Optional<PageIdentifier> originatingPageID, ResourceRequest&& request, WindowFeatures&& windowFeatures, NavigationActionData&& navigationActionData, Messages::WebPageProxy::CreateNewPage::DelayedReply&& reply) > { > MESSAGE_CHECK(m_process, m_process->webFrame(originatingFrameInfoData.frameID)); >- auto originatingFrameInfo = API::FrameInfo::create(originatingFrameInfoData, m_process->webPage(originatingPageID)); >+ auto originatingFrameInfo = API::FrameInfo::create(originatingFrameInfoData, originatingPageID ? m_process->webPage(*originatingPageID) : nullptr); > auto mainFrameURL = m_mainFrame ? m_mainFrame->url() : URL(); > auto completionHandler = [this, protectedThis = makeRef(*this), mainFrameURL, request, reply = WTFMove(reply)] (RefPtr<WebPageProxy> newPage) mutable { > if (!newPage) { >- reply(0, WTF::nullopt); >+ reply(WTF::nullopt, WTF::nullopt); > return; > } > >@@ -5374,7 +5374,7 @@ void WebPageProxy::runOpenPanel(uint64_t frameID, const SecurityOriginData& fram > void WebPageProxy::showShareSheet(const ShareDataWithParsedURL& shareData, ShareSheetCallbackID callbackID) > { > CompletionHandler<void(bool)> completionHandler = [this, protectedThis = makeRef(*this), callbackID] (bool access) { >- m_process->send(Messages::WebPage::DidCompleteShareSheet(access, callbackID), m_pageID); >+ send(Messages::WebPage::DidCompleteShareSheet(access, callbackID)); > }; > > pageClient().showShareSheet(shareData, WTFMove(completionHandler)); >@@ -5406,7 +5406,7 @@ void WebPageProxy::setMediaVolume(float volume) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetMediaVolume(volume), m_pageID); >+ send(Messages::WebPage::SetMediaVolume(volume)); > } > > void WebPageProxy::setMuted(WebCore::MediaProducer::MutedStateFlags state) >@@ -5422,7 +5422,7 @@ void WebPageProxy::setMuted(WebCore::MediaProducer::MutedStateFlags state) > UserMediaProcessManager::singleton().muteCaptureMediaStreamsExceptIn(*this); > #endif > >- m_process->send(Messages::WebPage::SetMuted(state), m_pageID); >+ send(Messages::WebPage::SetMuted(state)); > activityStateDidChange({ ActivityState::IsAudible, ActivityState::IsCapturingMedia }); > } > >@@ -5444,7 +5444,7 @@ void WebPageProxy::stopMediaCapture() > return; > > #if ENABLE(MEDIA_STREAM) >- m_process->send(Messages::WebPage::StopMediaCapture(), m_pageID); >+ send(Messages::WebPage::StopMediaCapture()); > #endif > } > >@@ -5453,7 +5453,7 @@ void WebPageProxy::stopAllMediaPlayback() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::StopAllMediaPlayback(), m_pageID); >+ send(Messages::WebPage::StopAllMediaPlayback()); > } > > void WebPageProxy::suspendAllMediaPlayback() >@@ -5461,7 +5461,7 @@ void WebPageProxy::suspendAllMediaPlayback() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SuspendAllMediaPlayback(), m_pageID); >+ send(Messages::WebPage::SuspendAllMediaPlayback()); > } > > void WebPageProxy::resumeAllMediaPlayback() >@@ -5469,7 +5469,7 @@ void WebPageProxy::resumeAllMediaPlayback() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ResumeAllMediaPlayback(), m_pageID); >+ send(Messages::WebPage::ResumeAllMediaPlayback()); > } > > #if ENABLE(MEDIA_SESSION) >@@ -5478,7 +5478,7 @@ void WebPageProxy::handleMediaEvent(MediaEventType eventType) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::HandleMediaEvent(eventType), m_pageID); >+ send(Messages::WebPage::HandleMediaEvent(eventType)); > } > > void WebPageProxy::setVolumeOfMediaElement(double volume, uint64_t elementID) >@@ -5486,7 +5486,7 @@ void WebPageProxy::setVolumeOfMediaElement(double volume, uint64_t elementID) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetVolumeOfMediaElement(volume, elementID), m_pageID); >+ send(Messages::WebPage::SetVolumeOfMediaElement(volume, elementID)); > } > #endif > >@@ -5500,7 +5500,7 @@ void WebPageProxy::setMayStartMediaWhenInWindow(bool mayStartMedia) > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::SetMayStartMediaWhenInWindow(mayStartMedia), m_pageID); >+ send(Messages::WebPage::SetMayStartMediaWhenInWindow(mayStartMedia)); > } > > void WebPageProxy::handleDownloadRequest(DownloadProxy& download) >@@ -5547,7 +5547,7 @@ void WebPageProxy::didChooseColor(const WebCore::Color& color) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::DidChooseColor(color), m_pageID); >+ send(Messages::WebPage::DidChooseColor(color)); > } > > void WebPageProxy::didEndColorPicker() >@@ -5556,7 +5556,7 @@ void WebPageProxy::didEndColorPicker() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::DidEndColorPicker(), m_pageID); >+ send(Messages::WebPage::DidEndColorPicker()); > } > #endif > >@@ -5590,7 +5590,7 @@ void WebPageProxy::didCloseSuggestions() > return; > > m_dataListSuggestionsDropdown = nullptr; >- m_process->send(Messages::WebPage::DidCloseSuggestions(), m_pageID); >+ send(Messages::WebPage::DidCloseSuggestions()); > } > > void WebPageProxy::didSelectOption(const String& selectedOption) >@@ -5598,7 +5598,7 @@ void WebPageProxy::didSelectOption(const String& selectedOption) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::DidSelectDataListOption(selectedOption), m_pageID); >+ send(Messages::WebPage::DidSelectDataListOption(selectedOption)); > } > > #endif >@@ -5651,7 +5651,7 @@ void WebPageProxy::setAllowsMediaDocumentInlinePlayback(bool allows) > return; > m_allowsMediaDocumentInlinePlayback = allows; > >- m_process->send(Messages::WebPage::SetAllowsMediaDocumentInlinePlayback(allows), m_pageID); >+ send(Messages::WebPage::SetAllowsMediaDocumentInlinePlayback(allows)); > } > #endif > >@@ -5834,17 +5834,17 @@ IPC::Connection* WebPageProxy::messageSenderConnection() const > > uint64_t WebPageProxy::messageSenderDestinationID() const > { >- return m_pageID; >+ return m_pageID.toUInt64(); > } > > void WebPageProxy::valueChangedForPopupMenu(WebPopupMenuProxy*, int32_t newSelectedIndex) > { >- m_process->send(Messages::WebPage::DidChangeSelectedIndexForActivePopupMenu(newSelectedIndex), m_pageID); >+ send(Messages::WebPage::DidChangeSelectedIndexForActivePopupMenu(newSelectedIndex)); > } > > void WebPageProxy::setTextFromItemForPopupMenu(WebPopupMenuProxy*, int32_t index) > { >- m_process->send(Messages::WebPage::SetTextForActivePopupMenu(index), m_pageID); >+ send(Messages::WebPage::SetTextForActivePopupMenu(index)); > } > > bool WebPageProxy::isProcessingKeyboardEvents() const >@@ -5879,13 +5879,13 @@ void WebPageProxy::postMessageToInjectedBundle(const String& messageName, API::O > // For backward-compatibility, make sure we launch the initial process if the client asks to post a message to its injected bundle before doing a load. > launchInitialProcessIfNecessary(); > >- process().send(Messages::WebPage::PostInjectedBundleMessage(messageName, UserData(process().transformObjectsToHandles(messageBody).get())), m_pageID); >+ send(Messages::WebPage::PostInjectedBundleMessage(messageName, UserData(process().transformObjectsToHandles(messageBody).get()))); > } > > #if PLATFORM(GTK) > void WebPageProxy::failedToShowPopupMenu() > { >- m_process->send(Messages::WebPage::FailedToShowPopupMenu(), m_pageID); >+ send(Messages::WebPage::FailedToShowPopupMenu()); > } > #endif > >@@ -5952,7 +5952,7 @@ void WebPageProxy::showContextMenu(ContextMenuContextData&& contextMenuContextDa > m_activeContextMenu->show(); > > // No matter the result of internalShowContextMenu, always notify the WebProcess that the menu is hidden so it starts handling mouse events again. >- m_process->send(Messages::WebPage::ContextMenuHidden(), m_pageID); >+ send(Messages::WebPage::ContextMenuHidden()); > } > > void WebPageProxy::contextMenuItemSelected(const WebContextMenuItemData& item) >@@ -6030,12 +6030,12 @@ void WebPageProxy::contextMenuItemSelected(const WebContextMenuItemData& item) > if (item.action() == ContextMenuItemTagLearnSpelling || item.action() == ContextMenuItemTagIgnoreSpelling) > ++m_pendingLearnOrIgnoreWordMessageCount; > >- m_process->send(Messages::WebPage::DidSelectItemFromActiveContextMenu(item), m_pageID); >+ send(Messages::WebPage::DidSelectItemFromActiveContextMenu(item)); > } > > void WebPageProxy::handleContextMenuKeyEvent() > { >- m_process->send(Messages::WebPage::ContextMenuForKeyEvent(), m_pageID); >+ send(Messages::WebPage::ContextMenuForKeyEvent()); > } > #endif // ENABLE(CONTEXT_MENUS) > >@@ -6051,10 +6051,10 @@ void WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon(const Vect > for (size_t i = 0; i < fileURLs.size(); ++i) > SandboxExtension::createHandle(fileURLs[i], SandboxExtension::Type::ReadOnly, sandboxExtensionHandles[i]); > >- m_process->send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles), m_pageID); >+ send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles)); > #endif > >- m_process->send(Messages::WebPage::DidChooseFilesForOpenPanelWithDisplayStringAndIcon(fileURLs, displayString, iconData ? iconData->dataReference() : IPC::DataReference()), m_pageID); >+ send(Messages::WebPage::DidChooseFilesForOpenPanelWithDisplayStringAndIcon(fileURLs, displayString, iconData ? iconData->dataReference() : IPC::DataReference())); > > m_openPanelResultListener->invalidate(); > m_openPanelResultListener = nullptr; >@@ -6079,10 +6079,10 @@ void WebPageProxy::didChooseFilesForOpenPanel(const Vector<String>& fileURLs) > } > } > >- m_process->send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles), m_pageID); >+ send(Messages::WebPage::ExtendSandboxForFilesFromOpenPanel(sandboxExtensionHandles)); > #endif > >- m_process->send(Messages::WebPage::DidChooseFilesForOpenPanel(fileURLs), m_pageID); >+ send(Messages::WebPage::DidChooseFilesForOpenPanel(fileURLs)); > > m_openPanelResultListener->invalidate(); > m_openPanelResultListener = nullptr; >@@ -6093,7 +6093,7 @@ void WebPageProxy::didCancelForOpenPanel() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::DidCancelForOpenPanel(), m_pageID); >+ send(Messages::WebPage::DidCancelForOpenPanel()); > > m_openPanelResultListener->invalidate(); > m_openPanelResultListener = nullptr; >@@ -6101,7 +6101,7 @@ void WebPageProxy::didCancelForOpenPanel() > > void WebPageProxy::advanceToNextMisspelling(bool startBeforeSelection) > { >- m_process->send(Messages::WebPage::AdvanceToNextMisspelling(startBeforeSelection), m_pageID); >+ send(Messages::WebPage::AdvanceToNextMisspelling(startBeforeSelection)); > } > > void WebPageProxy::changeSpellingToWord(const String& word) >@@ -6109,7 +6109,7 @@ void WebPageProxy::changeSpellingToWord(const String& word) > if (word.isEmpty()) > return; > >- m_process->send(Messages::WebPage::ChangeSpellingToWord(word), m_pageID); >+ send(Messages::WebPage::ChangeSpellingToWord(word)); > } > > void WebPageProxy::registerEditCommand(Ref<WebEditCommandProxy>&& commandProxy, UndoOrRedo undoOrRedo) >@@ -6128,7 +6128,7 @@ void WebPageProxy::removeEditCommand(WebEditCommandProxy& command) > > if (!hasRunningProcess()) > return; >- m_process->send(Messages::WebPage::DidRemoveEditCommand(command.commandID()), m_pageID); >+ send(Messages::WebPage::DidRemoveEditCommand(command.commandID())); > } > > bool WebPageProxy::canUndo() >@@ -6217,12 +6217,12 @@ void WebPageProxy::requestCheckingOfString(uint64_t requestID, const TextCheckin > > void WebPageProxy::didFinishCheckingText(uint64_t requestID, const Vector<WebCore::TextCheckingResult>& result) > { >- m_process->send(Messages::WebPage::DidFinishCheckingText(requestID, result), m_pageID); >+ send(Messages::WebPage::DidFinishCheckingText(requestID, result)); > } > > void WebPageProxy::didCancelCheckingText(uint64_t requestID) > { >- m_process->send(Messages::WebPage::DidCancelCheckingText(requestID), m_pageID); >+ send(Messages::WebPage::DidCancelCheckingText(requestID)); > } > // Other > >@@ -6351,7 +6351,7 @@ void WebPageProxy::didReceiveEvent(uint32_t opaqueType, bool handled) > bool canProcessMoreKeyEvents = !m_keyEventQueue.isEmpty(); > if (canProcessMoreKeyEvents) { > LOG(KeyHandling, " UI process: sent keyEvent from didReceiveEvent"); >- m_process->send(Messages::WebPage::KeyEvent(m_keyEventQueue.first()), m_pageID); >+ send(Messages::WebPage::KeyEvent(m_keyEventQueue.first())); > } > > // The call to doneWithKeyEvent may close this WebPage. >@@ -6715,7 +6715,7 @@ void WebPageProxy::frameSetLargestFrameChanged(uint64_t frameID) > > void WebPageProxy::processDidBecomeUnresponsive() > { >- RELEASE_LOG_IF_ALLOWED(Process, "processDidBecomeUnresponsive: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Process, "processDidBecomeUnresponsive: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (!hasRunningProcess()) > return; >@@ -6727,7 +6727,7 @@ void WebPageProxy::processDidBecomeUnresponsive() > > void WebPageProxy::processDidBecomeResponsive() > { >- RELEASE_LOG_IF_ALLOWED(Process, "processDidBecomeResponsive: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID); >+ RELEASE_LOG_IF_ALLOWED(Process, "processDidBecomeResponsive: webPID = %i, pageID = %" PRIu64, m_process->processIdentifier(), m_pageID.toUInt64()); > > if (!hasRunningProcess()) > return; >@@ -7233,7 +7233,7 @@ void WebPageProxy::backForwardClear() > > void WebPageProxy::gamepadActivity(const Vector<GamepadData>& gamepadDatas, bool shouldMakeGamepadsVisible) > { >- m_process->send(Messages::WebPage::GamepadActivity(gamepadDatas, shouldMakeGamepadsVisible), m_pageID); >+ send(Messages::WebPage::GamepadActivity(gamepadDatas, shouldMakeGamepadsVisible)); > } > > #endif >@@ -7539,7 +7539,7 @@ bool WebPageProxy::willHandleHorizontalScrollEvents() const > > void WebPageProxy::updateWebsitePolicies(WebsitePoliciesData&& websitePolicies) > { >- m_process->send(Messages::WebPage::UpdateWebsitePolicies(websitePolicies), m_pageID); >+ send(Messages::WebPage::UpdateWebsitePolicies(websitePolicies)); > } > > void WebPageProxy::didFinishLoadingDataForCustomContentProvider(const String& suggestedFilename, const IPC::DataReference& dataReference) >@@ -7549,7 +7549,7 @@ void WebPageProxy::didFinishLoadingDataForCustomContentProvider(const String& su > > void WebPageProxy::backForwardRemovedItem(const BackForwardItemIdentifier& itemID) > { >- m_process->send(Messages::WebPage::DidRemoveBackForwardItem(itemID), m_pageID); >+ send(Messages::WebPage::DidRemoveBackForwardItem(itemID)); > } > > void WebPageProxy::setCanRunModal(bool canRunModal) >@@ -7562,7 +7562,7 @@ void WebPageProxy::setCanRunModal(bool canRunModal) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetCanRunModal(m_canRunModal), m_pageID); >+ send(Messages::WebPage::SetCanRunModal(m_canRunModal)); > } > > bool WebPageProxy::canRunModal() >@@ -7576,7 +7576,7 @@ void WebPageProxy::beginPrinting(WebFrameProxy* frame, const PrintInfo& printInf > return; > > m_isInPrintingMode = true; >- m_process->send(Messages::WebPage::BeginPrinting(frame->frameID(), printInfo), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::BeginPrinting(frame->frameID(), printInfo), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > > void WebPageProxy::endPrinting() >@@ -7585,7 +7585,7 @@ void WebPageProxy::endPrinting() > return; > > m_isInPrintingMode = false; >- m_process->send(Messages::WebPage::EndPrinting(), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::EndPrinting(), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > > void WebPageProxy::computePagesForPrinting(WebFrameProxy* frame, const PrintInfo& printInfo, Ref<ComputedPagesCallback>&& callback) >@@ -7598,7 +7598,7 @@ void WebPageProxy::computePagesForPrinting(WebFrameProxy* frame, const PrintInfo > auto callbackID = callback->callbackID(); > m_callbacks.put(WTFMove(callback)); > m_isInPrintingMode = true; >- m_process->send(Messages::WebPage::ComputePagesForPrinting(frame->frameID(), printInfo, callbackID), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::ComputePagesForPrinting(frame->frameID(), printInfo, callbackID), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > > #if PLATFORM(COCOA) >@@ -7611,7 +7611,7 @@ void WebPageProxy::drawRectToImage(WebFrameProxy* frame, const PrintInfo& printI > > auto callbackID = callback->callbackID(); > m_callbacks.put(WTFMove(callback)); >- m_process->send(Messages::WebPage::DrawRectToImage(frame->frameID(), printInfo, rect, imageSize, callbackID), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::DrawRectToImage(frame->frameID(), printInfo, rect, imageSize, callbackID), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > > void WebPageProxy::drawPagesToPDF(WebFrameProxy* frame, const PrintInfo& printInfo, uint32_t first, uint32_t count, Ref<DataCallback>&& callback) >@@ -7623,7 +7623,7 @@ void WebPageProxy::drawPagesToPDF(WebFrameProxy* frame, const PrintInfo& printIn > > auto callbackID = callback->callbackID(); > m_callbacks.put(WTFMove(callback)); >- m_process->send(Messages::WebPage::DrawPagesToPDF(frame->frameID(), printInfo, first, count, callbackID), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::DrawPagesToPDF(frame->frameID(), printInfo, first, count, callbackID), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > #elif PLATFORM(GTK) > void WebPageProxy::drawPagesForPrinting(WebFrameProxy* frame, const PrintInfo& printInfo, Ref<PrintFinishedCallback>&& callback) >@@ -7636,7 +7636,7 @@ void WebPageProxy::drawPagesForPrinting(WebFrameProxy* frame, const PrintInfo& p > auto callbackID = callback->callbackID(); > m_callbacks.put(WTFMove(callback)); > m_isInPrintingMode = true; >- m_process->send(Messages::WebPage::DrawPagesForPrinting(frame->frameID(), printInfo, callbackID), m_pageID, printingSendOptions(m_isPerformingDOMPrintOperation)); >+ send(Messages::WebPage::DrawPagesForPrinting(frame->frameID(), printInfo, callbackID), printingSendOptions(m_isPerformingDOMPrintOperation)); > } > #endif > >@@ -7681,7 +7681,7 @@ void WebPageProxy::setViewLayoutSize(const IntSize& viewLayoutSize) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetViewLayoutSize(viewLayoutSize), m_pageID); >+ send(Messages::WebPage::SetViewLayoutSize(viewLayoutSize)); > m_drawingArea->viewLayoutSizeDidChange(); > > #if USE(APPKIT) >@@ -7700,7 +7700,7 @@ void WebPageProxy::setAutoSizingShouldExpandToViewHeight(bool shouldExpand) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetAutoSizingShouldExpandToViewHeight(shouldExpand), m_pageID); >+ send(Messages::WebPage::SetAutoSizingShouldExpandToViewHeight(shouldExpand)); > } > > void WebPageProxy::setViewportSizeForCSSViewportUnits(const IntSize& viewportSize) >@@ -7713,7 +7713,7 @@ void WebPageProxy::setViewportSizeForCSSViewportUnits(const IntSize& viewportSiz > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetViewportSizeForCSSViewportUnits(viewportSize), m_pageID); >+ send(Messages::WebPage::SetViewportSizeForCSSViewportUnits(viewportSize)); > } > > #if USE(AUTOMATIC_TEXT_REPLACEMENT) >@@ -7784,7 +7784,7 @@ void WebPageProxy::recordAutocorrectionResponse(int32_t response, const String& > void WebPageProxy::handleAlternativeTextUIResult(const String& result) > { > if (!isClosed()) >- m_process->send(Messages::WebPage::HandleAlternativeTextUIResult(result), m_pageID); >+ send(Messages::WebPage::HandleAlternativeTextUIResult(result)); > } > > #if USE(DICTATION_ALTERNATIVES) >@@ -7825,7 +7825,7 @@ void WebPageProxy::setComposition(const String& text, Vector<CompositionUnderlin > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::SetComposition(text, underlines, selectionStart, selectionEnd, replacementRangeStart, replacementRangeEnd), m_pageID); >+ send(Messages::WebPage::SetComposition(text, underlines, selectionStart, selectionEnd, replacementRangeStart, replacementRangeEnd)); > } > > void WebPageProxy::confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength) >@@ -7833,7 +7833,7 @@ void WebPageProxy::confirmComposition(const String& compositionString, int64_t s > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::ConfirmComposition(compositionString, selectionStart, selectionLength), m_pageID); >+ send(Messages::WebPage::ConfirmComposition(compositionString, selectionStart, selectionLength)); > } > > void WebPageProxy::cancelComposition() >@@ -7841,7 +7841,7 @@ void WebPageProxy::cancelComposition() > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::CancelComposition(), m_pageID); >+ send(Messages::WebPage::CancelComposition()); > } > #endif // PLATFORM(GTK) > >@@ -7858,7 +7858,7 @@ void WebPageProxy::setScrollPinningBehavior(ScrollPinningBehavior pinning) > m_scrollPinningBehavior = pinning; > > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::SetScrollPinningBehavior(pinning), m_pageID); >+ send(Messages::WebPage::SetScrollPinningBehavior(pinning)); > } > > void WebPageProxy::setOverlayScrollbarStyle(Optional<WebCore::ScrollbarOverlayStyle> scrollbarStyle) >@@ -7876,7 +7876,7 @@ void WebPageProxy::setOverlayScrollbarStyle(Optional<WebCore::ScrollbarOverlaySt > scrollbarStyleForMessage = static_cast<ScrollbarOverlayStyle>(scrollbarStyle.value()); > > if (hasRunningProcess()) >- m_process->send(Messages::WebPage::SetScrollbarOverlayStyle(scrollbarStyleForMessage), m_pageID); >+ send(Messages::WebPage::SetScrollbarOverlayStyle(scrollbarStyleForMessage)); > } > > #if ENABLE(WEB_CRYPTO) >@@ -7921,7 +7921,7 @@ void WebPageProxy::signedPublicKeyAndChallengeString(unsigned keySizeIndex, cons > > void WebPageProxy::addMIMETypeWithCustomContentProvider(const String& mimeType) > { >- m_process->send(Messages::WebPage::AddMIMETypeWithCustomContentProvider(mimeType), m_pageID); >+ send(Messages::WebPage::AddMIMETypeWithCustomContentProvider(mimeType)); > } > > void WebPageProxy::changeFontAttributes(WebCore::FontAttributeChanges&& changes) >@@ -7929,7 +7929,7 @@ void WebPageProxy::changeFontAttributes(WebCore::FontAttributeChanges&& changes) > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::ChangeFontAttributes(WTFMove(changes)), m_pageID); >+ send(Messages::WebPage::ChangeFontAttributes(WTFMove(changes))); > } > > void WebPageProxy::changeFont(WebCore::FontChanges&& changes) >@@ -7937,7 +7937,7 @@ void WebPageProxy::changeFont(WebCore::FontChanges&& changes) > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::ChangeFont(WTFMove(changes)), m_pageID); >+ send(Messages::WebPage::ChangeFont(WTFMove(changes))); > } > > #if PLATFORM(COCOA) >@@ -7945,7 +7945,7 @@ void WebPageProxy::changeFont(WebCore::FontChanges&& changes) > void WebPageProxy::setTextAsync(const String& text) > { > if (hasRunningProcess()) >- process().send(Messages::WebPage::SetTextAsync(text), m_pageID); >+ send(Messages::WebPage::SetTextAsync(text)); > } > > void WebPageProxy::insertTextAsync(const String& text, const EditingRange& replacementRange, InsertTextOptions&& options) >@@ -7953,7 +7953,7 @@ void WebPageProxy::insertTextAsync(const String& text, const EditingRange& repla > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::InsertTextAsync(text, replacementRange, WTFMove(options)), m_pageID); >+ send(Messages::WebPage::InsertTextAsync(text, replacementRange, WTFMove(options))); > } > > void WebPageProxy::hasMarkedText(CompletionHandler<void(bool)>&& callback) >@@ -7962,7 +7962,7 @@ void WebPageProxy::hasMarkedText(CompletionHandler<void(bool)>&& callback) > callback(false); > return; > } >- m_process->connection()->sendWithAsyncReply(Messages::WebPage::HasMarkedText(), WTFMove(callback), m_pageID); >+ sendWithAsyncReply(Messages::WebPage::HasMarkedText(), WTFMove(callback)); > } > > void WebPageProxy::getMarkedRangeAsync(WTF::Function<void (EditingRange, CallbackBase::Error)>&& callbackFunction) >@@ -7973,7 +7973,7 @@ void WebPageProxy::getMarkedRangeAsync(WTF::Function<void (EditingRange, Callbac > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- process().send(Messages::WebPage::GetMarkedRangeAsync(callbackID), m_pageID); >+ send(Messages::WebPage::GetMarkedRangeAsync(callbackID)); > } > > void WebPageProxy::getSelectedRangeAsync(WTF::Function<void (EditingRange, CallbackBase::Error)>&& callbackFunction) >@@ -7984,7 +7984,7 @@ void WebPageProxy::getSelectedRangeAsync(WTF::Function<void (EditingRange, Callb > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- process().send(Messages::WebPage::GetSelectedRangeAsync(callbackID), m_pageID); >+ send(Messages::WebPage::GetSelectedRangeAsync(callbackID)); > } > > void WebPageProxy::characterIndexForPointAsync(const WebCore::IntPoint& point, WTF::Function<void (uint64_t, CallbackBase::Error)>&& callbackFunction) >@@ -7995,7 +7995,7 @@ void WebPageProxy::characterIndexForPointAsync(const WebCore::IntPoint& point, W > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- process().send(Messages::WebPage::CharacterIndexForPointAsync(point, callbackID), m_pageID); >+ send(Messages::WebPage::CharacterIndexForPointAsync(point, callbackID)); > } > > void WebPageProxy::firstRectForCharacterRangeAsync(const EditingRange& range, WTF::Function<void (const WebCore::IntRect&, const EditingRange&, CallbackBase::Error)>&& callbackFunction) >@@ -8006,7 +8006,7 @@ void WebPageProxy::firstRectForCharacterRangeAsync(const EditingRange& range, WT > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- process().send(Messages::WebPage::FirstRectForCharacterRangeAsync(range, callbackID), m_pageID); >+ send(Messages::WebPage::FirstRectForCharacterRangeAsync(range, callbackID)); > } > > void WebPageProxy::setCompositionAsync(const String& text, const Vector<CompositionUnderline>& underlines, const EditingRange& selectionRange, const EditingRange& replacementRange) >@@ -8017,7 +8017,7 @@ void WebPageProxy::setCompositionAsync(const String& text, const Vector<Composit > return; > } > >- process().send(Messages::WebPage::SetCompositionAsync(text, underlines, selectionRange, replacementRange), m_pageID); >+ send(Messages::WebPage::SetCompositionAsync(text, underlines, selectionRange, replacementRange)); > } > > void WebPageProxy::confirmCompositionAsync() >@@ -8025,7 +8025,7 @@ void WebPageProxy::confirmCompositionAsync() > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::ConfirmCompositionAsync(), m_pageID); >+ send(Messages::WebPage::ConfirmCompositionAsync()); > } > > void WebPageProxy::setScrollPerformanceDataCollectionEnabled(bool enabled) >@@ -8050,7 +8050,7 @@ void WebPageProxy::takeSnapshot(IntRect rect, IntSize bitmapSize, SnapshotOption > } > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::TakeSnapshot(rect, bitmapSize, options, callbackID), m_pageID); >+ send(Messages::WebPage::TakeSnapshot(rect, bitmapSize, options, callbackID)); > } > > void WebPageProxy::navigationGestureDidBegin() >@@ -8208,7 +8208,7 @@ void WebPageProxy::requestActiveNowPlayingSessionInfo(Ref<NowPlayingInfoCallback > auto callbackID = callback->callbackID(); > m_callbacks.put(WTFMove(callback)); > >- m_process->send(Messages::WebPage::RequestActiveNowPlayingSessionInfo(callbackID), m_pageID); >+ send(Messages::WebPage::RequestActiveNowPlayingSessionInfo(callbackID)); > } > > void WebPageProxy::nowPlayingInfoCallback(bool hasActiveSession, bool registeredAsNowPlayingApplication, const String& title, double duration, double elapsedTime, uint64_t uniqueIdentifier, CallbackID callbackID) >@@ -8251,22 +8251,22 @@ void WebPageProxy::handleAutoplayEvent(WebCore::AutoplayEvent event, OptionSet<A > #if PLATFORM(MAC) > void WebPageProxy::performImmediateActionHitTestAtLocation(FloatPoint point) > { >- m_process->send(Messages::WebPage::PerformImmediateActionHitTestAtLocation(point), m_pageID); >+ send(Messages::WebPage::PerformImmediateActionHitTestAtLocation(point)); > } > > void WebPageProxy::immediateActionDidUpdate() > { >- m_process->send(Messages::WebPage::ImmediateActionDidUpdate(), m_pageID); >+ send(Messages::WebPage::ImmediateActionDidUpdate()); > } > > void WebPageProxy::immediateActionDidCancel() > { >- m_process->send(Messages::WebPage::ImmediateActionDidCancel(), m_pageID); >+ send(Messages::WebPage::ImmediateActionDidCancel()); > } > > void WebPageProxy::immediateActionDidComplete() > { >- m_process->send(Messages::WebPage::ImmediateActionDidComplete(), m_pageID); >+ send(Messages::WebPage::ImmediateActionDidComplete()); > } > > void WebPageProxy::didPerformImmediateActionHitTest(const WebHitTestResultData& result, bool contentPreventsDefault, const UserData& userData) >@@ -8281,7 +8281,7 @@ NSObject *WebPageProxy::immediateActionAnimationControllerForHitTestResult(RefPt > > void WebPageProxy::handleAcceptedCandidate(WebCore::TextCheckingResult acceptedCandidate) > { >- m_process->send(Messages::WebPage::HandleAcceptedCandidate(acceptedCandidate), m_pageID); >+ send(Messages::WebPage::HandleAcceptedCandidate(acceptedCandidate)); > } > > void WebPageProxy::didHandleAcceptedCandidate() >@@ -8299,17 +8299,17 @@ void WebPageProxy::setUseSystemAppearance(bool useSystemAppearance) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetUseSystemAppearance(useSystemAppearance), m_pageID); >+ send(Messages::WebPage::SetUseSystemAppearance(useSystemAppearance)); > } > > void WebPageProxy::setHeaderBannerHeightForTesting(int height) > { >- m_process->send(Messages::WebPage::SetHeaderBannerHeightForTesting(height), m_pageID); >+ send(Messages::WebPage::SetHeaderBannerHeightForTesting(height)); > } > > void WebPageProxy::setFooterBannerHeightForTesting(int height) > { >- m_process->send(Messages::WebPage::SetFooterBannerHeightForTesting(height), m_pageID); >+ send(Messages::WebPage::SetFooterBannerHeightForTesting(height)); > } > > #endif >@@ -8335,7 +8335,7 @@ void WebPageProxy::imageOrMediaDocumentSizeChanged(const WebCore::IntSize& newSi > > void WebPageProxy::setShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents) > { >- m_process->send(Messages::WebPage::SetShouldDispatchFakeMouseMoveEvents(shouldDispatchFakeMouseMoveEvents), m_pageID); >+ send(Messages::WebPage::SetShouldDispatchFakeMouseMoveEvents(shouldDispatchFakeMouseMoveEvents)); > } > > void WebPageProxy::handleAutoFillButtonClick(const UserData& userData) >@@ -8384,7 +8384,7 @@ void WebPageProxy::setPlaybackTarget(uint64_t contextId, Ref<MediaPlaybackTarget > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::PlaybackTargetSelected(contextId, target->targetContext()), m_pageID); >+ send(Messages::WebPage::PlaybackTargetSelected(contextId, target->targetContext())); > } > > void WebPageProxy::externalOutputDeviceAvailableDidChange(uint64_t contextId, bool available) >@@ -8392,7 +8392,7 @@ void WebPageProxy::externalOutputDeviceAvailableDidChange(uint64_t contextId, bo > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::PlaybackTargetAvailabilityDidChange(contextId, available), m_pageID); >+ send(Messages::WebPage::PlaybackTargetAvailabilityDidChange(contextId, available)); > } > > void WebPageProxy::setShouldPlayToPlaybackTarget(uint64_t contextId, bool shouldPlay) >@@ -8400,7 +8400,7 @@ void WebPageProxy::setShouldPlayToPlaybackTarget(uint64_t contextId, bool should > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetShouldPlayToPlaybackTarget(contextId, shouldPlay), m_pageID); >+ send(Messages::WebPage::SetShouldPlayToPlaybackTarget(contextId, shouldPlay)); > } > #endif > >@@ -8426,7 +8426,7 @@ void WebPageProxy::clearWheelEventTestTrigger() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::ClearWheelEventTestTrigger(), m_pageID); >+ send(Messages::WebPage::ClearWheelEventTestTrigger()); > } > > void WebPageProxy::callAfterNextPresentationUpdate(WTF::Function<void (CallbackBase::Error)>&& callback) >@@ -8449,7 +8449,7 @@ void WebPageProxy::setShouldScaleViewToFitDocument(bool shouldScaleViewToFitDocu > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetShouldScaleViewToFitDocument(shouldScaleViewToFitDocument), m_pageID); >+ send(Messages::WebPage::SetShouldScaleViewToFitDocument(shouldScaleViewToFitDocument)); > } > > void WebPageProxy::didRestoreScrollPosition() >@@ -8469,7 +8469,7 @@ void WebPageProxy::getLoadDecisionForIcon(const WebCore::LinkIcon& icon, Callbac > bool decision = (bool)callbackFunction; > auto newCallbackIdentifier = decision ? OptionalCallbackID(m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken())) : OptionalCallbackID(); > >- m_process->send(Messages::WebPage::DidGetLoadDecisionForIcon(decision, loadIdentifier, newCallbackIdentifier), m_pageID); >+ send(Messages::WebPage::DidGetLoadDecisionForIcon(decision, loadIdentifier, newCallbackIdentifier)); > }); > } > >@@ -8488,7 +8488,7 @@ void WebPageProxy::setResourceCachingDisabled(bool disabled) > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetResourceCachingDisabled(disabled), m_pageID); >+ send(Messages::WebPage::SetResourceCachingDisabled(disabled)); > } > > WebCore::UserInterfaceLayoutDirection WebPageProxy::userInterfaceLayoutDirection() >@@ -8501,7 +8501,7 @@ void WebPageProxy::setUserInterfaceLayoutDirection(WebCore::UserInterfaceLayoutD > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::SetUserInterfaceLayoutDirection(static_cast<uint32_t>(userInterfaceLayoutDirection)), m_pageID); >+ send(Messages::WebPage::SetUserInterfaceLayoutDirection(static_cast<uint32_t>(userInterfaceLayoutDirection))); > } > > void WebPageProxy::hideValidationMessage() >@@ -8548,14 +8548,14 @@ void WebPageProxy::didAllowPointerLock() > CGDisplayHideCursor(CGMainDisplayID()); > CGAssociateMouseAndMouseCursorPosition(false); > #endif >- m_process->send(Messages::WebPage::DidAcquirePointerLock(), m_pageID); >+ send(Messages::WebPage::DidAcquirePointerLock()); > } > > void WebPageProxy::didDenyPointerLock() > { > ASSERT(m_isPointerLockPending && !m_isPointerLocked); > m_isPointerLockPending = false; >- m_process->send(Messages::WebPage::DidNotAcquirePointerLock(), m_pageID); >+ send(Messages::WebPage::DidNotAcquirePointerLock()); > } > > void WebPageProxy::requestPointerUnlock() >@@ -8566,12 +8566,12 @@ void WebPageProxy::requestPointerUnlock() > CGDisplayShowCursor(CGMainDisplayID()); > #endif > m_uiClient->didLosePointerLock(this); >- m_process->send(Messages::WebPage::DidLosePointerLock(), m_pageID); >+ send(Messages::WebPage::DidLosePointerLock()); > } > > if (m_isPointerLockPending) { > m_uiClient->didLosePointerLock(this); >- m_process->send(Messages::WebPage::DidNotAcquirePointerLock(), m_pageID); >+ send(Messages::WebPage::DidNotAcquirePointerLock()); > } > > m_isPointerLocked = false; >@@ -8592,7 +8592,7 @@ void WebPageProxy::setURLSchemeHandlerForScheme(Ref<WebURLSchemeHandler>&& handl > auto identifierResult = m_urlSchemeHandlersByIdentifier.add(identifier, WTFMove(handler)); > ASSERT_UNUSED(identifierResult, identifierResult.isNewEntry); > >- m_process->send(Messages::WebPage::RegisterURLSchemeHandler(identifier, canonicalizedScheme.value()), m_pageID); >+ send(Messages::WebPage::RegisterURLSchemeHandler(identifier, canonicalizedScheme.value())); > } > > WebURLSchemeHandler* WebPageProxy::urlSchemeHandlerForScheme(const String& scheme) >@@ -8651,7 +8651,7 @@ void WebPageProxy::effectiveAppearanceDidChange() > if (!hasRunningProcess()) > return; > >- m_process->send(Messages::WebPage::EffectiveAppearanceDidChange(useDarkAppearance(), useInactiveAppearance()), m_pageID); >+ send(Messages::WebPage::EffectiveAppearanceDidChange(useDarkAppearance(), useInactiveAppearance())); > } > > #if PLATFORM(COCOA) >@@ -8690,7 +8690,7 @@ void WebPageProxy::insertAttachment(Ref<API::Attachment>&& attachment, Function< > > auto attachmentIdentifier = attachment->identifier(); > auto callbackID = m_callbacks.put(WTFMove(callback), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::InsertAttachment(attachmentIdentifier, attachment->fileSizeForDisplay(), attachment->fileName(), attachment->contentType(), callbackID), m_pageID); >+ send(Messages::WebPage::InsertAttachment(attachmentIdentifier, attachment->fileSizeForDisplay(), attachment->fileName(), attachment->contentType(), callbackID)); > m_attachmentIdentifierToAttachmentMap.set(attachmentIdentifier, WTFMove(attachment)); > } > >@@ -8706,7 +8706,7 @@ void WebPageProxy::updateAttachmentAttributes(const API::Attachment& attachment, > dataReference = { *data }; > > auto callbackID = m_callbacks.put(WTFMove(callback), m_process->throttler().backgroundActivityToken()); >- m_process->send(Messages::WebPage::UpdateAttachmentAttributes(attachment.identifier(), attachment.fileSizeForDisplay(), attachment.contentType(), attachment.fileName(), WTFMove(dataReference), callbackID), m_pageID); >+ send(Messages::WebPage::UpdateAttachmentAttributes(attachment.identifier(), attachment.fileSizeForDisplay(), attachment.contentType(), attachment.fileName(), WTFMove(dataReference), callbackID)); > } > > void WebPageProxy::registerAttachmentIdentifierFromData(const String& identifier, const String& contentType, const String& preferredFileName, const IPC::DataReference& data) >@@ -8866,7 +8866,7 @@ void WebPageProxy::getApplicationManifest(Function<void(const Optional<WebCore:: > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > m_loadDependentStringCallbackIDs.add(callbackID); >- m_process->send(Messages::WebPage::GetApplicationManifest(callbackID), m_pageID); >+ send(Messages::WebPage::GetApplicationManifest(callbackID)); > } > #endif > >@@ -8930,7 +8930,7 @@ void WebPageProxy::reportPageLoadResult(const ResourceError& error) > > void WebPageProxy::setDefersLoadingForTesting(bool defersLoading) > { >- m_process->send(Messages::WebPage::SetDefersLoading(defersLoading), m_pageID); >+ send(Messages::WebPage::SetDefersLoading(defersLoading)); > } > > void WebPageProxy::getIsViewVisible(bool& result) >@@ -8942,7 +8942,7 @@ void WebPageProxy::updateCurrentModifierState() > { > #if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) || PLATFORM(IOS_FAMILY) > auto modifiers = PlatformKeyboardEvent::currentStateOfModifierKeys(); >- m_process->send(Messages::WebPage::UpdateCurrentModifierState(modifiers), m_pageID); >+ send(Messages::WebPage::UpdateCurrentModifierState(modifiers)); > #endif > } > >@@ -8984,19 +8984,19 @@ void WebPageProxy::willAcquireUniversalFileReadSandboxExtension(WebProcessProxy& > > void WebPageProxy::simulateDeviceOrientationChange(double alpha, double beta, double gamma) > { >- m_process->send(Messages::WebPage::SimulateDeviceOrientationChange(alpha, beta, gamma), m_pageID); >+ send(Messages::WebPage::SimulateDeviceOrientationChange(alpha, beta, gamma)); > } > > #if ENABLE(DATA_DETECTION) > > void WebPageProxy::detectDataInAllFrames(WebCore::DataDetectorTypes types, CompletionHandler<void(const DataDetectionResult&)>&& completionHandler) > { >- m_process->connection()->sendWithAsyncReply(Messages::WebPage::DetectDataInAllFrames(static_cast<uint64_t>(types)), WTFMove(completionHandler), m_pageID); >+ sendWithAsyncReply(Messages::WebPage::DetectDataInAllFrames(static_cast<uint64_t>(types)), WTFMove(completionHandler)); > } > > void WebPageProxy::removeDataDetectedLinks(CompletionHandler<void(const DataDetectionResult&)>&& completionHandler) > { >- m_process->connection()->sendWithAsyncReply(Messages::WebPage::RemoveDataDetectedLinks(), WTFMove(completionHandler), m_pageID); >+ sendWithAsyncReply(Messages::WebPage::RemoveDataDetectedLinks(), WTFMove(completionHandler)); > } > > #endif >@@ -9146,7 +9146,7 @@ void WebPageProxy::textInputContextsInRect(WebCore::FloatRect rect, CompletionHa > return; > } > >- m_process->connection()->sendWithAsyncReply(Messages::WebPage::TextInputContextsInRect(rect), WTFMove(completionHandler), m_pageID); >+ sendWithAsyncReply(Messages::WebPage::TextInputContextsInRect(rect), WTFMove(completionHandler)); > } > > void WebPageProxy::focusTextInputContext(const TextInputContext& context, CompletionHandler<void(bool)>&& completionHandler) >@@ -9156,7 +9156,7 @@ void WebPageProxy::focusTextInputContext(const TextInputContext& context, Comple > return; > } > >- m_process->connection()->sendWithAsyncReply(Messages::WebPage::FocusTextInputContext(context), WTFMove(completionHandler), m_pageID); >+ sendWithAsyncReply(Messages::WebPage::FocusTextInputContext(context), WTFMove(completionHandler)); > } > > Logger& WebPageProxy::logger() >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 6c5ad625d12..a6e8fe182f4 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -66,6 +66,7 @@ > #include "WebPageProxyMessages.h" > #include "WebPopupMenuProxy.h" > #include "WebProcessLifetimeTracker.h" >+#include "WebProcessProxy.h" > #include "WebUndoStepID.h" > #include "WebsitePoliciesData.h" > #include <WebCore/ActivityState.h> >@@ -82,6 +83,7 @@ > #include <WebCore/LayoutSize.h> > #include <WebCore/MediaPlaybackTargetContext.h> > #include <WebCore/MediaProducer.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/PlatformEvent.h> > #include <WebCore/PlatformScreen.h> > #include <WebCore/PlatformSpeechSynthesisUtterance.h> >@@ -382,14 +384,14 @@ class WebPageProxy : public API::ObjectImpl<API::Object::Type::Page> > #endif > , public CanMakeWeakPtr<WebPageProxy> { > public: >- static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&); >+ static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, WebCore::PageIdentifier, Ref<API::PageConfiguration>&&); > virtual ~WebPageProxy(); > > static void forMostVisibleWebPageIfAny(PAL::SessionID, const WebCore::SecurityOriginData&, CompletionHandler<void(WebPageProxy*)>&&); > > const API::PageConfiguration& configuration() const; > >- uint64_t pageID() const { return m_pageID; } >+ WebCore::PageIdentifier pageID() const { return m_pageID; } > > PAL::SessionID sessionID() const; > >@@ -1502,7 +1504,7 @@ public: > void didNavigateWithNavigationDataShared(Ref<WebProcessProxy>&&, const WebNavigationDataStore&, uint64_t frameID); > void didChangeProvisionalURLForFrameShared(Ref<WebProcessProxy>&&, uint64_t frameID, uint64_t navigationID, URL&&); > void decidePolicyForNavigationActionAsyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, WebCore::SecurityOriginData&& frameSecurityOrigin, WebCore::PolicyCheckIdentifier, >- uint64_t navigationID, NavigationActionData&&, FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, >+ uint64_t navigationID, NavigationActionData&&, FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, > IPC::FormDataReference&& requestBody, WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); > void decidePolicyForResponseShared(Ref<WebProcessProxy>&&, uint64_t frameID, const WebCore::SecurityOriginData& frameSecurityOrigin, WebCore::PolicyCheckIdentifier, > uint64_t navigationID, const WebCore::ResourceResponse&, const WebCore::ResourceRequest&, bool canShowMIMEType, const String& downloadAttribute, uint64_t listenerID, const UserData&); >@@ -1511,7 +1513,7 @@ public: > void loadRequestWithNavigationShared(Ref<WebProcessProxy>&&, API::Navigation&, WebCore::ResourceRequest&&, WebCore::ShouldOpenExternalURLsPolicy, API::Object* userData, WebCore::ShouldTreatAsContinuingLoad, Optional<WebsitePoliciesData>&& = WTF::nullopt); > void backForwardGoToItemShared(Ref<WebProcessProxy>&&, const WebCore::BackForwardItemIdentifier&, CompletionHandler<void(SandboxExtension::Handle&&)>&&); > void decidePolicyForNavigationActionSyncShared(Ref<WebProcessProxy>&&, uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, >- FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, >+ FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, > WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); > #if USE(QUICK_LOOK) > void didRequestPasswordForQuickLookDocumentInMainFrameShared(Ref<WebProcessProxy>&&, const String& fileName); >@@ -1549,9 +1551,9 @@ WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_1 > void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; > > void requestStorageSpace(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, WTF::CompletionHandler<void(uint64_t)>&&); >- >+ > private: >- WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, Ref<API::PageConfiguration>&&); >+ WebPageProxy(PageClient&, WebProcessProxy&, WebCore::PageIdentifier, Ref<API::PageConfiguration>&&); > void platformInitialize(); > > void notifyProcessPoolToPrewarm(); >@@ -1573,6 +1575,11 @@ private: > void resetStateAfterProcessExited(ProcessTerminationReason); > > void setUserAgent(String&&); >+ >+ template<typename U> bool sendToProcess(WebProcessProxy& process, U&& message, OptionSet<IPC::SendOption> sendOptions = { }) >+ { >+ return process.send(WTFMove(message), m_pageID.toUInt64(), sendOptions); >+ } > > // IPC::MessageSender > bool sendMessage(std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>) override; >@@ -1627,13 +1634,13 @@ private: > void didDestroyNavigation(uint64_t navigationID); > > void decidePolicyForNavigationAction(Ref<WebProcessProxy>&&, WebFrameProxy&, WebCore::SecurityOriginData&&, uint64_t navigationID, NavigationActionData&&, >- FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, >+ FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, > WebCore::ResourceResponse&& redirectResponse, const UserData&, Ref<PolicyDecisionSender>&&); > void decidePolicyForNavigationActionAsync(uint64_t frameID, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, >- FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, >+ FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, > WebCore::ResourceResponse&& redirectResponse, const UserData&, uint64_t listenerID); > void decidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, WebCore::SecurityOriginData&&, WebCore::PolicyCheckIdentifier, uint64_t navigationID, NavigationActionData&&, >- FrameInfoData&&, uint64_t originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, >+ FrameInfoData&&, Optional<WebCore::PageIdentifier> originatingPageID, const WebCore::ResourceRequest& originalRequest, WebCore::ResourceRequest&&, IPC::FormDataReference&& requestBody, > WebCore::ResourceResponse&& redirectResponse, const UserData&, Messages::WebPageProxy::DecidePolicyForNavigationActionSync::DelayedReply&&); > void decidePolicyForNewWindowAction(uint64_t frameID, const WebCore::SecurityOriginData&, WebCore::PolicyCheckIdentifier, NavigationActionData&&, > WebCore::ResourceRequest&&, const String& frameName, uint64_t listenerID, const UserData&); >@@ -1655,7 +1662,7 @@ private: > void didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID); > > // UI client >- void createNewPage(const FrameInfoData&, uint64_t originatingPageID, WebCore::ResourceRequest&&, WebCore::WindowFeatures&&, NavigationActionData&&, Messages::WebPageProxy::CreateNewPage::DelayedReply&&); >+ void createNewPage(const FrameInfoData&, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest&&, WebCore::WindowFeatures&&, NavigationActionData&&, Messages::WebPageProxy::CreateNewPage::DelayedReply&&); > void showPage(); > void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply&&); > void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply&&); >@@ -2327,7 +2334,7 @@ WEBPAGEPROXY_LOADOPTIMIZER_ADDITIONS_2 > RefPtr<WebCore::ValidationBubble> m_validationBubble; > #endif > >- const uint64_t m_pageID; >+ const WebCore::PageIdentifier m_pageID; > > bool m_isPageSuspended { false }; > bool m_addsVisitedLinks { true }; >diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in >index 6fcecdc6b65..b1e799223bf 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in >@@ -22,7 +22,7 @@ > > messages -> WebPageProxy { > # UI messages >- CreateNewPage(struct WebKit::FrameInfoData originatingFrameInfoData, uint64_t originatingPageID, WebCore::ResourceRequest request, struct WebCore::WindowFeatures windowFeatures, struct WebKit::NavigationActionData navigationActionData) -> (uint64_t newPageID, Optional<WebKit::WebPageCreationParameters> newPageParameters) Synchronous >+ CreateNewPage(struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest request, struct WebCore::WindowFeatures windowFeatures, struct WebKit::NavigationActionData navigationActionData) -> (Optional<WebCore::PageIdentifier> newPageID, Optional<WebKit::WebPageCreationParameters> newPageParameters) Synchronous > ShowPage() > ClosePage(bool stopResponsivenessTimer) > RunJavaScriptAlert(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> () Synchronous >@@ -104,8 +104,8 @@ messages -> WebPageProxy { > > # Policy messages > DecidePolicyForResponse(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, WebCore::ResourceResponse response, WebCore::ResourceRequest request, bool canShowMIMEType, String downloadAttribute, uint64_t listenerID, WebKit::UserData userData) >- DecidePolicyForNavigationActionAsync(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, uint64_t originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData, uint64_t listenerID) >- DecidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, uint64_t originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData) -> (WebCore::PolicyCheckIdentifier policyCheckIdentifier, enum:uint8_t WebCore::PolicyAction policyAction, uint64_t newNavigationID, WebKit::DownloadID downloadID, Optional<WebKit::WebsitePoliciesData> websitePolicies) Synchronous >+ DecidePolicyForNavigationActionAsync(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData, uint64_t listenerID) >+ DecidePolicyForNavigationActionSync(uint64_t frameID, bool isMainFrame, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, uint64_t navigationID, struct WebKit::NavigationActionData navigationActionData, struct WebKit::FrameInfoData originatingFrameInfoData, Optional<WebCore::PageIdentifier> originatingPageID, WebCore::ResourceRequest originalRequest, WebCore::ResourceRequest request, IPC::FormDataReference requestBody, WebCore::ResourceResponse redirectResponse, WebKit::UserData userData) -> (WebCore::PolicyCheckIdentifier policyCheckIdentifier, enum:uint8_t WebCore::PolicyAction policyAction, uint64_t newNavigationID, WebKit::DownloadID downloadID, Optional<WebKit::WebsitePoliciesData> websitePolicies) Synchronous > DecidePolicyForNewWindowAction(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, WebCore::PolicyCheckIdentifier policyCheckIdentifier, struct WebKit::NavigationActionData navigationActionData, WebCore::ResourceRequest request, String frameName, uint64_t listenerID, WebKit::UserData userData) > UnableToImplementPolicy(uint64_t frameID, WebCore::ResourceError error, WebKit::UserData userData) > >diff --git a/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp b/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp >index c8023de4161..f497151d75c 100644 >--- a/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp >+++ b/Source/WebKit/UIProcess/WebProcessLifetimeObserver.cpp >@@ -47,7 +47,7 @@ void WebProcessLifetimeObserver::addWebPage(WebPageProxy& webPageProxy, WebProce > RELEASE_ASSERT(!process.isPrewarmed()); > > if (m_processes.add(&process).isNewEntry) { >- RELEASE_LOG(Loading, "%p - WebProcessLifetimeObserver::addWebPage: webPID = %i, pageID = %" PRIu64, this, process.processIdentifier(), webPageProxy.pageID()); >+ RELEASE_LOG(Loading, "%p - WebProcessLifetimeObserver::addWebPage: webPID = %i, pageID = %" PRIu64, this, process.processIdentifier(), webPageProxy.pageID().toUInt64()); > webProcessWillOpenConnection(process, *process.connection()); > } > >@@ -63,7 +63,7 @@ void WebProcessLifetimeObserver::removeWebPage(WebPageProxy& webPageProxy, WebPr > webPageDidCloseConnection(webPageProxy, *process.connection()); > > if (m_processes.remove(&process)) { >- RELEASE_LOG(Loading, "%p - WebProcessLifetimeObserver::removeWebPage: webPID = %i, pageID = %" PRIu64, this, process.processIdentifier(), webPageProxy.pageID()); >+ RELEASE_LOG(Loading, "%p - WebProcessLifetimeObserver::removeWebPage: webPID = %i, pageID = %" PRIu64, this, process.processIdentifier(), webPageProxy.pageID().toUInt64()); > webProcessDidCloseConnection(process, *process.connection()); > } > } >diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp >index 0e139f30d9c..0b8b345ef8e 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.cpp >+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp >@@ -1296,9 +1296,9 @@ bool WebProcessPool::mayHaveRegisteredServiceWorkers(const WebsiteDataStore& sto > } > #endif > >-void WebProcessPool::pageBeginUsingWebsiteDataStore(uint64_t pageID, WebsiteDataStore& dataStore) >+void WebProcessPool::pageBeginUsingWebsiteDataStore(PageIdentifier pageID, WebsiteDataStore& dataStore) > { >- auto result = m_sessionToPageIDsMap.add(dataStore.sessionID(), HashSet<uint64_t>()).iterator->value.add(pageID); >+ auto result = m_sessionToPageIDsMap.add(dataStore.sessionID(), HashSet<PageIdentifier>()).iterator->value.add(pageID); > ASSERT_UNUSED(result, result.isNewEntry); > > auto sessionID = dataStore.sessionID(); >@@ -1316,7 +1316,7 @@ void WebProcessPool::pageBeginUsingWebsiteDataStore(uint64_t pageID, WebsiteData > } > } > >-void WebProcessPool::pageEndUsingWebsiteDataStore(uint64_t pageID, WebsiteDataStore& dataStore) >+void WebProcessPool::pageEndUsingWebsiteDataStore(PageIdentifier pageID, WebsiteDataStore& dataStore) > { > auto sessionID = dataStore.sessionID(); > auto iterator = m_sessionToPageIDsMap.find(sessionID); >@@ -2211,7 +2211,7 @@ void WebProcessPool::reinstateNetworkProcessAssertionState(NetworkProcessProxy& > } > > #if ENABLE(SERVICE_WORKER) >-ServiceWorkerProcessProxy* WebProcessPool::serviceWorkerProcessProxyFromPageID(uint64_t pageID) const >+ServiceWorkerProcessProxy* WebProcessPool::serviceWorkerProcessProxyFromPageID(PageIdentifier pageID) const > { > // FIXME: This is inefficient. > for (auto* serviceWorkerProcess : m_serviceWorkerProcesses.values()) { >@@ -2519,7 +2519,7 @@ void WebProcessPool::clearCurrentModifierStateForTesting() > sendToAllProcesses(Messages::WebProcess::ClearCurrentModifierStateForTesting()); > } > >-void WebProcessPool::committedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, uint64_t pageID) >+void WebProcessPool::committedCrossSiteLoadWithLinkDecoration(PAL::SessionID sessionID, const RegistrableDomain& fromDomain, const RegistrableDomain& toDomain, PageIdentifier pageID) > { > #if ENABLE(RESOURCE_LOAD_STATISTICS) > if (!m_networkProcess) >diff --git a/Source/WebKit/UIProcess/WebProcessPool.h b/Source/WebKit/UIProcess/WebProcessPool.h >index 165545b1a2f..17e3e802bc4 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.h >+++ b/Source/WebKit/UIProcess/WebProcessPool.h >@@ -148,6 +148,18 @@ public: > void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); > void removeMessageReceiver(IPC::StringReference messageReceiverName); > void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); >+ >+ template <typename T> >+ void addMessageReceiver(IPC::StringReference messageReceiverName, ObjectIdentifier<T> destinationID, IPC::MessageReceiver& receiver) >+ { >+ addMessageReceiver(messageReceiverName, destinationID.toUInt64(), receiver); >+ } >+ >+ template <typename T> >+ void removeMessageReceiver(IPC::StringReference messageReceiverName, ObjectIdentifier<T> destinationID) >+ { >+ removeMessageReceiver(messageReceiverName, destinationID.toUInt64()); >+ } > > bool dispatchMessage(IPC::Connection&, IPC::Decoder&); > bool dispatchSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); >@@ -193,8 +205,8 @@ public: > > Ref<WebPageProxy> createWebPage(PageClient&, Ref<API::PageConfiguration>&&); > >- void pageBeginUsingWebsiteDataStore(uint64_t pageID, WebsiteDataStore&); >- void pageEndUsingWebsiteDataStore(uint64_t pageID, WebsiteDataStore&); >+ void pageBeginUsingWebsiteDataStore(WebCore::PageIdentifier, WebsiteDataStore&); >+ void pageEndUsingWebsiteDataStore(WebCore::PageIdentifier, WebsiteDataStore&); > bool hasPagesUsingWebsiteDataStore(WebsiteDataStore&) const; > > const String& injectedBundlePath() const { return m_configuration->injectedBundlePath(); } >@@ -365,7 +377,7 @@ public: > > #if ENABLE(SERVICE_WORKER) > void establishWorkerContextConnectionToNetworkProcess(NetworkProcessProxy&, WebCore::RegistrableDomain&&, Optional<PAL::SessionID>); >- ServiceWorkerProcessProxy* serviceWorkerProcessProxyFromPageID(uint64_t pageID) const; >+ ServiceWorkerProcessProxy* serviceWorkerProcessProxyFromPageID(WebCore::PageIdentifier) const; > const HashMap<WebCore::RegistrableDomain, ServiceWorkerProcessProxy*>& serviceWorkerProxies() const { return m_serviceWorkerProcesses; } > void setAllowsAnySSLCertificateForServiceWorker(bool allows) { m_allowsAnySSLCertificateForServiceWorker = allows; } > bool allowsAnySSLCertificateForServiceWorker() const { return m_allowsAnySSLCertificateForServiceWorker; } >@@ -493,7 +505,7 @@ public: > void sendDisplayConfigurationChangedMessageForTesting(); > void clearCurrentModifierStateForTesting(); > >- void committedCrossSiteLoadWithLinkDecoration(PAL::SessionID, const WebCore::RegistrableDomain& fromDomain, const WebCore::RegistrableDomain& toDomain, uint64_t pageID); >+ void committedCrossSiteLoadWithLinkDecoration(PAL::SessionID, const WebCore::RegistrableDomain& fromDomain, const WebCore::RegistrableDomain& toDomain, WebCore::PageIdentifier); > > #if PLATFORM(GTK) || PLATFORM(WPE) > void setSandboxEnabled(bool enabled) { m_sandboxEnabled = enabled; }; >@@ -758,7 +770,7 @@ private: > }; > Paths m_resolvedPaths; > >- HashMap<PAL::SessionID, HashSet<uint64_t>> m_sessionToPageIDsMap; >+ HashMap<PAL::SessionID, HashSet<WebCore::PageIdentifier>> m_sessionToPageIDsMap; > RunLoop::Timer<WebProcessPool> m_serviceWorkerProcessesTerminationTimer; > > #if PLATFORM(IOS_FAMILY) >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp >index 8203465cb28..67831e20780 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp >@@ -110,10 +110,9 @@ WebProcessProxy* WebProcessProxy::processForIdentifier(ProcessIdentifier identif > return allProcesses().get(identifier); > } > >-uint64_t WebProcessProxy::generatePageID() >+PageIdentifier WebProcessProxy::generatePageID() > { >- static uint64_t uniquePageID; >- return ++uniquePageID; >+ return PageIdentifier::generate(); > } > > static WebProcessProxy::WebPageProxyMap& globalPageMap() >@@ -330,7 +329,7 @@ void WebProcessProxy::shutDown() > m_processPool->disconnectProcess(this); > } > >-WebPageProxy* WebProcessProxy::webPage(uint64_t pageID) >+WebPageProxy* WebProcessProxy::webPage(PageIdentifier pageID) > { > return globalPageMap().get(pageID); > } >@@ -363,7 +362,7 @@ void WebProcessProxy::notifyPageStatisticsTelemetryFinished(API::Object* message > > Ref<WebPageProxy> WebProcessProxy::createWebPage(PageClient& pageClient, Ref<API::PageConfiguration>&& pageConfiguration) > { >- uint64_t pageID = generatePageID(); >+ auto pageID = generatePageID(); > Ref<WebPageProxy> webPage = WebPageProxy::create(pageClient, *this, pageID, WTFMove(pageConfiguration)); > > addExistingWebPage(webPage.get(), BeginsUsingDataStore::Yes); >@@ -415,10 +414,10 @@ void WebProcessProxy::removeWebPage(WebPageProxy& webPage, EndsUsingDataStore en > maybeShutDown(); > } > >-void WebProcessProxy::addVisitedLinkStoreUser(VisitedLinkStore& visitedLinkStore, uint64_t pageID) >+void WebProcessProxy::addVisitedLinkStoreUser(VisitedLinkStore& visitedLinkStore, PageIdentifier pageID) > { > auto& users = m_visitedLinkStoresWithUsers.ensure(&visitedLinkStore, [] { >- return HashSet<uint64_t> { }; >+ return HashSet<PageIdentifier> { }; > }).iterator->value; > > ASSERT(!users.contains(pageID)); >@@ -428,7 +427,7 @@ void WebProcessProxy::addVisitedLinkStoreUser(VisitedLinkStore& visitedLinkStore > visitedLinkStore.addProcess(*this); > } > >-void WebProcessProxy::removeVisitedLinkStoreUser(VisitedLinkStore& visitedLinkStore, uint64_t pageID) >+void WebProcessProxy::removeVisitedLinkStoreUser(VisitedLinkStore& visitedLinkStore, PageIdentifier pageID) > { > auto it = m_visitedLinkStoresWithUsers.find(&visitedLinkStore); > if (it == m_visitedLinkStoresWithUsers.end()) >@@ -541,7 +540,7 @@ bool WebProcessProxy::fullKeyboardAccessEnabled() > } > #endif > >-bool WebProcessProxy::hasProvisionalPageWithID(uint64_t pageID) const >+bool WebProcessProxy::hasProvisionalPageWithID(PageIdentifier pageID) const > { > for (auto* provisionalPage : m_provisionalPages) { > if (provisionalPage->page().pageID() == pageID) >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h >index 9a6cbf1f460..ad3f038dd65 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.h >+++ b/Source/WebKit/UIProcess/WebProcessProxy.h >@@ -40,6 +40,7 @@ > #include "WebProcessProxyMessages.h" > #include <WebCore/MessagePortChannelProvider.h> > #include <WebCore/MessagePortIdentifier.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/ProcessIdentifier.h> > #include <WebCore/RegistrableDomain.h> > #include <WebCore/SharedStringHash.h> >@@ -97,7 +98,7 @@ enum class AllowProcessCaching { No, Yes }; > class WebProcessProxy : public AuxiliaryProcessProxy, public ResponsivenessTimer::Client, public ThreadSafeRefCounted<WebProcessProxy>, public CanMakeWeakPtr<WebProcessProxy>, private ProcessThrottlerClient { > public: > typedef HashMap<uint64_t, RefPtr<WebFrameProxy>> WebFrameProxyMap; >- typedef HashMap<uint64_t, WebPageProxy*> WebPageProxyMap; >+ typedef HashMap<WebCore::PageIdentifier, WebPageProxy*> WebPageProxyMap; > typedef HashMap<uint64_t, RefPtr<API::UserInitiatedAction>> UserInitiatedActionMap; > > enum class IsPrewarmed { >@@ -128,7 +129,7 @@ public: > void setWebsiteDataStore(WebsiteDataStore&); > > static WebProcessProxy* processForIdentifier(WebCore::ProcessIdentifier); >- static WebPageProxy* webPage(uint64_t pageID); >+ static WebPageProxy* webPage(WebCore::PageIdentifier); > Ref<WebPageProxy> createWebPage(PageClient&, Ref<API::PageConfiguration>&&); > > enum class BeginsUsingDataStore : bool { No, Yes }; >@@ -149,10 +150,10 @@ public: > > virtual bool isServiceWorkerProcess() const { return false; } > >- void didCreateWebPageInProcess(uint64_t pageID); >+ void didCreateWebPageInProcess(WebCore::PageIdentifier); > >- void addVisitedLinkStoreUser(VisitedLinkStore&, uint64_t pageID); >- void removeVisitedLinkStoreUser(VisitedLinkStore&, uint64_t pageID); >+ void addVisitedLinkStoreUser(VisitedLinkStore&, WebCore::PageIdentifier); >+ void removeVisitedLinkStoreUser(VisitedLinkStore&, WebCore::PageIdentifier); > > void addWebUserContentControllerProxy(WebUserContentControllerProxy&, WebPageCreationParameters&); > void didDestroyWebUserContentControllerProxy(WebUserContentControllerProxy&); >@@ -311,7 +312,7 @@ public: > void webPageMediaStateDidChange(WebPageProxy&); > > protected: >- static uint64_t generatePageID(); >+ static WebCore::PageIdentifier generatePageID(); > WebProcessProxy(WebProcessPool&, WebsiteDataStore*, IsPrewarmed); > > // AuxiliaryProcessProxy >@@ -354,7 +355,7 @@ private: > void didCreateContextForVisibilityPropagation(LayerHostingContextID); > #endif > >- bool hasProvisionalPageWithID(uint64_t pageID) const; >+ bool hasProvisionalPageWithID(WebCore::PageIdentifier) const; > bool isAllowedToUpdateBackForwardItem(WebBackForwardListItem&) const; > > // Plugins >@@ -447,7 +448,7 @@ private: > HashSet<ProvisionalPageProxy*> m_provisionalPages; > UserInitiatedActionMap m_userInitiatedActionMap; > >- HashMap<VisitedLinkStore*, HashSet<uint64_t/* pageID */>> m_visitedLinkStoresWithUsers; >+ HashMap<VisitedLinkStore*, HashSet<WebCore::PageIdentifier>> m_visitedLinkStoresWithUsers; > HashSet<WebUserContentControllerProxy*> m_webUserContentControllerProxies; > > int m_numberOfTimesSuddenTerminationWasDisabled; >diff --git a/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp b/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp >index e355319ea4c..7d575a404b0 100644 >--- a/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp >+++ b/Source/WebKit/UIProcess/WebURLSchemeHandler.cpp >@@ -109,7 +109,7 @@ void WebURLSchemeHandler::taskCompleted(WebURLSchemeTask& task) > platformTaskCompleted(task); > } > >-void WebURLSchemeHandler::removeTaskFromPageMap(uint64_t pageID, uint64_t taskID) >+void WebURLSchemeHandler::removeTaskFromPageMap(PageIdentifier pageID, uint64_t taskID) > { > auto iterator = m_tasksByPageIdentifier.find(pageID); > ASSERT(iterator != m_tasksByPageIdentifier.end()); >diff --git a/Source/WebKit/UIProcess/WebURLSchemeHandler.h b/Source/WebKit/UIProcess/WebURLSchemeHandler.h >index 89976c61f83..b7af075975f 100644 >--- a/Source/WebKit/UIProcess/WebURLSchemeHandler.h >+++ b/Source/WebKit/UIProcess/WebURLSchemeHandler.h >@@ -66,13 +66,13 @@ private: > virtual void platformStopTask(WebPageProxy&, WebURLSchemeTask&) = 0; > virtual void platformTaskCompleted(WebURLSchemeTask&) = 0; > >- void removeTaskFromPageMap(uint64_t pageID, uint64_t taskID); >+ void removeTaskFromPageMap(WebCore::PageIdentifier, uint64_t taskID); > WebProcessProxy* processForTaskIdentifier(uint64_t) const; > > uint64_t m_identifier; > > HashMap<uint64_t, Ref<WebURLSchemeTask>> m_tasks; >- HashMap<uint64_t, HashSet<uint64_t>> m_tasksByPageIdentifier; >+ HashMap<WebCore::PageIdentifier, HashSet<uint64_t>> m_tasksByPageIdentifier; > > SyncLoadCompletionHandler m_syncLoadCompletionHandler; > >diff --git a/Source/WebKit/UIProcess/WebURLSchemeTask.cpp b/Source/WebKit/UIProcess/WebURLSchemeTask.cpp >index 19a6bb84c3c..9b7ad5e2311 100644 >--- a/Source/WebKit/UIProcess/WebURLSchemeTask.cpp >+++ b/Source/WebKit/UIProcess/WebURLSchemeTask.cpp >@@ -70,7 +70,7 @@ auto WebURLSchemeTask::didPerformRedirection(WebCore::ResourceResponse&& respons > m_syncResponse = response; > > m_request = request; >- m_process->send(Messages::WebPage::URLSchemeTaskDidPerformRedirection(m_urlSchemeHandler->identifier(), m_identifier, response, request), m_page->pageID()); >+ send(Messages::WebPage::URLSchemeTaskDidPerformRedirection(m_urlSchemeHandler->identifier(), m_identifier, response, request)); > > return ExceptionType::None; > } >@@ -93,7 +93,7 @@ auto WebURLSchemeTask::didReceiveResponse(const ResourceResponse& response) -> E > if (isSync()) > m_syncResponse = response; > >- m_process->send(Messages::WebPage::URLSchemeTaskDidReceiveResponse(m_urlSchemeHandler->identifier(), m_identifier, response), m_page->pageID()); >+ send(Messages::WebPage::URLSchemeTaskDidReceiveResponse(m_urlSchemeHandler->identifier(), m_identifier, response)); > return ExceptionType::None; > } > >@@ -118,7 +118,7 @@ auto WebURLSchemeTask::didReceiveData(Ref<SharedBuffer>&& buffer) -> ExceptionTy > return ExceptionType::None; > } > >- m_process->send(Messages::WebPage::URLSchemeTaskDidReceiveData(m_urlSchemeHandler->identifier(), m_identifier, { buffer }), m_page->pageID()); >+ send(Messages::WebPage::URLSchemeTaskDidReceiveData(m_urlSchemeHandler->identifier(), m_identifier, { buffer })); > return ExceptionType::None; > } > >@@ -143,7 +143,7 @@ auto WebURLSchemeTask::didComplete(const ResourceError& error) -> ExceptionType > m_syncData = nullptr; > } > >- m_process->send(Messages::WebPage::URLSchemeTaskDidComplete(m_urlSchemeHandler->identifier(), m_identifier, error), m_page->pageID()); >+ send(Messages::WebPage::URLSchemeTaskDidComplete(m_urlSchemeHandler->identifier(), m_identifier, error)); > m_urlSchemeHandler->taskCompleted(*this); > > return ExceptionType::None; >@@ -169,4 +169,14 @@ void WebURLSchemeTask::stop() > m_syncCompletionHandler({ }, failedCustomProtocolSyncLoad(m_request), { }); > } > >+IPC::Connection* WebURLSchemeTask::messageSenderConnection() const >+{ >+ return m_process->connection(); >+} >+ >+uint64_t WebURLSchemeTask::messageSenderDestinationID() const >+{ >+ return m_page->pageID().toUInt64(); >+} >+ > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/WebURLSchemeTask.h b/Source/WebKit/UIProcess/WebURLSchemeTask.h >index b872073bd27..7f14b986043 100644 >--- a/Source/WebKit/UIProcess/WebURLSchemeTask.h >+++ b/Source/WebKit/UIProcess/WebURLSchemeTask.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "MessageSender.h" > #include "WebProcessProxy.h" > #include <WebCore/ResourceRequest.h> > #include <WebCore/ResourceResponse.h> >@@ -51,13 +52,13 @@ class WebPageProxy; > > using SyncLoadCompletionHandler = CompletionHandler<void(const WebCore::ResourceResponse&, const WebCore::ResourceError&, const IPC::DataReference&)>; > >-class WebURLSchemeTask : public RefCounted<WebURLSchemeTask>, public InstanceCounted<WebURLSchemeTask> { >+class WebURLSchemeTask : public RefCounted<WebURLSchemeTask>, private IPC::MessageSender, public InstanceCounted<WebURLSchemeTask> { > WTF_MAKE_NONCOPYABLE(WebURLSchemeTask); > public: > static Ref<WebURLSchemeTask> create(WebURLSchemeHandler&, WebPageProxy&, WebProcessProxy&, uint64_t identifier, WebCore::ResourceRequest&&, SyncLoadCompletionHandler&&); > > uint64_t identifier() const { return m_identifier; } >- uint64_t pageID() const { return m_pageIdentifier; } >+ WebCore::PageIdentifier pageID() const { return m_pageIdentifier; } > WebProcessProxy* process() const { return m_process.get(); } > > const WebCore::ResourceRequest& request() const { return m_request; } >@@ -80,6 +81,10 @@ public: > > private: > WebURLSchemeTask(WebURLSchemeHandler&, WebPageProxy&, WebProcessProxy&, uint64_t identifier, WebCore::ResourceRequest&&, SyncLoadCompletionHandler&&); >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() const final; >+ uint64_t messageSenderDestinationID() const final; > > bool isSync() const { return !!m_syncCompletionHandler; } > >@@ -87,7 +92,7 @@ private: > WebPageProxy* m_page; > RefPtr<WebProcessProxy> m_process; > uint64_t m_identifier; >- uint64_t m_pageIdentifier; >+ WebCore::PageIdentifier m_pageIdentifier; > WebCore::ResourceRequest m_request; > bool m_stopped { false }; > bool m_responseSent { false }; >diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >index 0bf5112a9e4..0a8b0c11225 100644 >--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >@@ -1576,7 +1576,7 @@ void WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured(bool value, Comple > processPool->ensureNetworkProcess().setNotifyPagesWhenTelemetryWasCaptured(m_sessionID, value, [processPool, callbackAggregator = callbackAggregator.copyRef()] { }); > } > >-void WebsiteDataStore::getAllStorageAccessEntries(uint64_t pageID, CompletionHandler<void(Vector<String>&& domains)>&& completionHandler) >+void WebsiteDataStore::getAllStorageAccessEntries(PageIdentifier pageID, CompletionHandler<void(Vector<String>&& domains)>&& completionHandler) > { > auto* webPage = WebProcessProxy::webPage(pageID); > if (!webPage) { >diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >index 642e3309d07..822c3fc7637 100644 >--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >@@ -33,6 +33,7 @@ > #include "WebsiteDataStoreConfiguration.h" > #include <WebCore/Cookie.h> > #include <WebCore/DeviceOrientationOrMotionPermissionState.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/SecurityOriginData.h> > #include <WebCore/SecurityOriginHash.h> > #include <pal/SessionID.h> >@@ -135,7 +136,7 @@ public: > void dumpResourceLoadStatistics(CompletionHandler<void(const String&)>&&); > void logTestingEvent(const String&); > void logUserInteraction(const URL&, CompletionHandler<void()>&&); >- void getAllStorageAccessEntries(uint64_t pageID, CompletionHandler<void(Vector<String>&& domains)>&&); >+ void getAllStorageAccessEntries(WebCore::PageIdentifier, CompletionHandler<void(Vector<String>&& domains)>&&); > void hasHadUserInteraction(const URL&, CompletionHandler<void(bool)>&&); > void isPrevalentResource(const URL&, CompletionHandler<void(bool)>&&); > void isRegisteredAsRedirectingTo(const URL& hostRedirectedFrom, const URL& hostRedirectedTo, CompletionHandler<void(bool)>&&); >diff --git a/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm b/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm >index 760a1d009de..017995a5150 100644 >--- a/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/RemoteWebInspectorProxyMac.mm >@@ -164,7 +164,7 @@ void RemoteWebInspectorProxy::platformSave(const String& suggestedURL, const Str > } else > [contentCopy writeToURL:actualURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]; > >- m_inspectorPage->process().send(Messages::RemoteWebInspectorUI::DidSave([actualURL absoluteString]), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::RemoteWebInspectorUI::DidSave([actualURL absoluteString])); > }; > > if (!forceSaveDialog) { >@@ -212,7 +212,7 @@ void RemoteWebInspectorProxy::platformAppend(const String& suggestedURL, const S > [handle closeFile]; > > WebPageProxy* inspectorPage = webView()->_page.get(); >- inspectorPage->process().send(Messages::RemoteWebInspectorUI::DidAppend([actualURL absoluteString]), inspectorPage->pageID()); >+ inspectorPage->send(Messages::RemoteWebInspectorUI::DidAppend([actualURL absoluteString])); > } > > void RemoteWebInspectorProxy::platformSetSheetRect(const FloatRect& rect) >diff --git a/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm b/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm >index f70f1a4ac4d..c57386e345d 100644 >--- a/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm >+++ b/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm >@@ -122,7 +122,7 @@ void TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry() > void TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState(ActivityStateChangeID) > { > Seconds activityStateUpdateTimeout = Seconds::fromMilliseconds(250); >- process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateActivityState>(m_webPageProxy.pageID(), activityStateUpdateTimeout, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives); >+ process().connection()->waitForAndDispatchImmediately<Messages::WebPageProxy::DidUpdateActivityState>(m_webPageProxy.pageID().toUInt64(), activityStateUpdateTimeout, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives); > } > > void TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry() >diff --git a/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm b/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >index 50241d8bf62..f53fb21e3ee 100644 >--- a/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >+++ b/Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm >@@ -144,7 +144,7 @@ void ViewGestureController::handleMagnificationGestureEvent(NSEvent *event, Floa > > // FIXME: We drop the first frame of the gesture on the floor, because we don't have the visible content bounds yet. > m_magnification = m_webPageProxy.pageScaleFactor(); >- m_webPageProxy.process().send(Messages::ViewGestureGeometryCollector::CollectGeometryForMagnificationGesture(), m_webPageProxy.pageID()); >+ m_webPageProxy.send(Messages::ViewGestureGeometryCollector::CollectGeometryForMagnificationGesture()); > m_lastMagnificationGestureWasSmartMagnification = false; > > return; >@@ -196,7 +196,7 @@ void ViewGestureController::handleSmartMagnificationGesture(FloatPoint origin) > if (m_activeGestureType != ViewGestureType::None) > return; > >- m_webPageProxy.process().send(Messages::ViewGestureGeometryCollector::CollectGeometryForSmartMagnificationGesture(origin), m_webPageProxy.pageID()); >+ m_webPageProxy.send(Messages::ViewGestureGeometryCollector::CollectGeometryForSmartMagnificationGesture(origin)); > } > > static float maximumRectangleComponentDelta(FloatRect a, FloatRect b) >diff --git a/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm b/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm >index 2151662d347..5a683096e80 100644 >--- a/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm >+++ b/Source/WebKit/UIProcess/mac/WKImmediateActionController.mm >@@ -193,7 +193,7 @@ - (void)immediateActionRecognizerWillBeginAnimation:(NSImmediateActionGestureRec > // FIXME: Connection can be null if the process is closed; we should clean up better in that case. > if (_state == WebKit::ImmediateActionState::Pending) { > if (auto* connection = _page->process().connection()) { >- bool receivedReply = connection->waitForAndDispatchImmediately<Messages::WebPageProxy::DidPerformImmediateActionHitTest>(_page->pageID(), Seconds::fromMilliseconds(500)); >+ bool receivedReply = connection->waitForAndDispatchImmediately<Messages::WebPageProxy::DidPerformImmediateActionHitTest>(_page->pageID().toUInt64(), Seconds::fromMilliseconds(500)); > if (!receivedReply) > _state = WebKit::ImmediateActionState::TimedOut; > } >diff --git a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >index 007d87dfcd8..f4ab91e89b1 100644 >--- a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >@@ -477,7 +477,7 @@ void WebInspectorProxy::platformSave(const String& suggestedURL, const String& c > } else > [contentCopy writeToURL:actualURL atomically:YES encoding:NSUTF8StringEncoding error:NULL]; > >- m_inspectorPage->process().send(Messages::WebInspectorUI::DidSave([actualURL absoluteString]), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::DidSave([actualURL absoluteString])); > }; > > if (!forceSaveDialog) { >@@ -522,7 +522,7 @@ void WebInspectorProxy::platformAppend(const String& suggestedURL, const String& > [handle writeData:[content dataUsingEncoding:NSUTF8StringEncoding]]; > [handle closeFile]; > >- m_inspectorPage->process().send(Messages::WebInspectorUI::DidAppend([actualURL absoluteString]), m_inspectorPage->pageID()); >+ m_inspectorPage->send(Messages::WebInspectorUI::DidAppend([actualURL absoluteString])); > } > > void WebInspectorProxy::windowFrameDidChange() >diff --git a/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm b/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm >index 87c68b33485..455d2d5d402 100644 >--- a/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm >@@ -171,7 +171,7 @@ void WebPageProxy::windowAndViewFramesChanged(const FloatRect& viewFrameInWindow > // In case the UI client overrides getWindowFrame(), we call it here to make sure we send the appropriate window frame. > m_uiClient->windowFrame(*this, [this, protectedThis = makeRef(*this), viewFrameInWindowCoordinates, accessibilityViewCoordinates] (FloatRect windowFrameInScreenCoordinates) { > FloatRect windowFrameInUnflippedScreenCoordinates = pageClient().convertToUserSpace(windowFrameInScreenCoordinates); >- process().send(Messages::WebPage::WindowAndViewFramesChanged(windowFrameInScreenCoordinates, windowFrameInUnflippedScreenCoordinates, viewFrameInWindowCoordinates, accessibilityViewCoordinates), m_pageID); >+ send(Messages::WebPage::WindowAndViewFramesChanged(windowFrameInScreenCoordinates, windowFrameInUnflippedScreenCoordinates, viewFrameInWindowCoordinates, accessibilityViewCoordinates)); > }); > } > >@@ -180,7 +180,7 @@ void WebPageProxy::setMainFrameIsScrollable(bool isScrollable) > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::SetMainFrameIsScrollable(isScrollable), m_pageID); >+ send(Messages::WebPage::SetMainFrameIsScrollable(isScrollable)); > } > > void WebPageProxy::insertDictatedTextAsync(const String& text, const EditingRange& replacementRange, const Vector<TextAlternativeWithRange>& dictationAlternativesWithRange, bool registerUndoGroup) >@@ -205,7 +205,7 @@ void WebPageProxy::insertDictatedTextAsync(const String& text, const EditingRang > return; > } > >- process().send(Messages::WebPage::InsertDictatedTextAsync(text, replacementRange, dictationAlternatives, registerUndoGroup), m_pageID); >+ send(Messages::WebPage::InsertDictatedTextAsync(text, replacementRange, dictationAlternatives, registerUndoGroup)); > #else > InsertTextOptions options; > options.registerUndoGroup = registerUndoGroup; >@@ -223,7 +223,7 @@ void WebPageProxy::attributedSubstringForCharacterRangeAsync(const EditingRange& > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > >- process().send(Messages::WebPage::AttributedSubstringForCharacterRangeAsync(range, callbackID), m_pageID); >+ send(Messages::WebPage::AttributedSubstringForCharacterRangeAsync(range, callbackID)); > } > > void WebPageProxy::attributedStringForCharacterRangeCallback(const AttributedString& string, const EditingRange& actualRange, CallbackID callbackID) >@@ -249,7 +249,7 @@ void WebPageProxy::fontAtSelection(WTF::Function<void (const String&, double, bo > > auto callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process->throttler().backgroundActivityToken()); > >- process().send(Messages::WebPage::FontAtSelection(callbackID), m_pageID); >+ send(Messages::WebPage::FontAtSelection(callbackID)); > } > > void WebPageProxy::fontAtSelectionCallback(const String& fontName, double fontSize, bool selectionHasMultipleFonts, CallbackID callbackID) >@@ -271,7 +271,7 @@ String WebPageProxy::stringSelectionForPasteboard() > return value; > > const Seconds messageTimeout(20); >- process().sendSync(Messages::WebPage::GetStringSelectionForPasteboard(), Messages::WebPage::GetStringSelectionForPasteboard::Reply(value), m_pageID, messageTimeout); >+ sendSync(Messages::WebPage::GetStringSelectionForPasteboard(), Messages::WebPage::GetStringSelectionForPasteboard::Reply(value), messageTimeout); > return value; > } > >@@ -282,8 +282,8 @@ RefPtr<WebCore::SharedBuffer> WebPageProxy::dataSelectionForPasteboard(const Str > SharedMemory::Handle handle; > uint64_t size = 0; > const Seconds messageTimeout(20); >- process().sendSync(Messages::WebPage::GetDataSelectionForPasteboard(pasteboardType), >- Messages::WebPage::GetDataSelectionForPasteboard::Reply(handle, size), m_pageID, messageTimeout); >+ sendSync(Messages::WebPage::GetDataSelectionForPasteboard(pasteboardType), >+ Messages::WebPage::GetDataSelectionForPasteboard::Reply(handle, size), messageTimeout); > if (handle.isNull()) > return nullptr; > RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly); >@@ -297,14 +297,14 @@ bool WebPageProxy::readSelectionFromPasteboard(const String& pasteboardName) > > bool result = false; > const Seconds messageTimeout(20); >- process().sendSync(Messages::WebPage::ReadSelectionFromPasteboard(pasteboardName), Messages::WebPage::ReadSelectionFromPasteboard::Reply(result), m_pageID, messageTimeout); >+ sendSync(Messages::WebPage::ReadSelectionFromPasteboard(pasteboardName), Messages::WebPage::ReadSelectionFromPasteboard::Reply(result), messageTimeout); > return result; > } > > #if ENABLE(SERVICE_CONTROLS) > void WebPageProxy::replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference& data) > { >- process().send(Messages::WebPage::ReplaceSelectionWithPasteboardData(types, data), m_pageID); >+ send(Messages::WebPage::ReplaceSelectionWithPasteboardData(types, data)); > } > #endif > >@@ -334,22 +334,22 @@ void WebPageProxy::sendComplexTextInputToPlugin(uint64_t pluginComplexTextInputI > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::SendComplexTextInputToPlugin(pluginComplexTextInputIdentifier, textInput), m_pageID); >+ send(Messages::WebPage::SendComplexTextInputToPlugin(pluginComplexTextInputIdentifier, textInput)); > } > > void WebPageProxy::uppercaseWord() > { >- process().send(Messages::WebPage::UppercaseWord(), m_pageID); >+ send(Messages::WebPage::UppercaseWord()); > } > > void WebPageProxy::lowercaseWord() > { >- process().send(Messages::WebPage::LowercaseWord(), m_pageID); >+ send(Messages::WebPage::LowercaseWord()); > } > > void WebPageProxy::capitalizeWord() > { >- process().send(Messages::WebPage::CapitalizeWord(), m_pageID); >+ send(Messages::WebPage::CapitalizeWord()); > } > > void WebPageProxy::setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled) >@@ -359,7 +359,7 @@ void WebPageProxy::setSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled) > > TextChecker::setSmartInsertDeleteEnabled(isSmartInsertDeleteEnabled); > m_isSmartInsertDeleteEnabled = isSmartInsertDeleteEnabled; >- process().send(Messages::WebPage::SetSmartInsertDeleteEnabled(isSmartInsertDeleteEnabled), m_pageID); >+ send(Messages::WebPage::SetSmartInsertDeleteEnabled(isSmartInsertDeleteEnabled)); > } > > void WebPageProxy::didPerformDictionaryLookup(const DictionaryPopupInfo& dictionaryPopupInfo) >@@ -395,7 +395,7 @@ void WebPageProxy::registerUIProcessAccessibilityTokens(const IPC::DataReference > if (!hasRunningProcess()) > return; > >- process().send(Messages::WebPage::RegisterUIProcessAccessibilityTokens(elementToken, windowToken), m_pageID); >+ send(Messages::WebPage::RegisterUIProcessAccessibilityTokens(elementToken, windowToken)); > } > > void WebPageProxy::pluginFocusOrWindowFocusChanged(uint64_t pluginComplexTextInputIdentifier, bool pluginHasFocusAndWindowHasFocus) >@@ -424,7 +424,7 @@ bool WebPageProxy::shouldDelayWindowOrderingForEvent(const WebKit::WebMouseEvent > > bool result = false; > const Seconds messageTimeout(3); >- process().sendSync(Messages::WebPage::ShouldDelayWindowOrderingEvent(event), Messages::WebPage::ShouldDelayWindowOrderingEvent::Reply(result), m_pageID, messageTimeout); >+ sendSync(Messages::WebPage::ShouldDelayWindowOrderingEvent(event), Messages::WebPage::ShouldDelayWindowOrderingEvent::Reply(result), messageTimeout); > return result; > } > >@@ -435,7 +435,7 @@ bool WebPageProxy::acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEven > > bool result = false; > const Seconds messageTimeout(3); >- process().sendSync(Messages::WebPage::AcceptsFirstMouse(eventNumber, event), Messages::WebPage::AcceptsFirstMouse::Reply(result), m_pageID, messageTimeout); >+ sendSync(Messages::WebPage::AcceptsFirstMouse(eventNumber, event), Messages::WebPage::AcceptsFirstMouse::Reply(result), messageTimeout); > return result; > } > >diff --git a/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp b/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp >index ff449341d9e..57f3fe173cc 100644 >--- a/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp >+++ b/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp >@@ -168,7 +168,7 @@ IPC::Connection* WebPaymentCoordinator::messageSenderConnection() const > > uint64_t WebPaymentCoordinator::messageSenderDestinationID() const > { >- return m_webPage.pageID(); >+ return m_webPage.pageID().toUInt64(); > } > > void WebPaymentCoordinator::validateMerchant(const String& validationURLString) >diff --git a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >index b1cbc963b0e..454ca6bc844 100644 >--- a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >+++ b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp >@@ -231,7 +231,7 @@ void WebAutomationSessionProxy::didClearWindowObjectForFrame(WebFrame& frame) > WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidEvaluateJavaScriptFunction(callbackID, errorMessage, errorType), 0); > } > >-void WebAutomationSessionProxy::evaluateJavaScriptFunction(uint64_t pageID, uint64_t frameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID) >+void WebAutomationSessionProxy::evaluateJavaScriptFunction(PageIdentifier pageID, uint64_t frameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -312,7 +312,7 @@ void WebAutomationSessionProxy::didEvaluateJavaScriptFunction(uint64_t frameID, > WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidEvaluateJavaScriptFunction(callbackID, result, errorType), 0); > } > >-void WebAutomationSessionProxy::resolveChildFrameWithOrdinal(uint64_t pageID, uint64_t frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) >+void WebAutomationSessionProxy::resolveChildFrameWithOrdinal(PageIdentifier pageID, uint64_t frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -350,7 +350,7 @@ void WebAutomationSessionProxy::resolveChildFrameWithOrdinal(uint64_t pageID, ui > completionHandler(WTF::nullopt, childFrame->frameID()); > } > >-void WebAutomationSessionProxy::resolveChildFrameWithNodeHandle(uint64_t pageID, uint64_t frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) >+void WebAutomationSessionProxy::resolveChildFrameWithNodeHandle(PageIdentifier pageID, uint64_t frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -388,7 +388,7 @@ void WebAutomationSessionProxy::resolveChildFrameWithNodeHandle(uint64_t pageID, > completionHandler(WTF::nullopt, frameFromElement->frameID()); > } > >-void WebAutomationSessionProxy::resolveChildFrameWithName(uint64_t pageID, uint64_t frameID, const String& name, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) >+void WebAutomationSessionProxy::resolveChildFrameWithName(PageIdentifier pageID, uint64_t frameID, const String& name, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -426,7 +426,7 @@ void WebAutomationSessionProxy::resolveChildFrameWithName(uint64_t pageID, uint6 > completionHandler(WTF::nullopt, childFrame->frameID()); > } > >-void WebAutomationSessionProxy::resolveParentFrame(uint64_t pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) >+void WebAutomationSessionProxy::resolveParentFrame(PageIdentifier pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, uint64_t)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -452,7 +452,7 @@ void WebAutomationSessionProxy::resolveParentFrame(uint64_t pageID, uint64_t fra > completionHandler(WTF::nullopt, parentFrame->frameID()); > } > >-void WebAutomationSessionProxy::focusFrame(uint64_t pageID, uint64_t frameID) >+void WebAutomationSessionProxy::focusFrame(PageIdentifier pageID, uint64_t frameID) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) >@@ -527,7 +527,7 @@ static WebCore::FloatPoint convertPointFromFrameClientToRootView(WebCore::FrameV > return clientPoint; > } > >-void WebAutomationSessionProxy::computeElementLayout(uint64_t pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem coordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&& completionHandler) >+void WebAutomationSessionProxy::computeElementLayout(PageIdentifier pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem coordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -635,7 +635,7 @@ void WebAutomationSessionProxy::computeElementLayout(uint64_t pageID, uint64_t f > completionHandler(WTF::nullopt, resultElementBounds, resultInViewCenterPoint, isObscured); > } > >-void WebAutomationSessionProxy::selectOptionElement(uint64_t pageID, uint64_t frameID, String nodeHandle, CompletionHandler<void(Optional<String>)>&& completionHandler) >+void WebAutomationSessionProxy::selectOptionElement(PageIdentifier pageID, uint64_t frameID, String nodeHandle, CompletionHandler<void(Optional<String>)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -703,7 +703,7 @@ static WebCore::IntRect snapshotRectForScreenshot(WebPage& page, WebCore::Elemen > return { }; > } > >-void WebAutomationSessionProxy::takeScreenshot(uint64_t pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID) >+void WebAutomationSessionProxy::takeScreenshot(PageIdentifier pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID) > { > ShareableBitmap::Handle handle; > >@@ -751,7 +751,7 @@ void WebAutomationSessionProxy::takeScreenshot(uint64_t pageID, uint64_t frameID > WebProcess::singleton().parentProcessConnection()->send(Messages::WebAutomationSession::DidTakeScreenshot(callbackID, handle, { }), 0); > } > >-void WebAutomationSessionProxy::getCookiesForFrame(uint64_t pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&& completionHandler) >+void WebAutomationSessionProxy::getCookiesForFrame(PageIdentifier pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >@@ -776,7 +776,7 @@ void WebAutomationSessionProxy::getCookiesForFrame(uint64_t pageID, uint64_t fra > completionHandler(WTF::nullopt, foundCookies); > } > >-void WebAutomationSessionProxy::deleteCookie(uint64_t pageID, uint64_t frameID, String cookieName, CompletionHandler<void(Optional<String>)>&& completionHandler) >+void WebAutomationSessionProxy::deleteCookie(PageIdentifier pageID, uint64_t frameID, String cookieName, CompletionHandler<void(Optional<String>)>&& completionHandler) > { > WebPage* page = WebProcess::singleton().webPage(pageID); > if (!page) { >diff --git a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h >index 629541d20ba..1167645277d 100644 >--- a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h >+++ b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.h >@@ -28,6 +28,7 @@ > #include "Connection.h" > #include "CoordinateSystem.h" > #include <JavaScriptCore/JSBase.h> >+#include <WebCore/PageIdentifier.h> > #include <wtf/text/WTFString.h> > > namespace WebCore { >@@ -60,17 +61,17 @@ private: > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; > > // Called by WebAutomationSessionProxy messages >- void evaluateJavaScriptFunction(uint64_t pageID, uint64_t frameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID); >- void resolveChildFrameWithOrdinal(uint64_t pageID, uint64_t frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, uint64_t)>&&); >- void resolveChildFrameWithNodeHandle(uint64_t pageID, uint64_t frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, uint64_t)>&&); >- void resolveChildFrameWithName(uint64_t pageID, uint64_t frameID, const String& name, CompletionHandler<void(Optional<String>, uint64_t)>&&); >- void resolveParentFrame(uint64_t pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, uint64_t)>&&); >- void focusFrame(uint64_t pageID, uint64_t frameID); >- void computeElementLayout(uint64_t pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&&); >- void selectOptionElement(uint64_t pageID, uint64_t frameID, String nodeHandle, CompletionHandler<void(Optional<String>)>&&); >- void takeScreenshot(uint64_t pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID); >- void getCookiesForFrame(uint64_t pageID, uint64_t frameID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&&); >- void deleteCookie(uint64_t pageID, uint64_t frameID, String cookieName, CompletionHandler<void(Optional<String>)>&&); >+ void evaluateJavaScriptFunction(WebCore::PageIdentifier, uint64_t frameID, const String& function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID); >+ void resolveChildFrameWithOrdinal(WebCore::PageIdentifier, uint64_t frameID, uint32_t ordinal, CompletionHandler<void(Optional<String>, uint64_t)>&&); >+ void resolveChildFrameWithNodeHandle(WebCore::PageIdentifier, uint64_t frameID, const String& nodeHandle, CompletionHandler<void(Optional<String>, uint64_t)>&&); >+ void resolveChildFrameWithName(WebCore::PageIdentifier, uint64_t frameID, const String& name, CompletionHandler<void(Optional<String>, uint64_t)>&&); >+ void resolveParentFrame(WebCore::PageIdentifier, uint64_t frameID, CompletionHandler<void(Optional<String>, uint64_t)>&&); >+ void focusFrame(WebCore::PageIdentifier, uint64_t frameID); >+ void computeElementLayout(WebCore::PageIdentifier, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, CoordinateSystem, CompletionHandler<void(Optional<String>, WebCore::IntRect, Optional<WebCore::IntPoint>, bool)>&&); >+ void selectOptionElement(WebCore::PageIdentifier, uint64_t frameID, String nodeHandle, CompletionHandler<void(Optional<String>)>&&); >+ void takeScreenshot(WebCore::PageIdentifier, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID); >+ void getCookiesForFrame(WebCore::PageIdentifier, uint64_t frameID, CompletionHandler<void(Optional<String>, Vector<WebCore::Cookie>)>&&); >+ void deleteCookie(WebCore::PageIdentifier, uint64_t frameID, String cookieName, CompletionHandler<void(Optional<String>)>&&); > > String m_sessionIdentifier; > >diff --git a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in >index aa1219e2ef1..d72f89d2635 100644 >--- a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in >+++ b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.messages.in >@@ -21,21 +21,21 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > messages -> WebAutomationSessionProxy { >- EvaluateJavaScriptFunction(uint64_t pageID, uint64_t frameID, String function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID) >+ EvaluateJavaScriptFunction(WebCore::PageIdentifier pageID, uint64_t frameID, String function, Vector<String> arguments, bool expectsImplicitCallbackArgument, int callbackTimeout, uint64_t callbackID) > >- ResolveChildFrameWithOrdinal(uint64_t pageID, uint64_t frameID, uint32_t ordinal) -> (Optional<String> errorType, uint64_t frameID) Async >- ResolveChildFrameWithNodeHandle(uint64_t pageID, uint64_t frameID, String nodeHandle) -> (Optional<String> errorType, uint64_t frameID) Async >- ResolveChildFrameWithName(uint64_t pageID, uint64_t frameID, String name) -> (Optional<String> errorType, uint64_t frameID) Async >- ResolveParentFrame(uint64_t pageID, uint64_t frameID) -> (Optional<String> errorType, uint64_t frameID) Async >+ ResolveChildFrameWithOrdinal(WebCore::PageIdentifier pageID, uint64_t frameID, uint32_t ordinal) -> (Optional<String> errorType, uint64_t frameID) Async >+ ResolveChildFrameWithNodeHandle(WebCore::PageIdentifier pageID, uint64_t frameID, String nodeHandle) -> (Optional<String> errorType, uint64_t frameID) Async >+ ResolveChildFrameWithName(WebCore::PageIdentifier pageID, uint64_t frameID, String name) -> (Optional<String> errorType, uint64_t frameID) Async >+ ResolveParentFrame(WebCore::PageIdentifier pageID, uint64_t frameID) -> (Optional<String> errorType, uint64_t frameID) Async > >- FocusFrame(uint64_t pageID, uint64_t frameID) >+ FocusFrame(WebCore::PageIdentifier pageID, uint64_t frameID) > >- ComputeElementLayout(uint64_t pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, enum:uint8_t WebKit::CoordinateSystem coordinateSystem) -> (Optional<String> errorType, WebCore::IntRect rect, Optional<WebCore::IntPoint> inViewCenterPoint, bool isObscured) Async >+ ComputeElementLayout(WebCore::PageIdentifier pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, enum:uint8_t WebKit::CoordinateSystem coordinateSystem) -> (Optional<String> errorType, WebCore::IntRect rect, Optional<WebCore::IntPoint> inViewCenterPoint, bool isObscured) Async > >- SelectOptionElement(uint64_t pageID, uint64_t frameID, String nodeHandle) -> (Optional<String> errorType) Async >+ SelectOptionElement(WebCore::PageIdentifier pageID, uint64_t frameID, String nodeHandle) -> (Optional<String> errorType) Async > >- TakeScreenshot(uint64_t pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID) >+ TakeScreenshot(WebCore::PageIdentifier pageID, uint64_t frameID, String nodeHandle, bool scrollIntoViewIfNeeded, bool clipToViewport, uint64_t callbackID) > >- GetCookiesForFrame(uint64_t pageID, uint64_t frameID) -> (Optional<String> errorType, Vector<WebCore::Cookie> cookies) Async >- DeleteCookie(uint64_t pageID, uint64_t frameID, String cookieName) -> (Optional<String> errorType) Async >+ GetCookiesForFrame(WebCore::PageIdentifier pageID, uint64_t frameID) -> (Optional<String> errorType, Vector<WebCore::Cookie> cookies) Async >+ DeleteCookie(WebCore::PageIdentifier pageID, uint64_t frameID, String cookieName) -> (Optional<String> errorType) Async > } >diff --git a/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp b/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp >index ae3883d86b6..af89d788163 100644 >--- a/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp >+++ b/Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp >@@ -89,7 +89,7 @@ void NetworkProcessConnection::didReceiveMessage(IPC::Connection& connection, IP > return; > } > if (decoder.messageReceiverName() == Messages::WebPage::messageReceiverName()) { >- if (auto* webPage = WebProcess::singleton().webPage(decoder.destinationID())) >+ if (auto* webPage = WebProcess::singleton().webPage(makeObjectIdentifier<PageIdentifierType>(decoder.destinationID()))) > webPage->didReceiveWebPageMessage(connection, decoder); > return; > } >diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >index 04ae0e45d5e..278b6018479 100644 >--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp >@@ -157,7 +157,7 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > auto& frameLoaderClient = resourceLoader.frameLoader()->client(); > > WebResourceLoader::TrackingParameters trackingParameters; >- trackingParameters.pageID = frameLoaderClient.pageID().valueOr(0); >+ trackingParameters.pageID = frameLoaderClient.pageID().valueOr(PageIdentifier { }); > trackingParameters.frameID = frameLoaderClient.frameID().valueOr(0); > trackingParameters.resourceID = identifier; > auto sessionID = frameLoaderClient.sessionID(); >@@ -167,7 +167,7 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > // then we should remember the ResourceLoader in our records but not schedule it in the NetworkProcess. > if (resourceLoader.documentLoader()->scheduleArchiveLoad(resourceLoader, resourceLoader.request())) { > LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as an archive resource.", resourceLoader.url().string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as an archive resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as an archive resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader, trackingParameters)); > return; > } >@@ -175,14 +175,14 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > > if (resourceLoader.documentLoader()->applicationCacheHost().maybeLoadResource(resourceLoader, resourceLoader.request(), resourceLoader.request().url())) { > LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be loaded from application cache.", resourceLoader.url().string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded from application cache (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded from application cache (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > m_webResourceLoaders.set(identifier, WebResourceLoader::create(resourceLoader, trackingParameters)); > return; > } > > if (resourceLoader.request().url().protocolIsData()) { > LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be loaded as data.", resourceLoader.url().string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded as data (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be loaded as data (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > startLocalLoad(resourceLoader); > return; > } >@@ -190,7 +190,7 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > #if USE(QUICK_LOOK) > if (isQuickLookPreviewURL(resourceLoader.request().url())) { > LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as a QuickLook resource.", resourceLoader.url().string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a QuickLook resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a QuickLook resource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > startLocalLoad(resourceLoader); > return; > } >@@ -201,7 +201,7 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > // https://blogs.gnome.org/alexl/2012/01/26/resources-in-glib/ > if (resourceLoader.request().url().protocolIs("resource")) { > LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be handled as a GResource.", resourceLoader.url().string().utf8().data()); >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a GResource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled as a GResource (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > startLocalLoad(resourceLoader); > return; > } >@@ -211,11 +211,11 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > WebServiceWorkerProvider::singleton().handleFetch(resourceLoader, sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect, [this, trackingParameters, identifier, sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime = maximumBufferingTime(resource), resourceLoader = makeRef(resourceLoader)] (ServiceWorkerClientFetch::Result result) mutable { > if (result != ServiceWorkerClientFetch::Result::Unhandled) { > LOG(NetworkScheduling, "(WebProcess) WebLoaderStrategy::scheduleLoad, url '%s' will be scheduled through ServiceWorker handle fetch algorithm", resourceLoader->url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL will be scheduled through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL will be scheduled through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > return; > } > if (resourceLoader->options().serviceWorkersMode == ServiceWorkersMode::Only) { >- RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: unable to schedule URL through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: unable to schedule URL through ServiceWorker handle fetch algorithm (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > callOnMainThread([resourceLoader = WTFMove(resourceLoader)] { > auto error = internalError(resourceLoader->request().url()); > error.setType(ResourceError::Type::Cancellation); >@@ -227,13 +227,13 @@ void WebLoaderStrategy::scheduleLoad(ResourceLoader& resourceLoader, CachedResou > if (!WebProcess::singleton().webLoaderStrategy().tryLoadingUsingURLSchemeHandler(resourceLoader)) > WebProcess::singleton().webLoaderStrategy().scheduleLoadFromNetworkProcess(resourceLoader.get(), resourceLoader->request(), trackingParameters, sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime); > else >- RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader.get(), "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader->frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > }); > #else > if (!tryLoadingUsingURLSchemeHandler(resourceLoader)) > scheduleLoadFromNetworkProcess(resourceLoader, resourceLoader.request(), trackingParameters, sessionID, shouldClearReferrerOnHTTPSToHTTPRedirect, maximumBufferingTime(resource)); > else >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID, trackingParameters.frameID, identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL not handled by any handlers (frame = %p, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), trackingParameters.pageID.toUInt64(), trackingParameters.frameID, identifier); > #endif > } > >@@ -325,7 +325,7 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL > if (loadParameters.options.mode != FetchOptions::Mode::Navigate) { > ASSERT(loadParameters.sourceOrigin); > if (!loadParameters.sourceOrigin) { >- RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: no sourceOrigin (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier); >+ RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: no sourceOrigin (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID, loadParameters.identifier); > scheduleInternallyFailedLoad(resourceLoader); > return; > } >@@ -346,9 +346,9 @@ void WebLoaderStrategy::scheduleLoadFromNetworkProcess(ResourceLoader& resourceL > > ASSERT((loadParameters.webPageID && loadParameters.webFrameID) || loadParameters.clientCredentialPolicy == ClientCredentialPolicy::CannotAskClientForCredentials); > >- RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: Resource is being scheduled with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier); >+ RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: Resource is being scheduled with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID, loadParameters.identifier); > if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::ScheduleResourceLoad(loadParameters), 0)) { >- RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: Unable to schedule resource with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID, loadParameters.webFrameID, loadParameters.identifier); >+ RELEASE_LOG_ERROR_IF_ALLOWED(resourceLoader, "scheduleLoad: Unable to schedule resource with the NetworkProcess (frame = %p, priority = %d, pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", resourceLoader.frame(), static_cast<int>(resourceLoader.request().priority()), loadParameters.webPageID.toUInt64(), loadParameters.webFrameID, loadParameters.identifier); > // We probably failed to schedule this load with the NetworkProcess because it had crashed. > // This load will never succeed so we will schedule it to fail asynchronously. > scheduleInternallyFailedLoad(resourceLoader); >@@ -507,19 +507,19 @@ void WebLoaderStrategy::loadResourceSynchronously(FrameLoader& frameLoader, unsi > WebFrame* webFrame = webFrameLoaderClient ? webFrameLoaderClient->webFrame() : nullptr; > WebPage* webPage = webFrame ? webFrame->page() : nullptr; > >- auto pageID = webPage ? webPage->pageID() : 0; >+ auto pageID = webPage ? webPage->pageID() : PageIdentifier { }; > auto frameID = webFrame ? webFrame->frameID() : 0; > auto sessionID = webPage ? webPage->sessionID() : PAL::SessionID::defaultSessionID(); > > auto* document = frameLoader.frame().document(); > if (!document) { >- RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: no document (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID, frameID, resourceLoadIdentifier); >+ RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: no document (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID.toUInt64(), frameID, resourceLoadIdentifier); > error = internalError(request.url()); > return; > } > > if (auto syncLoadResult = tryLoadingSynchronouslyUsingURLSchemeHandler(frameLoader, resourceLoadIdentifier, request)) { >- RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed calling tryLoadingSynchronouslyUsingURLSchemeHandler (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu, error = %d)", pageID, frameID, resourceLoadIdentifier, syncLoadResult->error.errorCode()); >+ RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed calling tryLoadingSynchronouslyUsingURLSchemeHandler (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu, error = %d)", pageID.toUInt64(), frameID, resourceLoadIdentifier, syncLoadResult->error.errorCode()); > error = WTFMove(syncLoadResult->error); > response = WTFMove(syncLoadResult->response); > data = WTFMove(syncLoadResult->data); >@@ -553,7 +553,7 @@ void WebLoaderStrategy::loadResourceSynchronously(FrameLoader& frameLoader, unsi > HangDetectionDisabler hangDetectionDisabler; > > if (!WebProcess::singleton().ensureNetworkProcessConnection().connection().sendSync(Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad(loadParameters), Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::Reply(error, response, data), 0)) { >- RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed sending synchronous network process message (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID, frameID, resourceLoadIdentifier); >+ RELEASE_LOG_ERROR_IF_ALLOWED(sessionID, "loadResourceSynchronously: failed sending synchronous network process message (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %lu)", pageID.toUInt64(), frameID, resourceLoadIdentifier); > if (auto* page = webPage ? webPage->corePage() : nullptr) > page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::synchronousMessageFailedKey(), WebCore::ShouldSample::No); > response = ResourceResponse(); >@@ -561,7 +561,7 @@ void WebLoaderStrategy::loadResourceSynchronously(FrameLoader& frameLoader, unsi > } > } > >-void WebLoaderStrategy::pageLoadCompleted(uint64_t webPageID) >+void WebLoaderStrategy::pageLoadCompleted(PageIdentifier webPageID) > { > WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::PageLoadCompleted(webPageID), 0); > } >@@ -648,10 +648,10 @@ void WebLoaderStrategy::preconnectTo(FrameLoader& frameLoader, const URL& url, S > > NetworkResourceLoadParameters parameters; > parameters.request = ResourceRequest { url }; >- parameters.webPageID = webPage ? webPage->pageID() : 0; >- parameters.webFrameID = webFrame ? webFrame->frameID() : 0; >+ parameters.webPageID = webPage->pageID(); >+ parameters.webFrameID = webFrame->frameID(); > parameters.parentPID = presentingApplicationPID(); >- parameters.sessionID = webPage ? webPage->sessionID() : PAL::SessionID::defaultSessionID(); >+ parameters.sessionID = webPage->sessionID(); > parameters.storedCredentialsPolicy = storedCredentialsPolicy; > parameters.shouldPreconnectOnly = PreconnectOnly::Yes; > parameters.shouldRestrictHTTPResponseAccess = shouldPerformSecurityChecks(); >diff --git a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h >index 4af59941e34..ac524966a85 100644 >--- a/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h >+++ b/Source/WebKit/WebProcess/Network/WebLoaderStrategy.h >@@ -51,7 +51,7 @@ public: > > void loadResource(WebCore::Frame&, WebCore::CachedResource&, WebCore::ResourceRequest&&, const WebCore::ResourceLoaderOptions&, CompletionHandler<void(RefPtr<WebCore::SubresourceLoader>&&)>&&) final; > void loadResourceSynchronously(WebCore::FrameLoader&, unsigned long resourceLoadIdentifier, const WebCore::ResourceRequest&, WebCore::ClientCredentialPolicy, const WebCore::FetchOptions&, const WebCore::HTTPHeaderMap&, WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>& data) final; >- void pageLoadCompleted(uint64_t webPageID) final; >+ void pageLoadCompleted(WebCore::PageIdentifier) final; > > void remove(WebCore::ResourceLoader*) final; > void setDefersLoading(WebCore::ResourceLoader&, bool) final; >diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp >index bf88fda3007..88bd53bf1f8 100644 >--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp >+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp >@@ -88,16 +88,16 @@ void WebResourceLoader::willSendRequest(ResourceRequest&& proposedRequest, Resou > Ref<WebResourceLoader> protectedThis(*this); > > LOG(Network, "(WebProcess) WebResourceLoader::willSendRequest to '%s'", proposedRequest.url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED("willSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("willSendRequest: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > > if (m_coreLoader->documentLoader()->applicationCacheHost().maybeLoadFallbackForRedirect(m_coreLoader.get(), proposedRequest, redirectResponse)) { >- RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because maybeLoadFallbackForRedirect returned false (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because maybeLoadFallbackForRedirect returned false (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > return; > } > > m_coreLoader->willSendRequest(WTFMove(proposedRequest), redirectResponse, [this, protectedThis = WTFMove(protectedThis)](ResourceRequest&& request) { > if (!m_coreLoader || !m_coreLoader->identifier()) { >- RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because no coreloader or identifier (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("willSendRequest: exiting early because no coreloader or identifier (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > return; > } > >@@ -113,12 +113,12 @@ void WebResourceLoader::didSendData(uint64_t bytesSent, uint64_t totalBytesToBeS > void WebResourceLoader::didReceiveResponse(const ResourceResponse& response, bool needsContinueDidReceiveResponseMessage) > { > LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponse for '%s'. Status %d.", m_coreLoader->url().string().latin1().data(), response.httpStatusCode()); >- RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", status = %d)", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID, response.httpStatusCode()); >+ RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", status = %d)", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID, response.httpStatusCode()); > > Ref<WebResourceLoader> protectedThis(*this); > > if (m_coreLoader->documentLoader()->applicationCacheHost().maybeLoadFallbackForResponse(m_coreLoader.get(), response)) { >- RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because the content is already cached (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because the content is already cached (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > return; > } > >@@ -135,7 +135,7 @@ void WebResourceLoader::didReceiveResponse(const ResourceResponse& response, boo > if (m_coreLoader && m_coreLoader->identifier()) > send(Messages::NetworkResourceLoader::ContinueDidReceiveResponse()); > else >- RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because no coreLoader or no ID (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didReceiveResponse: not continuing load because no coreLoader or no ID (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > }; > } > >@@ -148,7 +148,7 @@ void WebResourceLoader::didReceiveData(const IPC::DataReference& data, int64_t e > ASSERT_WITH_MESSAGE(!m_isProcessingNetworkResponse, "Network process should not send data until we've validated the response"); > > if (!m_numBytesReceived) { >- RELEASE_LOG_IF_ALLOWED("didReceiveData: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didReceiveData: Started receiving data (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > } > m_numBytesReceived += data.size(); > >@@ -158,7 +158,7 @@ void WebResourceLoader::didReceiveData(const IPC::DataReference& data, int64_t e > void WebResourceLoader::didFinishResourceLoad(const NetworkLoadMetrics& networkLoadMetrics) > { > LOG(Network, "(WebProcess) WebResourceLoader::didFinishResourceLoad for '%s'", m_coreLoader->url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED("didFinishResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID, m_numBytesReceived); >+ RELEASE_LOG_IF_ALLOWED("didFinishResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", length = %zd)", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID, m_numBytesReceived); > > ASSERT_WITH_MESSAGE(!m_isProcessingNetworkResponse, "Load should not be able to finish before we've validated the response"); > m_coreLoader->didFinishLoading(networkLoadMetrics); >@@ -167,7 +167,7 @@ void WebResourceLoader::didFinishResourceLoad(const NetworkLoadMetrics& networkL > void WebResourceLoader::didFailResourceLoad(const ResourceError& error) > { > LOG(Network, "(WebProcess) WebResourceLoader::didFailResourceLoad for '%s'", m_coreLoader->url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED("didFailResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didFailResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > > ASSERT_WITH_MESSAGE(!m_isProcessingNetworkResponse, "Load should not be able to finish before we've validated the response"); > >@@ -179,7 +179,7 @@ void WebResourceLoader::didFailResourceLoad(const ResourceError& error) > void WebResourceLoader::didBlockAuthenticationChallenge() > { > LOG(Network, "(WebProcess) WebResourceLoader::didBlockAuthenticationChallenge for '%s'", m_coreLoader->url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED("didBlockAuthenticationChallenge: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didBlockAuthenticationChallenge: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > > m_coreLoader->didBlockAuthenticationChallenge(); > } >@@ -187,7 +187,7 @@ void WebResourceLoader::didBlockAuthenticationChallenge() > void WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied(const ResourceResponse& response) > { > LOG(Network, "(WebProcess) WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied for '%s'", m_coreLoader->url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED("stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > > m_coreLoader->documentLoader()->stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied(m_coreLoader->identifier(), response); > } >@@ -196,13 +196,13 @@ void WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDeni > void WebResourceLoader::didReceiveResource(const ShareableResource::Handle& handle) > { > LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResource for '%s'", m_coreLoader->url().string().latin1().data()); >- RELEASE_LOG_IF_ALLOWED("didReceiveResource: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didReceiveResource: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > > RefPtr<SharedBuffer> buffer = handle.tryWrapInSharedBuffer(); > > if (!buffer) { > LOG_ERROR("Unable to create buffer from ShareableResource sent from the network process."); >- RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID); >+ RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID.toUInt64(), m_trackingParameters.frameID, m_trackingParameters.resourceID); > if (auto* frame = m_coreLoader->frame()) { > if (auto* page = frame->page()) > page->diagnosticLoggingClient().logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::internalErrorKey(), WebCore::DiagnosticLoggingKeys::createSharedBufferFailedKey(), WebCore::ShouldSample::No); >diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.h b/Source/WebKit/WebProcess/Network/WebResourceLoader.h >index 7fd7832233a..586543718e5 100644 >--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.h >+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.h >@@ -28,6 +28,7 @@ > #include "Connection.h" > #include "MessageSender.h" > #include "ShareableResource.h" >+#include <WebCore/PageIdentifier.h> > #include <wtf/RefCounted.h> > #include <wtf/RefPtr.h> > >@@ -50,7 +51,7 @@ typedef uint64_t ResourceLoadIdentifier; > class WebResourceLoader : public RefCounted<WebResourceLoader>, public IPC::MessageSender { > public: > struct TrackingParameters { >- uint64_t pageID { 0 }; >+ WebCore::PageIdentifier pageID; > uint64_t frameID { 0 }; > ResourceLoadIdentifier resourceID { 0 }; > }; >diff --git a/Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp b/Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp >index 20e4d5c5adb..fa07823ff3c 100644 >--- a/Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp >+++ b/Source/WebKit/WebProcess/Notifications/WebNotificationManager.cpp >@@ -150,7 +150,7 @@ bool WebNotificationManager::show(Notification* notification, WebPage* page) > auto it = m_notificationContextMap.add(notification->scriptExecutionContext(), Vector<uint64_t>()).iterator; > it->value.append(notificationID); > >- m_process.parentProcessConnection()->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->icon().string(), notification->tag(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID), page->pageID()); >+ page->send(Messages::WebPageProxy::ShowNotification(notification->title(), notification->body(), notification->icon().string(), notification->tag(), notification->lang(), notification->dir(), notification->scriptExecutionContext()->securityOrigin()->toString(), notificationID)); > return true; > #else > UNUSED_PARAM(notification); >@@ -169,7 +169,7 @@ void WebNotificationManager::cancel(Notification* notification, WebPage* page) > if (!notificationID) > return; > >- m_process.parentProcessConnection()->send(Messages::WebPageProxy::CancelNotification(notificationID), page->pageID()); >+ page->send(Messages::WebPageProxy::CancelNotification(notificationID)); > #else > UNUSED_PARAM(notification); > UNUSED_PARAM(page); >@@ -184,7 +184,7 @@ void WebNotificationManager::clearNotifications(WebCore::ScriptExecutionContext* > return; > > Vector<uint64_t>& notificationIDs = it->value; >- m_process.parentProcessConnection()->send(Messages::WebPageProxy::ClearNotifications(notificationIDs), page->pageID()); >+ page->send(Messages::WebPageProxy::ClearNotifications(notificationIDs)); > size_t count = notificationIDs.size(); > for (size_t i = 0; i < count; ++i) { > RefPtr<Notification> notification = m_notificationIDMap.take(notificationIDs[i]); >@@ -210,7 +210,7 @@ void WebNotificationManager::didDestroyNotification(Notification* notification, > > m_notificationIDMap.remove(notificationID); > removeNotificationFromContextMap(notificationID, notification); >- m_process.parentProcessConnection()->send(Messages::WebPageProxy::DidDestroyNotification(notificationID), page->pageID()); >+ page->send(Messages::WebPageProxy::DidDestroyNotification(notificationID)); > #else > UNUSED_PARAM(notification); > UNUSED_PARAM(page); >diff --git a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >index 34b5a643f03..8cddb530d7d 100644 >--- a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >+++ b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp >@@ -73,7 +73,7 @@ static const Seconds syncWorkerTerminationTimeout { 100_ms }; // Only used by la > > class ServiceWorkerFrameLoaderClient final : public EmptyFrameLoaderClient { > public: >- ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection& connection, PAL::SessionID sessionID, uint64_t pageID, uint64_t frameID, const String& userAgent) >+ ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection& connection, PAL::SessionID sessionID, WebCore::PageIdentifier pageID, uint64_t frameID, const String& userAgent) > : m_connection(connection) > , m_sessionID(sessionID) > , m_pageID(pageID) >@@ -95,18 +95,18 @@ private: > bool shouldUseCredentialStorage(DocumentLoader*, unsigned long) final { return true; } > > PAL::SessionID sessionID() const final { return m_sessionID; } >- Optional<uint64_t> pageID() const final { return m_pageID; } >+ Optional<WebCore::PageIdentifier> pageID() const final { return m_pageID; } > Optional<uint64_t> frameID() const final { return m_frameID; } > String userAgent(const URL&) final { return m_userAgent; } > > WebSWContextManagerConnection& m_connection; > PAL::SessionID m_sessionID; >- uint64_t m_pageID { 0 }; >+ WebCore::PageIdentifier m_pageID; > uint64_t m_frameID { 0 }; > String m_userAgent; > }; > >-WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, uint64_t pageGroupID, uint64_t pageID, const WebPreferencesStore& store) >+WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, uint64_t pageGroupID, PageIdentifier pageID, const WebPreferencesStore& store) > : m_connectionToNetworkProcess(WTFMove(connection)) > , m_pageGroupID(pageGroupID) > , m_pageID(pageID) >diff --git a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h >index 6ce83d1d09e..fbb630e4e19 100644 >--- a/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h >+++ b/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h >@@ -51,7 +51,7 @@ struct WebPreferencesStore; > > class WebSWContextManagerConnection final : public WebCore::SWContextManager::Connection, public IPC::MessageReceiver { > public: >- WebSWContextManagerConnection(Ref<IPC::Connection>&&, uint64_t pageGroupID, uint64_t pageID, const WebPreferencesStore&); >+ WebSWContextManagerConnection(Ref<IPC::Connection>&&, uint64_t pageGroupID, WebCore::PageIdentifier, const WebPreferencesStore&); > ~WebSWContextManagerConnection(); > > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final; >@@ -96,7 +96,7 @@ private: > > Ref<IPC::Connection> m_connectionToNetworkProcess; > uint64_t m_pageGroupID; >- uint64_t m_pageID { 0 }; >+ WebCore::PageIdentifier m_pageID; > uint64_t m_previousServiceWorkerID { 0 }; > > WebCore::SecurityOrigin::StorageBlockingPolicy m_storageBlockingPolicy { WebCore::SecurityOrigin::StorageBlockingPolicy::AllowAllStorage }; >diff --git a/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp b/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp >index 4933ca4c3a0..29a3fe574d0 100644 >--- a/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp >+++ b/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp >@@ -82,14 +82,14 @@ Ref<WebUserContentController> WebUserContentController::getOrCreate(UserContentC > WebUserContentController::WebUserContentController(UserContentControllerIdentifier identifier) > : m_identifier(identifier) > { >- WebProcess::singleton().addMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier.toUInt64(), *this); >+ WebProcess::singleton().addMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier, *this); > } > > WebUserContentController::~WebUserContentController() > { > ASSERT(userContentControllers().contains(m_identifier)); > >- WebProcess::singleton().removeMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier.toUInt64()); >+ WebProcess::singleton().removeMessageReceiver(Messages::WebUserContentController::messageReceiverName(), m_identifier); > > userContentControllers().remove(m_identifier); > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >index 496296f6d88..343e835ad02 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >@@ -178,7 +178,7 @@ FloatRect WebChromeClient::windowRect() > > FloatRect newWindowFrame; > >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame))) > return FloatRect(); > > return newWindowFrame; >@@ -263,7 +263,7 @@ void WebChromeClient::focusedFrameChanged(Frame* frame) > { > WebFrame* webFrame = frame ? WebFrame::fromCoreFrame(*frame) : nullptr; > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0), m_page.pageID()); >+ m_page.send(Messages::WebPageProxy::FocusedFrameChanged(webFrame ? webFrame->frameID() : 0)); > } > > Page* WebChromeClient::createWindow(Frame& frame, const FrameLoadRequest& request, const WindowFeatures& windowFeatures, const NavigationAction& navigationAction) >@@ -288,19 +288,20 @@ Page* WebChromeClient::createWindow(Frame& frame, const FrameLoadRequest& reques > > WebFrame* webFrame = WebFrame::fromCoreFrame(frame); > >- uint64_t newPageID = 0; >+ Optional<PageIdentifier> newPageID; > Optional<WebPageCreationParameters> parameters; >- if (!webProcess.parentProcessConnection()->sendSync(Messages::WebPageProxy::CreateNewPage(webFrame->info(), webFrame->page()->pageID(), request.resourceRequest(), windowFeatures, navigationActionData), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::CreateNewPage(webFrame->info(), webFrame->page()->pageID(), request.resourceRequest(), windowFeatures, navigationActionData), Messages::WebPageProxy::CreateNewPage::Reply(newPageID, parameters))) > return nullptr; > > if (!newPageID) > return nullptr; >+ > ASSERT(parameters); > if (parameters->sessionID == m_page.sessionID()) > parameters->oldPageID = m_page.pageID(); > >- webProcess.createWebPage(newPageID, WTFMove(*parameters)); >- return webProcess.webPage(newPageID)->corePage(); >+ webProcess.createWebPage(*newPageID, WTFMove(*parameters)); >+ return webProcess.webPage(*newPageID)->corePage(); > } > > void WebChromeClient::show() >@@ -335,7 +336,7 @@ bool WebChromeClient::toolbarsVisible() > return toolbarsVisibility == API::InjectedBundle::PageUIClient::UIElementVisibility::Visible; > > bool toolbarsAreVisible = true; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::GetToolbarsAreVisible(), Messages::WebPageProxy::GetToolbarsAreVisible::Reply(toolbarsAreVisible))) > return true; > > return toolbarsAreVisible; >@@ -353,7 +354,7 @@ bool WebChromeClient::statusbarVisible() > return statusbarVisibility == API::InjectedBundle::PageUIClient::UIElementVisibility::Visible; > > bool statusBarIsVisible = true; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::GetStatusBarIsVisible(), Messages::WebPageProxy::GetStatusBarIsVisible::Reply(statusBarIsVisible))) > return true; > > return statusBarIsVisible; >@@ -382,7 +383,7 @@ bool WebChromeClient::menubarVisible() > return menubarVisibility == API::InjectedBundle::PageUIClient::UIElementVisibility::Visible; > > bool menuBarIsVisible = true; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::GetMenuBarIsVisible(), Messages::WebPageProxy::GetMenuBarIsVisible::Reply(menuBarIsVisible))) > return true; > > return menuBarIsVisible; >@@ -1186,7 +1187,7 @@ void WebChromeClient::focusedContentMediaElementDidChange(uint64_t elementID) > bool WebChromeClient::wrapCryptoKey(const Vector<uint8_t>& key, Vector<uint8_t>& wrappedKey) const > { > bool succeeded; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::WrapCryptoKey(key), Messages::WebPageProxy::WrapCryptoKey::Reply(succeeded, wrappedKey), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::WrapCryptoKey(key), Messages::WebPageProxy::WrapCryptoKey::Reply(succeeded, wrappedKey))) > return false; > return succeeded; > } >@@ -1194,7 +1195,7 @@ bool WebChromeClient::wrapCryptoKey(const Vector<uint8_t>& key, Vector<uint8_t>& > bool WebChromeClient::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, Vector<uint8_t>& key) const > { > bool succeeded; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::UnwrapCryptoKey(wrappedKey), Messages::WebPageProxy::UnwrapCryptoKey::Reply(succeeded, key), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::UnwrapCryptoKey(wrappedKey), Messages::WebPageProxy::UnwrapCryptoKey::Reply(succeeded, key))) > return false; > return succeeded; > } >@@ -1204,7 +1205,7 @@ bool WebChromeClient::unwrapCryptoKey(const Vector<uint8_t>& wrappedKey, Vector< > String WebChromeClient::signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String& challengeString, const URL& url) const > { > String result; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::SignedPublicKeyAndChallengeString(keySizeIndex, challengeString, url), Messages::WebPageProxy::SignedPublicKeyAndChallengeString::Reply(result), m_page.pageID())) >+ if (!m_page.sendSync(Messages::WebPageProxy::SignedPublicKeyAndChallengeString(keySizeIndex, challengeString, url), Messages::WebPageProxy::SignedPublicKeyAndChallengeString::Reply(result))) > return emptyString(); > return result; > } >@@ -1317,12 +1318,12 @@ void WebChromeClient::didInvalidateDocumentMarkerRects() > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >-void WebChromeClient::hasStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_t frameID, uint64_t, CompletionHandler<void(bool)>&& completionHandler) >+void WebChromeClient::hasStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_t frameID, PageIdentifier, CompletionHandler<void(bool)>&& completionHandler) > { > m_page.hasStorageAccess(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, WTFMove(completionHandler)); > } > >-void WebChromeClient::requestStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_t frameID, uint64_t, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) >+void WebChromeClient::requestStorageAccess(RegistrableDomain&& subFrameDomain, RegistrableDomain&& topFrameDomain, uint64_t frameID, PageIdentifier, CompletionHandler<void(StorageAccessWasGranted, StorageAccessPromptWasShown)>&& completionHandler) > { > m_page.requestStorageAccess(WTFMove(subFrameDomain), WTFMove(topFrameDomain), frameID, WTFMove(completionHandler)); > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h >index dd3b225435d..291c5eddc8c 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h >@@ -369,8 +369,8 @@ private: > void didInvalidateDocumentMarkerRects() final; > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >- void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void(bool)>&&) final; >- void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&) final; >+ void hasStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, WTF::CompletionHandler<void(bool)>&&) final; >+ void requestStorageAccess(WebCore::RegistrableDomain&& subFrameDomain, WebCore::RegistrableDomain&& topFrameDomain, uint64_t frameID, WebCore::PageIdentifier, WTF::CompletionHandler<void(WebCore::StorageAccessWasGranted, WebCore::StorageAccessPromptWasShown)>&&) final; > #endif > > #if ENABLE(DEVICE_ORIENTATION) >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebColorChooser.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebColorChooser.cpp >index d535e5c55c6..cb40241705c 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebColorChooser.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebColorChooser.cpp >@@ -42,7 +42,7 @@ WebColorChooser::WebColorChooser(WebPage* page, ColorChooserClient* client, cons > , m_page(page) > { > m_page->setActiveColorChooser(this); >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(initialColor, client->elementRectRelativeToRootView(), client->suggestedColors()), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::ShowColorPicker(initialColor, client->elementRectRelativeToRootView(), client->suggestedColors())); > } > > WebColorChooser::~WebColorChooser() >@@ -74,7 +74,7 @@ void WebColorChooser::reattachColorChooser(const Color& color) > m_page->setActiveColorChooser(this); > > ASSERT(m_colorChooserClient); >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::ShowColorPicker(color, m_colorChooserClient->elementRectRelativeToRootView(), m_colorChooserClient->suggestedColors()), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::ShowColorPicker(color, m_colorChooserClient->elementRectRelativeToRootView(), m_colorChooserClient->suggestedColors())); > } > > void WebColorChooser::setSelectedColor(const Color& color) >@@ -85,7 +85,7 @@ void WebColorChooser::setSelectedColor(const Color& color) > if (m_page->activeColorChooser() != this) > return; > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::SetColorPickerColor(color), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::SetColorPickerColor(color)); > } > > void WebColorChooser::endChooser() >@@ -93,7 +93,7 @@ void WebColorChooser::endChooser() > if (!m_page) > return; > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::EndColorPicker(), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::EndColorPicker()); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp >index d025dfacfa2..d36a154cfef 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp >@@ -47,7 +47,7 @@ WebDataListSuggestionPicker::~WebDataListSuggestionPicker() { } > > void WebDataListSuggestionPicker::handleKeydownWithIdentifier(const WTF::String& key) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::HandleKeydownInDataList(key), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::HandleKeydownInDataList(key)); > } > > void WebDataListSuggestionPicker::didSelectOption(const WTF::String& selectedOption) >@@ -62,7 +62,7 @@ void WebDataListSuggestionPicker::didCloseSuggestions() > > void WebDataListSuggestionPicker::close() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::EndDataListSuggestions(), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::EndDataListSuggestions()); > } > > void WebDataListSuggestionPicker::displayWithActivationType(DataListSuggestionActivationType type) >@@ -75,7 +75,7 @@ void WebDataListSuggestionPicker::displayWithActivationType(DataListSuggestionAc > m_page->setActiveDataListSuggestionPicker(this); > > DataListSuggestionInformation info = { type, m_dataListSuggestionsClient->suggestions(), m_dataListSuggestionsClient->elementRectInRootViewCoordinates() }; >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::ShowDataListSuggestions(info), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::ShowDataListSuggestions(info)); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp >index f428fd2397e..7052025b9dc 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebEditorClient.cpp >@@ -309,7 +309,7 @@ void WebEditorClient::registerUndoStep(UndoStep& step) > auto stepID = webStep->stepID(); > > m_page->addWebUndoStep(stepID, WTFMove(webStep)); >- m_page->send(Messages::WebPageProxy::RegisterEditCommandForUndo(stepID, step.label()), m_page->pageID(), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); >+ m_page->send(Messages::WebPageProxy::RegisterEditCommandForUndo(stepID, step.label()), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); > } > > void WebEditorClient::registerRedoStep(UndoStep&) >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp >index 529c0467030..3dcd7e2ec19 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp >@@ -112,7 +112,7 @@ WebFrameLoaderClient::~WebFrameLoaderClient() > { > } > >-Optional<uint64_t> WebFrameLoaderClient::pageID() const >+Optional<PageIdentifier> WebFrameLoaderClient::pageID() const > { > if (m_frame && m_frame->page()) > return m_frame->page()->pageID(); >@@ -541,7 +541,7 @@ void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(const ResourceError& e > if (!webPage) > return; > >- RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailProvisionalLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID(), m_frame->frameID()); >+ RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailProvisionalLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID().toUInt64(), m_frame->frameID()); > > RefPtr<API::Object> userData; > >@@ -577,7 +577,7 @@ void WebFrameLoaderClient::dispatchDidFailLoad(const ResourceError& error) > if (!webPage) > return; > >- RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID(), m_frame->frameID()); >+ RELEASE_LOG(Network, "%p - WebFrameLoaderClient::dispatchDidFailLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ")", this, webPage->pageID().toUInt64(), m_frame->frameID()); > > RefPtr<API::Object> userData; > >@@ -901,7 +901,9 @@ void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const Navigat > if (requester.frameID() && WebProcess::singleton().webFrame(requester.frameID())) > originatingFrameInfoData.frameID = requester.frameID(); > >- uint64_t originatingPageID = requester.pageID() && WebProcess::singleton().webPage(requester.pageID()) ? requester.pageID() : 0; >+ Optional<PageIdentifier> originatingPageID; >+ if (requester.pageID() && WebProcess::singleton().webPage(requester.pageID())) >+ originatingPageID = requester.pageID(); > > NavigationActionData navigationActionData; > navigationActionData.navigationType = action->navigationType(); >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h >index f73ab8ca73f..c8fb2af2125 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h >@@ -51,7 +51,7 @@ public: > > void applyToDocumentLoader(WebsitePoliciesData&&); > >- Optional<uint64_t> pageID() const final; >+ Optional<WebCore::PageIdentifier> pageID() const final; > Optional<uint64_t> frameID() const final; > PAL::SessionID sessionID() const final; > >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebPopupMenu.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebPopupMenu.cpp >index d16fe857784..208bb88a3b7 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebPopupMenu.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebPopupMenu.cpp >@@ -111,7 +111,7 @@ void WebPopupMenu::show(const IntRect& rect, FrameView* view, int index) > PlatformPopupMenuData platformData; > setUpPlatformData(pageCoordinates, platformData); > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::ShowPopupMenu(pageCoordinates, static_cast<uint64_t>(m_popupClient->menuStyle().textDirection()), items, index, platformData), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::ShowPopupMenu(pageCoordinates, static_cast<uint64_t>(m_popupClient->menuStyle().textDirection()), items, index, platformData)); > } > > void WebPopupMenu::hide() >@@ -119,7 +119,7 @@ void WebPopupMenu::hide() > if (!m_page || !m_popupClient) > return; > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::HidePopupMenu(), m_page->pageID()); >+ m_page->send(Messages::WebPageProxy::HidePopupMenu()); > m_page->setActivePopupMenu(nullptr); > m_popupClient->popupDidHide(); > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp >index 33d4756eda2..c0e8c19144f 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp >@@ -56,7 +56,7 @@ void WebSearchPopupMenu::saveRecentSearches(const AtomicString& name, const Vect > if (!page) > return; > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::SaveRecentSearches(name, searchItems), page->pageID()); >+ page->send(Messages::WebPageProxy::SaveRecentSearches(name, searchItems)); > } > > void WebSearchPopupMenu::loadRecentSearches(const AtomicString& name, Vector<RecentSearch>& resultItems) >@@ -68,7 +68,7 @@ void WebSearchPopupMenu::loadRecentSearches(const AtomicString& name, Vector<Rec > if (!page) > return; > >- WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::LoadRecentSearches(name), Messages::WebPageProxy::LoadRecentSearches::Reply(resultItems), page->pageID()); >+ page->sendSync(Messages::WebPageProxy::LoadRecentSearches(name), Messages::WebPageProxy::LoadRecentSearches::Reply(resultItems)); > } > > bool WebSearchPopupMenu::enabled() >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h >index f9986e41ca2..cf7cbf4f9e7 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h >@@ -53,7 +53,7 @@ private: > > const String m_fileName; > const String m_uti; >- const uint64_t m_pageID; >+ const WebCore::PageIdentifier m_pageID; > QuickLookDocumentData m_data; > }; > >diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp >index 276b80bf28f..8d69b854b6e 100644 >--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp >+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.cpp >@@ -68,7 +68,7 @@ DrawingArea::DrawingArea(DrawingAreaType type, DrawingAreaIdentifier identifier, > , m_identifier(identifier) > , m_webPage(webPage) > { >- WebProcess::singleton().addMessageReceiver(Messages::DrawingArea::messageReceiverName(), m_identifier.toUInt64(), *this); >+ WebProcess::singleton().addMessageReceiver(Messages::DrawingArea::messageReceiverName(), m_identifier, *this); > } > > DrawingArea::~DrawingArea() >@@ -94,7 +94,17 @@ void DrawingArea::removeMessageReceiverIfNeeded() > if (m_hasRemovedMessageReceiver) > return; > m_hasRemovedMessageReceiver = true; >- WebProcess::singleton().removeMessageReceiver(Messages::DrawingArea::messageReceiverName(), m_identifier.toUInt64()); >+ WebProcess::singleton().removeMessageReceiver(Messages::DrawingArea::messageReceiverName(), m_identifier); >+} >+ >+IPC::Connection* DrawingArea::messageSenderConnection() const >+{ >+ return WebProcess::singleton().parentProcessConnection(); >+} >+ >+uint64_t DrawingArea::messageSenderDestinationID() const >+{ >+ return m_identifier.toUInt64(); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/DrawingArea.h b/Source/WebKit/WebProcess/WebPage/DrawingArea.h >index 8069a158ee2..ec9537d70f3 100644 >--- a/Source/WebKit/WebProcess/WebPage/DrawingArea.h >+++ b/Source/WebKit/WebProcess/WebPage/DrawingArea.h >@@ -29,6 +29,7 @@ > #include "DrawingAreaInfo.h" > #include "LayerTreeContext.h" > #include "MessageReceiver.h" >+#include "MessageSender.h" > #include "WebPage.h" > #include <WebCore/ActivityState.h> > #include <WebCore/FloatRect.h> >@@ -65,7 +66,7 @@ class LayerTreeHost; > struct WebPageCreationParameters; > struct WebPreferencesStore; > >-class DrawingArea : public IPC::MessageReceiver { >+class DrawingArea : public IPC::MessageReceiver, protected IPC::MessageSender { > WTF_MAKE_FAST_ALLOCATED; > WTF_MAKE_NONCOPYABLE(DrawingArea); > >@@ -153,11 +154,6 @@ public: > protected: > DrawingArea(DrawingAreaType, DrawingAreaIdentifier, WebPage&); > >- template<typename U> bool send(const U& message) >- { >- return m_webPage.send(message, m_identifier.toUInt64(), { }); >- } >- > DrawingAreaType m_type; > DrawingAreaIdentifier m_identifier; > WebPage& m_webPage; >@@ -170,6 +166,10 @@ private: > // IPC::MessageReceiver. > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; > void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() const final; >+ uint64_t messageSenderDestinationID() const final; > > // Message handlers. > // FIXME: These should be pure virtual. >diff --git a/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp b/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp >index 691830b593c..cd78268ed9d 100644 >--- a/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp >+++ b/Source/WebKit/WebProcess/WebPage/EventDispatcher.cpp >@@ -87,7 +87,7 @@ void EventDispatcher::initializeConnection(IPC::Connection* connection) > connection->addWorkQueueMessageReceiver(Messages::EventDispatcher::messageReceiverName(), m_queue.get(), this); > } > >-void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEvent, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom) >+void EventDispatcher::wheelEvent(PageIdentifier pageID, const WebWheelEvent& wheelEvent, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom) > { > #if PLATFORM(COCOA) || ENABLE(ASYNC_SCROLLING) > PlatformWheelEvent platformWheelEvent = platform(wheelEvent); >@@ -142,7 +142,7 @@ void EventDispatcher::wheelEvent(uint64_t pageID, const WebWheelEvent& wheelEven > } > > #if ENABLE(MAC_GESTURE_EVENTS) >-void EventDispatcher::gestureEvent(uint64_t pageID, const WebKit::WebGestureEvent& gestureEvent) >+void EventDispatcher::gestureEvent(PageIdentifier pageID, const WebKit::WebGestureEvent& gestureEvent) > { > RunLoop::main().dispatch([protectedThis = makeRef(*this), pageID, gestureEvent]() mutable { > protectedThis->dispatchGestureEvent(pageID, gestureEvent); >@@ -163,7 +163,7 @@ void EventDispatcher::getQueuedTouchEventsForPage(const WebPage& webPage, TouchE > destinationQueue = m_touchEvents.take(webPage.pageID()); > } > >-void EventDispatcher::touchEvent(uint64_t pageID, const WebKit::WebTouchEvent& touchEvent) >+void EventDispatcher::touchEvent(PageIdentifier pageID, const WebKit::WebTouchEvent& touchEvent) > { > bool updateListWasEmpty; > { >@@ -207,7 +207,7 @@ void EventDispatcher::dispatchTouchEvents() > } > #endif > >-void EventDispatcher::dispatchWheelEvent(uint64_t pageID, const WebWheelEvent& wheelEvent) >+void EventDispatcher::dispatchWheelEvent(PageIdentifier pageID, const WebWheelEvent& wheelEvent) > { > ASSERT(RunLoop::isMain()); > >@@ -219,7 +219,7 @@ void EventDispatcher::dispatchWheelEvent(uint64_t pageID, const WebWheelEvent& w > } > > #if ENABLE(MAC_GESTURE_EVENTS) >-void EventDispatcher::dispatchGestureEvent(uint64_t pageID, const WebGestureEvent& gestureEvent) >+void EventDispatcher::dispatchGestureEvent(PageIdentifier pageID, const WebGestureEvent& gestureEvent) > { > ASSERT(RunLoop::isMain()); > >@@ -232,9 +232,9 @@ void EventDispatcher::dispatchGestureEvent(uint64_t pageID, const WebGestureEven > #endif > > #if ENABLE(ASYNC_SCROLLING) >-void EventDispatcher::sendDidReceiveEvent(uint64_t pageID, const WebEvent& event, bool didHandleEvent) >+void EventDispatcher::sendDidReceiveEvent(PageIdentifier pageID, const WebEvent& event, bool didHandleEvent) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(event.type()), didHandleEvent), pageID); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(event.type()), didHandleEvent), pageID.toUInt64()); > } > #endif > >diff --git a/Source/WebKit/WebProcess/WebPage/EventDispatcher.h b/Source/WebKit/WebProcess/WebPage/EventDispatcher.h >index 1d477877eaa..e1bbbd47969 100644 >--- a/Source/WebKit/WebProcess/WebPage/EventDispatcher.h >+++ b/Source/WebKit/WebProcess/WebPage/EventDispatcher.h >@@ -29,6 +29,7 @@ > #include "Connection.h" > > #include "WebEvent.h" >+#include <WebCore/PageIdentifier.h> > #include <WebCore/WheelEventDeltaFilter.h> > #include <memory> > #include <wtf/HashMap.h> >@@ -77,38 +78,38 @@ private: > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; > > // Message handlers >- void wheelEvent(uint64_t pageID, const WebWheelEvent&, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom); >+ void wheelEvent(WebCore::PageIdentifier, const WebWheelEvent&, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom); > #if ENABLE(IOS_TOUCH_EVENTS) >- void touchEvent(uint64_t pageID, const WebTouchEvent&); >+ void touchEvent(WebCore::PageIdentifier, const WebTouchEvent&); > #endif > #if ENABLE(MAC_GESTURE_EVENTS) >- void gestureEvent(uint64_t pageID, const WebGestureEvent&); >+ void gestureEvent(WebCore::PageIdentifier, const WebGestureEvent&); > #endif > > > // This is called on the main thread. >- void dispatchWheelEvent(uint64_t pageID, const WebWheelEvent&); >+ void dispatchWheelEvent(WebCore::PageIdentifier, const WebWheelEvent&); > #if ENABLE(IOS_TOUCH_EVENTS) > void dispatchTouchEvents(); > #endif > #if ENABLE(MAC_GESTURE_EVENTS) >- void dispatchGestureEvent(uint64_t pageID, const WebGestureEvent&); >+ void dispatchGestureEvent(WebCore::PageIdentifier, const WebGestureEvent&); > #endif > > #if ENABLE(ASYNC_SCROLLING) >- void sendDidReceiveEvent(uint64_t pageID, const WebEvent&, bool didHandleEvent); >+ void sendDidReceiveEvent(WebCore::PageIdentifier, const WebEvent&, bool didHandleEvent); > #endif > > Ref<WorkQueue> m_queue; > > #if ENABLE(ASYNC_SCROLLING) > Lock m_scrollingTreesMutex; >- HashMap<uint64_t, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees; >+ HashMap<WebCore::PageIdentifier, RefPtr<WebCore::ThreadedScrollingTree>> m_scrollingTrees; > #endif > std::unique_ptr<WebCore::WheelEventDeltaFilter> m_recentWheelEventDeltaFilter; > #if ENABLE(IOS_TOUCH_EVENTS) > Lock m_touchEventsLock; >- HashMap<uint64_t, TouchEventQueue> m_touchEvents; >+ HashMap<WebCore::PageIdentifier, TouchEventQueue> m_touchEvents; > #endif > }; > >diff --git a/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in b/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in >index 5e1543c98cc..af904b4516a 100644 >--- a/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/EventDispatcher.messages.in >@@ -21,11 +21,11 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > messages -> EventDispatcher { >- WheelEvent(uint64_t pageID, WebKit::WebWheelEvent event, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom) >+ WheelEvent(WebCore::PageIdentifier pageID, WebKit::WebWheelEvent event, bool canRubberBandAtLeft, bool canRubberBandAtRight, bool canRubberBandAtTop, bool canRubberBandAtBottom) > #if ENABLE(IOS_TOUCH_EVENTS) >- TouchEvent(uint64_t pageID, WebKit::WebTouchEvent event) >+ TouchEvent(WebCore::PageIdentifier pageID, WebKit::WebTouchEvent event) > #endif > #if ENABLE(MAC_GESTURE_EVENTS) >- GestureEvent(uint64_t pageID, WebKit::WebGestureEvent event) >+ GestureEvent(WebCore::PageIdentifier pageID, WebKit::WebGestureEvent event) > #endif > } >diff --git a/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm b/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm >index b752c1c54d4..b291df0b7df 100644 >--- a/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm >+++ b/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm >@@ -75,7 +75,7 @@ RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage& webPage, const W > // FIXME: While using the high end of the range of DisplayIDs makes a collision with real, non-RemoteLayerTreeDrawingArea > // DisplayIDs less likely, it is not entirely safe to have a RemoteLayerTreeDrawingArea and TiledCoreAnimationDrawingArea > // coeexist in the same process. >- webPage.windowScreenDidChange(std::numeric_limits<uint32_t>::max() - webPage.pageID()); >+ webPage.windowScreenDidChange(std::numeric_limits<uint32_t>::max() - webPage.pageID().toUInt64()); > } > > RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea() >@@ -434,7 +434,7 @@ void RemoteLayerTreeDrawingArea::flushLayers() > RefPtr<BackingStoreFlusher> backingStoreFlusher = BackingStoreFlusher::create(WebProcess::singleton().parentProcessConnection(), WTFMove(commitEncoder), WTFMove(contextsToFlush)); > m_pendingBackingStoreFlusher = backingStoreFlusher; > >- uint64_t pageID = m_webPage.pageID(); >+ auto pageID = m_webPage.pageID(); > dispatch_async(m_commitQueue, [backingStoreFlusher = WTFMove(backingStoreFlusher), pageID] { > backingStoreFlusher->flush(); > >diff --git a/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp b/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp >index 05440456f41..c940e0cd041 100644 >--- a/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp >+++ b/Source/WebKit/WebProcess/WebPage/RemoteWebInspectorUI.cpp >@@ -79,7 +79,7 @@ void RemoteWebInspectorUI::sendMessageToFrontend(const String& message) > > void RemoteWebInspectorUI::sendMessageToBackend(const String& message) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::SendMessageToBackend(message), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::SendMessageToBackend(message)); > } > > void RemoteWebInspectorUI::windowObjectCleared() >@@ -102,12 +102,12 @@ void RemoteWebInspectorUI::frontendLoaded() > > void RemoteWebInspectorUI::changeSheetRect(const FloatRect& rect) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::SetSheetRect(rect), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::SetSheetRect(rect)); > } > > void RemoteWebInspectorUI::startWindowDrag() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::StartWindowDrag(), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::StartWindowDrag()); > } > > void RemoteWebInspectorUI::moveWindowBy(float x, float y) >@@ -124,34 +124,34 @@ WebCore::UserInterfaceLayoutDirection RemoteWebInspectorUI::userInterfaceLayoutD > > void RemoteWebInspectorUI::bringToFront() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::BringToFront(), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::BringToFront()); > } > > void RemoteWebInspectorUI::closeWindow() > { > m_page.corePage()->inspectorController().setInspectorFrontendClient(nullptr); > >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::FrontendDidClose(), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::FrontendDidClose()); > } > > void RemoteWebInspectorUI::reopen() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::Reopen(), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::Reopen()); > } > > void RemoteWebInspectorUI::openInNewTab(const String& url) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::OpenInNewTab(url), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::OpenInNewTab(url)); > } > > void RemoteWebInspectorUI::save(const String& filename, const String& content, bool base64Encoded, bool forceSaveAs) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::Save(filename, content, base64Encoded, forceSaveAs), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::Save(filename, content, base64Encoded, forceSaveAs)); > } > > void RemoteWebInspectorUI::append(const String& filename, const String& content) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::Append(filename, content), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::Append(filename, content)); > } > > void RemoteWebInspectorUI::inspectedURLChanged(const String& urlString) >@@ -161,7 +161,7 @@ void RemoteWebInspectorUI::inspectedURLChanged(const String& urlString) > > void RemoteWebInspectorUI::showCertificate(const CertificateInfo& certificateInfo) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::ShowCertificate(certificateInfo), m_page.pageID()); >+ m_page.send(Messages::RemoteWebInspectorProxy::ShowCertificate(certificateInfo)); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp b/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp >index 211d601ef0b..fcee0dfdfd2 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.cpp >@@ -55,7 +55,7 @@ static IDToHistoryItemMap& idToHistoryItemMap() > return map; > } > >-void WebBackForwardListProxy::addItemFromUIProcess(const BackForwardItemIdentifier& itemID, Ref<HistoryItem>&& item, uint64_t pageID, OverwriteExistingItem overwriteExistingItem) >+void WebBackForwardListProxy::addItemFromUIProcess(const BackForwardItemIdentifier& itemID, Ref<HistoryItem>&& item, PageIdentifier pageID, OverwriteExistingItem overwriteExistingItem) > { > // This item/itemID pair should not already exist in our map. > ASSERT_UNUSED(overwriteExistingItem, overwriteExistingItem == OverwriteExistingItem::Yes || !idToHistoryItemMap().contains(itemID)); >@@ -116,7 +116,7 @@ RefPtr<HistoryItem> WebBackForwardListProxy::itemAtIndex(int itemIndex) > return nullptr; > > Optional<BackForwardItemIdentifier> itemID; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID), m_page->pageID())) >+ if (!m_page->sendSync(Messages::WebPageProxy::BackForwardItemAtIndex(itemIndex), Messages::WebPageProxy::BackForwardItemAtIndex::Reply(itemID))) > return nullptr; > > if (!itemID) >@@ -131,7 +131,7 @@ unsigned WebBackForwardListProxy::backListCount() const > return 0; > > unsigned backListCount = 0; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount), m_page->pageID())) >+ if (!m_page->sendSync(Messages::WebPageProxy::BackForwardBackListCount(), Messages::WebPageProxy::BackForwardBackListCount::Reply(backListCount))) > return 0; > > return backListCount; >@@ -143,7 +143,7 @@ unsigned WebBackForwardListProxy::forwardListCount() const > return 0; > > unsigned forwardListCount = 0; >- if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount), m_page->pageID())) >+ if (!m_page->sendSync(Messages::WebPageProxy::BackForwardForwardListCount(), Messages::WebPageProxy::BackForwardForwardListCount::Reply(forwardListCount))) > return 0; > > return forwardListCount; >diff --git a/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h b/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h >index f3b1c8af548..d1baadb91c5 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h >+++ b/Source/WebKit/WebProcess/WebPage/WebBackForwardListProxy.h >@@ -26,6 +26,7 @@ > #pragma once > > #include <WebCore/BackForwardClient.h> >+#include <WebCore/PageIdentifier.h> > #include <wtf/HashSet.h> > > namespace WebCore { >@@ -47,7 +48,7 @@ public: > Yes, > No > }; >- void addItemFromUIProcess(const WebCore::BackForwardItemIdentifier&, Ref<WebCore::HistoryItem>&&, uint64_t pageID, OverwriteExistingItem); >+ void addItemFromUIProcess(const WebCore::BackForwardItemIdentifier&, Ref<WebCore::HistoryItem>&&, WebCore::PageIdentifier, OverwriteExistingItem); > > void clear(); > >diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp >index 160edefd59d..2d9d085e3bc 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.cpp >@@ -49,7 +49,7 @@ WebCookieJar::WebCookieJar() > String WebCookieJar::cookies(WebCore::Document& document, const URL& url) const > { > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >@@ -66,7 +66,7 @@ String WebCookieJar::cookies(WebCore::Document& document, const URL& url) const > void WebCookieJar::setCookies(WebCore::Document& document, const URL& url, const String& cookieString) > { > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >@@ -83,7 +83,7 @@ bool WebCookieJar::cookiesEnabled(const WebCore::Document& document) const > return result; > } > >-std::pair<String, WebCore::SecureCookiesAccessed> WebCookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies includeSecureCookies) const >+std::pair<String, WebCore::SecureCookiesAccessed> WebCookieJar::cookieRequestHeaderFieldValue(const PAL::SessionID& sessionID, const URL& firstParty, const WebCore::SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<PageIdentifier> pageID, WebCore::IncludeSecureCookies includeSecureCookies) const > { > String cookieString; > bool secureCookiesAccessed = false; >@@ -95,7 +95,7 @@ std::pair<String, WebCore::SecureCookiesAccessed> WebCookieJar::cookieRequestHea > bool WebCookieJar::getRawCookies(const WebCore::Document& document, const URL& url, Vector<WebCore::Cookie>& rawCookies) const > { > Optional<uint64_t> frameID; >- Optional<uint64_t> pageID; >+ Optional<PageIdentifier> pageID; > if (auto* frame = document.frame()) { > frameID = frame->loader().client().frameID(); > pageID = frame->loader().client().pageID(); >diff --git a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h >index 97dd76f664c..559bd0e50bb 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebCookieJar.h >+++ b/Source/WebKit/WebProcess/WebPage/WebCookieJar.h >@@ -36,7 +36,7 @@ public: > String cookies(WebCore::Document&, const URL&) const final; > void setCookies(WebCore::Document&, const URL&, const String& cookieString) final; > bool cookiesEnabled(const WebCore::Document&) const final; >- std::pair<String, WebCore::SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies) const final; >+ std::pair<String, WebCore::SecureCookiesAccessed> cookieRequestHeaderFieldValue(const PAL::SessionID&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<WebCore::PageIdentifier>, WebCore::IncludeSecureCookies) const final; > bool getRawCookies(const WebCore::Document&, const URL&, Vector<WebCore::Cookie>&) const final; > void deleteCookie(const WebCore::Document&, const URL&, const String& cookieName) final; > private: >diff --git a/Source/WebKit/WebProcess/WebPage/WebFrame.cpp b/Source/WebKit/WebProcess/WebPage/WebFrame.cpp >index 890c5e56ac0..4af495a51b9 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebFrame.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebFrame.cpp >@@ -110,7 +110,7 @@ static uint64_t generateListenerID() > Ref<WebFrame> WebFrame::createWithCoreMainFrame(WebPage* page, WebCore::Frame* coreFrame) > { > auto frame = create(std::unique_ptr<WebFrameLoaderClient>(static_cast<WebFrameLoaderClient*>(&coreFrame->loader().client()))); >- page->send(Messages::WebPageProxy::DidCreateMainFrame(frame->frameID()), page->pageID()); >+ page->send(Messages::WebPageProxy::DidCreateMainFrame(frame->frameID())); > > frame->m_coreFrame = coreFrame; > frame->m_coreFrame->tree().setName(String()); >@@ -121,7 +121,7 @@ Ref<WebFrame> WebFrame::createWithCoreMainFrame(WebPage* page, WebCore::Frame* c > Ref<WebFrame> WebFrame::createSubframe(WebPage* page, const String& frameName, HTMLFrameOwnerElement* ownerElement) > { > auto frame = create(std::make_unique<WebFrameLoaderClient>()); >- page->send(Messages::WebPageProxy::DidCreateSubframe(frame->frameID()), page->pageID()); >+ page->send(Messages::WebPageProxy::DidCreateSubframe(frame->frameID())); > > auto coreFrame = Frame::create(page->corePage(), ownerElement, frame->m_frameLoaderClient.get()); > frame->m_coreFrame = coreFrame.ptr(); >diff --git a/Source/WebKit/WebProcess/WebPage/WebInspector.cpp b/Source/WebKit/WebProcess/WebPage/WebInspector.cpp >index d77e6370c11..bdb92f74da5 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebInspector.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebInspector.cpp >@@ -72,7 +72,7 @@ WebInspector::~WebInspector() > > void WebInspector::openLocalInspectorFrontend(bool underTest) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::OpenLocalInspectorFrontend(canAttachWindow(), underTest), m_page->pageID()); >+ m_page->send(Messages::WebInspectorProxy::OpenLocalInspectorFrontend(canAttachWindow(), underTest)); > } > > void WebInspector::setFrontendConnection(IPC::Attachment encodedConnectionIdentifier) >@@ -108,7 +108,7 @@ void WebInspector::setFrontendConnection(IPC::Attachment encodedConnectionIdenti > > void WebInspector::closeFrontendConnection() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_page->pageID()); >+ m_page->send(Messages::WebInspectorProxy::DidClose()); > > // If we tried to close the frontend before it was created, then no connection exists yet. > if (m_frontendConnection) { >@@ -124,7 +124,7 @@ void WebInspector::closeFrontendConnection() > > void WebInspector::bringToFront() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::BringToFront(), m_page->pageID()); >+ m_page->send(Messages::WebInspectorProxy::BringToFront()); > } > > void WebInspector::whenFrontendConnectionEstablished(Function<void()>&& callback) >@@ -281,7 +281,7 @@ void WebInspector::stopElementSelection() > > void WebInspector::elementSelectionChanged(bool active) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::ElementSelectionChanged(active), m_page->pageID()); >+ m_page->send(Messages::WebInspectorProxy::ElementSelectionChanged(active)); > } > > bool WebInspector::canAttachWindow() >@@ -315,7 +315,7 @@ void WebInspector::updateDockingAvailability() > > m_previousCanAttach = canAttachWindow; > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::AttachAvailabilityChanged(canAttachWindow), m_page->pageID()); >+ m_page->send(Messages::WebInspectorProxy::AttachAvailabilityChanged(canAttachWindow)); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp >index c9652e94af8..27556d01cab 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp >@@ -58,7 +58,7 @@ WebInspectorUI::WebInspectorUI(WebPage& page) > #endif > } > >-void WebInspectorUI::establishConnection(uint64_t inspectedPageIdentifier, bool underTest, unsigned inspectionLevel) >+void WebInspectorUI::establishConnection(PageIdentifier inspectedPageIdentifier, bool underTest, unsigned inspectionLevel) > { > m_inspectedPageIdentifier = inspectedPageIdentifier; > m_frontendAPIDispatcher.reset(); >@@ -106,7 +106,7 @@ void WebInspectorUI::updateConnection() > m_backendConnection->open(); > #endif > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetFrontendConnection(connectionClientPort), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetFrontendConnection(connectionClientPort), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::windowObjectCleared() >@@ -128,14 +128,14 @@ void WebInspectorUI::frontendLoaded() > setDockSide(m_dockSide); > setIsVisible(m_isVisible); > >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::FrontendLoaded(), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::FrontendLoaded(), m_inspectedPageIdentifier.toUInt64()); > > bringToFront(); > } > > void WebInspectorUI::startWindowDrag() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::StartWindowDrag(), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::StartWindowDrag(), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::moveWindowBy(float x, float y) >@@ -147,12 +147,12 @@ void WebInspectorUI::moveWindowBy(float x, float y) > > void WebInspectorUI::bringToFront() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::BringToFront(), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::BringToFront(), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::closeWindow() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_inspectedPageIdentifier.toUInt64()); > > if (m_backendConnection) { > m_backendConnection->invalidate(); >@@ -167,13 +167,13 @@ void WebInspectorUI::closeWindow() > if (m_frontendHost) > m_frontendHost->disconnectClient(); > >- m_inspectedPageIdentifier = 0; >+ m_inspectedPageIdentifier = { }; > m_underTest = false; > } > > void WebInspectorUI::reopen() > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::Reopen(), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::Reopen(), m_inspectedPageIdentifier.toUInt64()); > } > > WebCore::UserInterfaceLayoutDirection WebInspectorUI::userInterfaceLayoutDirection() const >@@ -186,16 +186,16 @@ void WebInspectorUI::requestSetDockSide(DockSide side) > auto& webProcess = WebProcess::singleton(); > switch (side) { > case DockSide::Undocked: >- webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::Detach(), m_inspectedPageIdentifier); >+ webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::Detach(), m_inspectedPageIdentifier.toUInt64()); > break; > case DockSide::Right: >- webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::AttachRight(), m_inspectedPageIdentifier); >+ webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::AttachRight(), m_inspectedPageIdentifier.toUInt64()); > break; > case DockSide::Left: >- webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::AttachLeft(), m_inspectedPageIdentifier); >+ webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::AttachLeft(), m_inspectedPageIdentifier.toUInt64()); > break; > case DockSide::Bottom: >- webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::AttachBottom(), m_inspectedPageIdentifier); >+ webProcess.parentProcessConnection()->send(Messages::WebInspectorProxy::AttachBottom(), m_inspectedPageIdentifier.toUInt64()); > break; > } > } >@@ -243,17 +243,17 @@ void WebInspectorUI::setIsVisible(bool visible) > > void WebInspectorUI::changeAttachedWindowHeight(unsigned height) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetAttachedWindowHeight(height), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetAttachedWindowHeight(height), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::changeAttachedWindowWidth(unsigned width) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetAttachedWindowWidth(width), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetAttachedWindowWidth(width), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::changeSheetRect(const FloatRect& rect) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetSheetRect(rect), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SetSheetRect(rect), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::openInNewTab(const String& url) >@@ -264,22 +264,22 @@ void WebInspectorUI::openInNewTab(const String& url) > > void WebInspectorUI::save(const WTF::String& filename, const WTF::String& content, bool base64Encoded, bool forceSaveAs) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::Save(filename, content, base64Encoded, forceSaveAs), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::Save(filename, content, base64Encoded, forceSaveAs), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::append(const WTF::String& filename, const WTF::String& content) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::Append(filename, content), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::Append(filename, content), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::inspectedURLChanged(const String& urlString) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::InspectedURLChanged(urlString), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::InspectedURLChanged(urlString), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::showCertificate(const CertificateInfo& certificateInfo) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::ShowCertificate(certificateInfo), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::ShowCertificate(certificateInfo), m_inspectedPageIdentifier.toUInt64()); > } > > void WebInspectorUI::showConsole() >@@ -349,7 +349,7 @@ void WebInspectorUI::pageUnpaused() > > void WebInspectorUI::sendMessageToBackend(const String& message) > { >- WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToBackend(message), m_inspectedPageIdentifier); >+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToBackend(message), m_inspectedPageIdentifier.toUInt64()); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.h b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.h >index 8381bf1cede..9424bfe1f26 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.h >+++ b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.h >@@ -29,6 +29,7 @@ > #include "WebInspectorFrontendAPIDispatcher.h" > #include <WebCore/InspectorFrontendClient.h> > #include <WebCore/InspectorFrontendHost.h> >+#include <WebCore/PageIdentifier.h> > > namespace WebCore { > class InspectorController; >@@ -52,7 +53,7 @@ public: > void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference, IPC::StringReference) override { closeWindow(); } > > // Called by WebInspectorUI messages >- void establishConnection(uint64_t inspectedPageIdentifier, bool underTest, unsigned inspectionLevel); >+ void establishConnection(WebCore::PageIdentifier inspectedPageIdentifier, bool underTest, unsigned inspectionLevel); > void updateConnection(); > > void showConsole(); >@@ -133,7 +134,7 @@ private: > // corePage(), since we may need it after the frontend's page has started destruction. > WebCore::InspectorController* m_frontendController { nullptr }; > >- uint64_t m_inspectedPageIdentifier { 0 }; >+ WebCore::PageIdentifier m_inspectedPageIdentifier; > bool m_underTest { false }; > bool m_dockingUnavailable { false }; > bool m_isVisible { false }; >diff --git a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in >index dea0fe584d4..43190aa834d 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/WebInspectorUI.messages.in >@@ -21,7 +21,7 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > messages -> WebInspectorUI { >- EstablishConnection(uint64_t inspectedPageIdentifier, bool underTest, unsigned inspectionLevel) >+ EstablishConnection(WebCore::PageIdentifier inspectedPageIdentifier, bool underTest, unsigned inspectionLevel) > UpdateConnection() > > AttachedBottom() >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 3baafd1854c..73ae20b3019 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -360,7 +360,7 @@ private: > > DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webPageCounter, ("WebPage")); > >-Ref<WebPage> WebPage::create(uint64_t pageID, WebPageCreationParameters&& parameters) >+Ref<WebPage> WebPage::create(Identifier pageID, WebPageCreationParameters&& parameters) > { > Ref<WebPage> page = adoptRef(*new WebPage(pageID, WTFMove(parameters))); > >@@ -370,7 +370,7 @@ Ref<WebPage> WebPage::create(uint64_t pageID, WebPageCreationParameters&& parame > return page; > } > >-WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters) >+WebPage::WebPage(Identifier pageID, WebPageCreationParameters&& parameters) > : m_pageID(pageID) > , m_viewSize(parameters.viewSize) > , m_alwaysShowsHorizontalScroller { parameters.alwaysShowsHorizontalScroller } >@@ -831,7 +831,7 @@ IPC::Connection* WebPage::messageSenderConnection() const > > uint64_t WebPage::messageSenderDestinationID() const > { >- return pageID(); >+ return pageID().toUInt64(); > } > > #if ENABLE(CONTEXT_MENUS) >@@ -1648,7 +1648,7 @@ void WebPage::goToBackForwardItem(uint64_t navigationID, const BackForwardItemId > if (!item) > return; > >- LOG(Loading, "In WebProcess pid %i, WebPage %" PRIu64 " is navigating to back/forward URL %s", getCurrentProcessID(), m_pageID, item->url().string().utf8().data()); >+ LOG(Loading, "In WebProcess pid %i, WebPage %" PRIu64 " is navigating to back/forward URL %s", getCurrentProcessID(), m_pageID.toUInt64(), item->url().string().utf8().data()); > > ASSERT(!m_pendingNavigationID); > m_pendingNavigationID = navigationID; >@@ -2076,7 +2076,7 @@ bool WebPage::setFixedLayoutSize(const IntSize& size) > if (!view || view->fixedLayoutSize() == size) > return false; > >- LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID << " setFixedLayoutSize " << size); >+ LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID.toUInt64() << " setFixedLayoutSize " << size); > view->setFixedLayoutSize(size); > > send(Messages::WebPageProxy::FixedLayoutSizeDidChange(size)); >@@ -2504,7 +2504,7 @@ const WebEvent* WebPage::currentEvent() > void WebPage::freezeLayerTree(LayerTreeFreezeReason reason) > { > RELEASE_LOG(ProcessSuspension, "%p - WebPage (PageID=%llu) - Adding a reason %d to freeze layer tree; current reasons are %d", >- this, m_pageID, static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw()); >+ this, m_pageID.toUInt64(), static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw()); > m_layerTreeFreezeReasons.add(reason); > updateDrawingAreaLayerTreeFreezeState(); > } >@@ -2512,7 +2512,7 @@ void WebPage::freezeLayerTree(LayerTreeFreezeReason reason) > void WebPage::unfreezeLayerTree(LayerTreeFreezeReason reason) > { > RELEASE_LOG(ProcessSuspension, "%p - WebPage (PageID=%llu) - Removing a reason %d to freeze layer tree; current reasons are %d", >- this, m_pageID, static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw()); >+ this, m_pageID.toUInt64(), static_cast<unsigned>(reason), m_layerTreeFreezeReasons.toRaw()); > m_layerTreeFreezeReasons.remove(reason); > updateDrawingAreaLayerTreeFreezeState(); > } >@@ -3168,7 +3168,7 @@ void WebPage::visibilityDidChange() > > void WebPage::setActivityState(OptionSet<ActivityState::Flag> activityState, ActivityStateChangeID activityStateChangeID, const Vector<CallbackID>& callbackIDs) > { >- LOG_WITH_STREAM(ActivityState, stream << "WebPage " << pageID() << " setActivityState to " << activityState); >+ LOG_WITH_STREAM(ActivityState, stream << "WebPage " << pageID().toUInt64() << " setActivityState to " << activityState); > > auto changed = m_activityState ^ activityState; > m_activityState = activityState; >@@ -3176,7 +3176,7 @@ void WebPage::setActivityState(OptionSet<ActivityState::Flag> activityState, Act > if (changed) > updateThrottleState(); > >- ASSERT_WITH_MESSAGE(m_page, "setActivityState called on %" PRIu64 " but WebCore page was null", pageID()); >+ ASSERT_WITH_MESSAGE(m_page, "setActivityState called on %" PRIu64 " but WebCore page was null", pageID().toUInt64()); > if (m_page) { > SetForScope<OptionSet<ActivityState::Flag>> currentlyChangingActivityState { m_lastActivityStateChanges, changed }; > m_page->setActivityState(activityState); >@@ -4339,7 +4339,7 @@ void WebPage::mainFrameDidLayout() > #if PLATFORM(IOS_FAMILY) > if (FrameView* frameView = mainFrameView()) { > IntSize newContentSize = frameView->contentsSize(); >- LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID << " mainFrameDidLayout setting content size to " << newContentSize); >+ LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID.toUInt64() << " mainFrameDidLayout setting content size to " << newContentSize); > if (m_viewportConfiguration.setContentsSize(newContentSize)) > viewportConfigurationChanged(); > } >@@ -5742,7 +5742,7 @@ void WebPage::didCommitLoad(WebFrame* frame) > > bool viewportChanged = false; > >- LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID << " didCommitLoad setting content size to " << coreFrame->view()->contentsSize()); >+ LOG_WITH_STREAM(VisibleRects, stream << "WebPage " << m_pageID.toUInt64() << " didCommitLoad setting content size to " << coreFrame->view()->contentsSize()); > if (m_viewportConfiguration.setContentsSize(coreFrame->view()->contentsSize())) > viewportChanged = true; > >@@ -6056,7 +6056,7 @@ void WebPage::sendEditorStateUpdate() > // If that is the case, just send what we have (i.e. don't include post-layout data) and wait until the > // next layer tree commit to compute and send the complete EditorState over. > auto state = editorState(); >- send(Messages::WebPageProxy::EditorStateChanged(state), pageID()); >+ send(Messages::WebPageProxy::EditorStateChanged(state), pageID().toUInt64()); > > if (state.isMissingPostLayoutData) > scheduleFullEditorStateUpdate(); >@@ -6237,7 +6237,7 @@ void WebPage::postMessage(const String& messageName, API::Object* messageBody) > > void WebPage::postMessageIgnoringFullySynchronousMode(const String& messageName, API::Object* messageBody) > { >- send(Messages::WebPageProxy::HandleMessage(messageName, UserData(WebProcess::singleton().transformObjectsToHandles(messageBody))), pageID(), IPC::SendOption::IgnoreFullySynchronousMode); >+ send(Messages::WebPageProxy::HandleMessage(messageName, UserData(WebProcess::singleton().transformObjectsToHandles(messageBody))), pageID().toUInt64(), IPC::SendOption::IgnoreFullySynchronousMode); > } > > void WebPage::postSynchronousMessageForTesting(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index 868ae92f2fb..ead7b496eff 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -64,6 +64,7 @@ > #include <WebCore/IntRect.h> > #include <WebCore/IntSizeHash.h> > #include <WebCore/Page.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/PageOverlay.h> > #include <WebCore/PluginData.h> > #include <WebCore/PointerID.h> >@@ -273,7 +274,9 @@ using WKEventModifiers = uint32_t; > > class WebPage : public API::ObjectImpl<API::Object::Type::BundlePage>, public IPC::MessageReceiver, public IPC::MessageSender, public CanMakeWeakPtr<WebPage> { > public: >- static Ref<WebPage> create(uint64_t pageID, WebPageCreationParameters&&); >+ using Identifier = WebCore::PageIdentifier; >+ static Ref<WebPage> create(Identifier, WebPageCreationParameters&&); >+ > virtual ~WebPage(); > > void reinitializeWebPage(WebPageCreationParameters&&); >@@ -283,7 +286,7 @@ public: > static WebPage* fromCorePage(WebCore::Page*); > > WebCore::Page* corePage() const { return m_page.get(); } >- uint64_t pageID() const { return m_pageID; } >+ Identifier pageID() const { return m_pageID; } > PAL::SessionID sessionID() const { return m_page->sessionID(); } > bool usesEphemeralSession() const { return m_page->usesEphemeralSession(); } > >@@ -1166,7 +1169,7 @@ public: > bool sendSyncWithDelayedReply(T&& message, typename T::Reply&& reply) > { > cancelGesturesBlockedOnSynchronousReplies(); >- return sendSync(WTFMove(message), WTFMove(reply), m_pageID, Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend); >+ return sendSync(WTFMove(message), WTFMove(reply), m_pageID.toUInt64(), Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend); > } > > WebCore::DOMPasteAccessResponse requestDOMPasteAccess(const String& originIdentifier); >@@ -1199,7 +1202,7 @@ public: > void setUserIsInteracting(bool userIsInteracting) { m_userIsInteracting = userIsInteracting; } > > private: >- WebPage(uint64_t pageID, WebPageCreationParameters&&); >+ WebPage(Identifier, WebPageCreationParameters&&); > > void updateThrottleState(); > >@@ -1585,7 +1588,7 @@ private: > > void updateMockAccessibilityElementAfterCommittingLoad(); > >- uint64_t m_pageID; >+ Identifier m_pageID; > > std::unique_ptr<WebCore::Page> m_page; > RefPtr<WebFrame> m_mainFrame; >diff --git a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp >index d96a7d7dda9..b7799b4fbb8 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp >@@ -41,7 +41,7 @@ WebPageInspectorTarget::WebPageInspectorTarget(WebPage& page) > > String WebPageInspectorTarget::identifier() const > { >- return makeString("page-", m_page.pageID()); >+ return makeString("page-", m_page.pageID().toUInt64()); > } > > void WebPageInspectorTarget::connect(Inspector::FrontendChannel& channel) >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h >index 301b139e1d2..6b7ec5b16f2 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h >+++ b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h >@@ -26,13 +26,15 @@ > #ifndef WKAccessibilityWebPageObjectBase_h > #define WKAccessibilityWebPageObjectBase_h > >+#include <WebCore/PageIdentifier.h> >+ > namespace WebKit { > class WebPage; > } > > @interface WKAccessibilityWebPageObjectBase : NSObject { > WebKit::WebPage* m_page; >- uint64_t m_pageID; >+ WebCore::PageIdentifier m_pageID; > id m_parent; > bool m_hasMainFramePlugin; > } >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm >index 3d3f35553e6..6165a01fe60 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm >@@ -148,7 +148,7 @@ - (void)setWebPage:(WebKit::WebPage*)page > auto* frame = page->mainFrame(); > m_hasMainFramePlugin = frame && frame->document() ? frame->document()->isPluginDocument() : false; > } else { >- m_pageID = 0; >+ m_pageID = { }; > m_hasMainFramePlugin = false; > } > } >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >index a07ca45d337..b6ae84327af 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm >@@ -266,8 +266,8 @@ bool WebPage::executeKeypressCommandsInternal(const Vector<WebCore::KeypressComm > } > } else { > bool commandWasHandledByUIProcess = false; >- WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::ExecuteSavedCommandBySelector(commands[i].commandName), >- Messages::WebPageProxy::ExecuteSavedCommandBySelector::Reply(commandWasHandledByUIProcess), m_pageID); >+ sendSync(Messages::WebPageProxy::ExecuteSavedCommandBySelector(commands[i].commandName), >+ Messages::WebPageProxy::ExecuteSavedCommandBySelector::Reply(commandWasHandledByUIProcess)); > eventWasHandled |= commandWasHandledByUIProcess; > } > } >diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp >index 5ce69ccf833..6174b0a3bb0 100644 >--- a/Source/WebKit/WebProcess/WebProcess.cpp >+++ b/Source/WebKit/WebProcess/WebProcess.cpp >@@ -221,7 +221,7 @@ WebProcess::WebProcess() > ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::ResourceLoadStatisticsUpdated(WTFMove(statistics)), 0); > }); > >- ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, uint64_t openerPageID, const RegistrableDomain& openerDomain) { >+ ResourceLoadObserver::shared().setRequestStorageAccessUnderOpenerCallback([this] (PAL::SessionID sessionID, const RegistrableDomain& domainInNeedOfStorageAccess, PageIdentifier openerPageID, const RegistrableDomain& openerDomain) { > ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RequestStorageAccessUnderOpener(sessionID, domainInNeedOfStorageAccess, openerPageID, openerDomain), 0); > }); > #endif >@@ -667,16 +667,16 @@ WebPage* WebProcess::focusedWebPage() const > return 0; > } > >-WebPage* WebProcess::webPage(uint64_t pageID) const >+WebPage* WebProcess::webPage(PageIdentifier pageID) const > { > return m_pageMap.get(pageID); > } > >-void WebProcess::createWebPage(uint64_t pageID, WebPageCreationParameters&& parameters) >+void WebProcess::createWebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) > { > // 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. >- HashMap<uint64_t, RefPtr<WebPage>>::AddResult result = m_pageMap.add(pageID, nullptr); >+ auto result = m_pageMap.add(pageID, nullptr); > auto oldPageID = parameters.oldPageID ? parameters.oldPageID.value() : pageID; > if (result.isNewEntry) { > ASSERT(!result.iterator->value); >@@ -693,7 +693,7 @@ void WebProcess::createWebPage(uint64_t pageID, WebPageCreationParameters&& para > ASSERT(result.iterator->value); > } > >-void WebProcess::removeWebPage(PAL::SessionID sessionID, uint64_t pageID) >+void WebProcess::removeWebPage(PAL::SessionID sessionID, PageIdentifier pageID) > { > ASSERT(m_pageMap.contains(pageID)); > >@@ -1450,7 +1450,7 @@ void WebProcess::updateCPUMonitorState(CPUMonitorUpdateReason) > > #endif > >-void WebProcess::pageActivityStateDidChange(uint64_t, OptionSet<WebCore::ActivityState::Flag> changed) >+void WebProcess::pageActivityStateDidChange(PageIdentifier, OptionSet<WebCore::ActivityState::Flag> changed) > { > if (changed & WebCore::ActivityState::IsVisible) > updateCPUMonitorState(CPUMonitorUpdateReason::VisibilityHasChanged); >@@ -1624,13 +1624,13 @@ void WebProcess::sendPrewarmInformation(const URL& url) > parentProcessConnection()->send(Messages::WebProcessProxy::DidCollectPrewarmInformation(registrableDomain, WebCore::ProcessWarming::collectPrewarmInformation()), 0); > } > >-void WebProcess::pageDidEnterWindow(uint64_t pageID) >+void WebProcess::pageDidEnterWindow(PageIdentifier pageID) > { > m_pagesInWindows.add(pageID); > m_nonVisibleProcessCleanupTimer.stop(); > } > >-void WebProcess::pageWillLeaveWindow(uint64_t pageID) >+void WebProcess::pageWillLeaveWindow(PageIdentifier pageID) > { > m_pagesInWindows.remove(pageID); > >@@ -1673,7 +1673,7 @@ void WebProcess::enablePrivateBrowsingForTesting(bool enable) > if (enable) > ensureLegacyPrivateBrowsingSessionInNetworkProcess(); > >- Vector<uint64_t> pageIDs; >+ Vector<PageIdentifier> pageIDs; > for (auto& page : m_pageMap) { > if (page.value) > pageIDs.append(page.key); >@@ -1853,7 +1853,7 @@ LibWebRTCNetwork& WebProcess::libWebRTCNetwork() > } > > #if ENABLE(SERVICE_WORKER) >-void WebProcess::establishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, uint64_t pageID, const WebPreferencesStore& store, PAL::SessionID initialSessionID) >+void WebProcess::establishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, PageIdentifier pageID, const WebPreferencesStore& store, PAL::SessionID initialSessionID) > { > // 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 >diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h >index 525df183f22..1857cea0ed9 100644 >--- a/Source/WebKit/WebProcess/WebProcess.h >+++ b/Source/WebKit/WebProcess/WebProcess.h >@@ -39,6 +39,7 @@ > #include "WebProcessCreationParameters.h" > #include "WebSQLiteDatabaseTracker.h" > #include <WebCore/ActivityState.h> >+#include <WebCore/PageIdentifier.h> > #include <WebCore/RegistrableDomain.h> > #if PLATFORM(MAC) > #include <WebCore/ScreenProperties.h> >@@ -145,9 +146,9 @@ public: > > WebConnectionToUIProcess* webConnectionToUIProcess() const { return m_webConnection.get(); } > >- WebPage* webPage(uint64_t pageID) const; >- void createWebPage(uint64_t pageID, WebPageCreationParameters&&); >- void removeWebPage(PAL::SessionID, uint64_t pageID); >+ WebPage* webPage(WebCore::PageIdentifier) const; >+ void createWebPage(WebCore::PageIdentifier, WebPageCreationParameters&&); >+ void removeWebPage(PAL::SessionID, WebCore::PageIdentifier); > WebPage* focusedWebPage() const; > > InjectedBundle* injectedBundle() const { return m_injectedBundle.get(); } >@@ -199,8 +200,8 @@ public: > > void ensureLegacyPrivateBrowsingSessionInNetworkProcess(); > >- void pageDidEnterWindow(uint64_t pageID); >- void pageWillLeaveWindow(uint64_t pageID); >+ void pageDidEnterWindow(WebCore::PageIdentifier); >+ void pageWillLeaveWindow(WebCore::PageIdentifier); > > void nonVisibleProcessCleanupTimerFired(); > >@@ -219,7 +220,7 @@ public: > > void updateActivePages(); > void getActivePagesOriginsForTesting(CompletionHandler<void(Vector<String>&&)>&&); >- void pageActivityStateDidChange(uint64_t pageID, OptionSet<WebCore::ActivityState::Flag> changed); >+ void pageActivityStateDidChange(WebCore::PageIdentifier, OptionSet<WebCore::ActivityState::Flag> changed); > > void setHiddenPageDOMTimerThrottlingIncreaseLimit(int milliseconds); > >@@ -359,7 +360,7 @@ private: > #endif > > #if ENABLE(SERVICE_WORKER) >- void establishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, uint64_t pageID, const WebPreferencesStore&, PAL::SessionID); >+ void establishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, WebCore::PageIdentifier, const WebPreferencesStore&, PAL::SessionID); > void registerServiceWorkerClients(); > #endif > >@@ -460,7 +461,7 @@ private: > > RefPtr<WebConnectionToUIProcess> m_webConnection; > >- HashMap<uint64_t, RefPtr<WebPage>> m_pageMap; >+ HashMap<WebCore::PageIdentifier, RefPtr<WebPage>> m_pageMap; > HashMap<uint64_t, RefPtr<WebPageGroupProxy>> m_pageGroupMap; > RefPtr<InjectedBundle> m_injectedBundle; > >@@ -514,7 +515,7 @@ private: > > bool m_processIsSuspended { false }; > >- HashSet<uint64_t> m_pagesInWindows; >+ HashSet<WebCore::PageIdentifier> m_pagesInWindows; > WebCore::Timer m_nonVisibleProcessCleanupTimer; > > RefPtr<WebCore::ApplicationCacheStorage> m_applicationCacheStorage; >diff --git a/Source/WebKit/WebProcess/WebProcess.messages.in b/Source/WebKit/WebProcess/WebProcess.messages.in >index b39b38c183c..57a2656345f 100644 >--- a/Source/WebKit/WebProcess/WebProcess.messages.in >+++ b/Source/WebKit/WebProcess/WebProcess.messages.in >@@ -25,7 +25,7 @@ messages -> WebProcess LegacyReceiver { > SetWebsiteDataStoreParameters(struct WebKit::WebProcessDataStoreParameters parameters) > > # Create a new page. >- CreateWebPage(uint64_t newPageID, struct WebKit::WebPageCreationParameters pageCreationParameters) >+ CreateWebPage(WebCore::PageIdentifier newPageID, struct WebKit::WebPageCreationParameters pageCreationParameters) > > PrewarmGlobally(); > PrewarmWithDomainInformation(struct WebCore::PrewarmInformation prewarmInformation) >@@ -111,7 +111,7 @@ messages -> WebProcess LegacyReceiver { > #endif > > #if ENABLE(SERVICE_WORKER) >- EstablishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, uint64_t pageID, struct WebKit::WebPreferencesStore store, PAL::SessionID initialSessionID) >+ EstablishWorkerContextConnectionToNetworkProcess(uint64_t pageGroupID, WebCore::PageIdentifier pageID, struct WebKit::WebPreferencesStore store, PAL::SessionID initialSessionID) > RegisterServiceWorkerClients() > #endif > >diff --git a/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp b/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp >index 0bd90af9187..0e94296049e 100644 >--- a/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp >+++ b/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.cpp >@@ -311,7 +311,7 @@ void StorageAreaMap::dispatchSessionStorageEvent(uint64_t sourceStorageAreaID, c > > // Namespace IDs for session storage namespaces are equivalent to web page IDs > // so we can get the right page here. >- WebPage* webPage = WebProcess::singleton().webPage(m_storageNamespaceID); >+ WebPage* webPage = WebProcess::singleton().webPage(makeObjectIdentifier<PageIdentifierType>(m_storageNamespaceID)); > if (!webPage) > return; > >diff --git a/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h b/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h >index 29ba7d8a8a3..ecaf66519d6 100644 >--- a/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h >+++ b/Source/WebKit/WebProcess/WebStorage/StorageAreaMap.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "MessageReceiver.h" >+#include <WebCore/PageIdentifier.h> > #include <WebCore/SecurityOrigin.h> > #include <WebCore/StorageArea.h> > #include <wtf/Forward.h> >diff --git a/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp b/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp >index b39081e6e3c..8096234244f 100644 >--- a/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp >+++ b/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.cpp >@@ -40,12 +40,12 @@ > namespace WebKit { > using namespace WebCore; > >-Ref<StorageNamespaceImpl> StorageNamespaceImpl::createSessionStorageNamespace(uint64_t identifier, unsigned quotaInBytes) >+Ref<StorageNamespaceImpl> StorageNamespaceImpl::createSessionStorageNamespace(PageIdentifier identifier, unsigned quotaInBytes) > { >- return adoptRef(*new StorageNamespaceImpl(StorageType::Session, identifier, nullptr, quotaInBytes)); >+ return adoptRef(*new StorageNamespaceImpl(StorageType::Session, identifier.toUInt64(), nullptr, quotaInBytes)); > } > >-Ref<StorageNamespaceImpl> StorageNamespaceImpl::createEphemeralLocalStorageNamespace(uint64_t identifier, unsigned quotaInBytes) >+Ref<StorageNamespaceImpl> StorageNamespaceImpl::createEphemeralLocalStorageNamespace(PageIdentifier identifier, unsigned quotaInBytes) > { > return createSessionStorageNamespace(identifier, quotaInBytes); > } >diff --git a/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h b/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h >index 6757e3b8188..1bfec48b89d 100644 >--- a/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h >+++ b/Source/WebKit/WebProcess/WebStorage/StorageNamespaceImpl.h >@@ -39,8 +39,8 @@ class WebPage; > > class StorageNamespaceImpl : public WebCore::StorageNamespace { > public: >- static Ref<StorageNamespaceImpl> createSessionStorageNamespace(uint64_t identifier, unsigned quotaInBytes); >- static Ref<StorageNamespaceImpl> createEphemeralLocalStorageNamespace(uint64_t identifier, unsigned quotaInBytes); >+ static Ref<StorageNamespaceImpl> createSessionStorageNamespace(WebCore::PageIdentifier, unsigned quotaInBytes); >+ static Ref<StorageNamespaceImpl> createEphemeralLocalStorageNamespace(WebCore::PageIdentifier, unsigned quotaInBytes); > static Ref<StorageNamespaceImpl> createLocalStorageNamespace(uint64_t identifier, unsigned quotaInBytes); > static Ref<StorageNamespaceImpl> createTransientLocalStorageNamespace(uint64_t identifier, WebCore::SecurityOrigin& topLevelOrigin, uint64_t quotaInBytes); > >diff --git a/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm b/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm >index fc659863252..765eff404b0 100644 >--- a/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm >+++ b/Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm >@@ -279,7 +279,7 @@ void PlaybackSessionManager::setUpPlaybackControlsManager(WebCore::HTMLMediaElem > addClientForContext(m_controlsManagerContextId); > > m_page->videoControlsManagerDidChange(); >- m_page->send(Messages::PlaybackSessionManagerProxy::SetUpPlaybackControlsManagerWithID(m_controlsManagerContextId), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::SetUpPlaybackControlsManagerWithID(m_controlsManagerContextId)); > } > > void PlaybackSessionManager::clearPlaybackControlsManager() >@@ -291,7 +291,7 @@ void PlaybackSessionManager::clearPlaybackControlsManager() > m_controlsManagerContextId = 0; > > m_page->videoControlsManagerDidChange(); >- m_page->send(Messages::PlaybackSessionManagerProxy::ClearPlaybackControlsManager(), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::ClearPlaybackControlsManager()); > } > > uint64_t PlaybackSessionManager::contextIdForMediaElement(WebCore::HTMLMediaElement& mediaElement) >@@ -318,27 +318,27 @@ WebCore::HTMLMediaElement* PlaybackSessionManager::currentPlaybackControlsElemen > > void PlaybackSessionManager::durationChanged(uint64_t contextId, double duration) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::DurationChanged(contextId, duration), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::DurationChanged(contextId, duration)); > } > > void PlaybackSessionManager::currentTimeChanged(uint64_t contextId, double currentTime, double anchorTime) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::CurrentTimeChanged(contextId, currentTime, anchorTime), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::CurrentTimeChanged(contextId, currentTime, anchorTime)); > } > > void PlaybackSessionManager::bufferedTimeChanged(uint64_t contextId, double bufferedTime) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::BufferedTimeChanged(contextId, bufferedTime), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::BufferedTimeChanged(contextId, bufferedTime)); > } > > void PlaybackSessionManager::playbackStartedTimeChanged(uint64_t contextId, double playbackStartedTime) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::PlaybackStartedTimeChanged(contextId, playbackStartedTime), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::PlaybackStartedTimeChanged(contextId, playbackStartedTime)); > } > > void PlaybackSessionManager::rateChanged(uint64_t contextId, bool isPlaying, float playbackRate) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::RateChanged(contextId, isPlaying, playbackRate), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::RateChanged(contextId, isPlaying, playbackRate)); > } > > void PlaybackSessionManager::seekableRangesChanged(uint64_t contextId, const WebCore::TimeRanges& timeRanges, double lastModifiedTime, double liveUpdateInterval) >@@ -349,37 +349,37 @@ void PlaybackSessionManager::seekableRangesChanged(uint64_t contextId, const Web > double end = timeRanges.ranges().end(i).toDouble(); > rangesVector.append({ start, end }); > } >- m_page->send(Messages::PlaybackSessionManagerProxy::SeekableRangesVectorChanged(contextId, WTFMove(rangesVector), lastModifiedTime, liveUpdateInterval), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::SeekableRangesVectorChanged(contextId, WTFMove(rangesVector), lastModifiedTime, liveUpdateInterval)); > } > > void PlaybackSessionManager::canPlayFastReverseChanged(uint64_t contextId, bool value) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::CanPlayFastReverseChanged(contextId, value), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::CanPlayFastReverseChanged(contextId, value)); > } > > void PlaybackSessionManager::audioMediaSelectionOptionsChanged(uint64_t contextId, const Vector<MediaSelectionOption>& options, uint64_t selectedIndex) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::AudioMediaSelectionOptionsChanged(contextId, options, selectedIndex), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::AudioMediaSelectionOptionsChanged(contextId, options, selectedIndex)); > } > > void PlaybackSessionManager::legibleMediaSelectionOptionsChanged(uint64_t contextId, const Vector<MediaSelectionOption>& options, uint64_t selectedIndex) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::LegibleMediaSelectionOptionsChanged(contextId, options, selectedIndex), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::LegibleMediaSelectionOptionsChanged(contextId, options, selectedIndex)); > } > > void PlaybackSessionManager::externalPlaybackChanged(uint64_t contextId, bool enabled, PlaybackSessionModel::ExternalPlaybackTargetType targetType, String localizedDeviceName) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::ExternalPlaybackPropertiesChanged(contextId, enabled, static_cast<uint32_t>(targetType), localizedDeviceName), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::ExternalPlaybackPropertiesChanged(contextId, enabled, static_cast<uint32_t>(targetType), localizedDeviceName)); > } > > void PlaybackSessionManager::audioMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::AudioMediaSelectionIndexChanged(contextId, selectedIndex), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::AudioMediaSelectionIndexChanged(contextId, selectedIndex)); > } > > void PlaybackSessionManager::legibleMediaSelectionIndexChanged(uint64_t contextId, uint64_t selectedIndex) > { >- m_page->send(Messages::PlaybackSessionManagerProxy::LegibleMediaSelectionIndexChanged(contextId, selectedIndex), m_page->pageID()); >+ m_page->send(Messages::PlaybackSessionManagerProxy::LegibleMediaSelectionIndexChanged(contextId, selectedIndex)); > } > > void PlaybackSessionManager::wirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool disabled) >diff --git a/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm b/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm >index 5d6110b7909..70663977379 100644 >--- a/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm >+++ b/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm >@@ -290,7 +290,7 @@ void VideoFullscreenManager::enterVideoFullscreenForVideoElement(HTMLVideoElemen > interface->layerHostingContext()->setRootLayer(videoLayer); > } > >- m_page->send(Messages::VideoFullscreenManagerProxy::SetupFullscreenWithID(contextId, interface->layerHostingContext()->contextID(), videoRect, m_page->deviceScaleFactor(), interface->fullscreenMode(), allowsPictureInPicture, standby), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::SetupFullscreenWithID(contextId, interface->layerHostingContext()->contextID(), videoRect, m_page->deviceScaleFactor(), interface->fullscreenMode(), allowsPictureInPicture, standby)); > } > > void VideoFullscreenManager::exitVideoFullscreenForVideoElement(WebCore::HTMLVideoElement& videoElement) >@@ -308,7 +308,7 @@ void VideoFullscreenManager::exitVideoFullscreenForVideoElement(WebCore::HTMLVid > return; > > interface.setIsAnimating(true); >- m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreen(contextId, inlineVideoFrame(videoElement)), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreen(contextId, inlineVideoFrame(videoElement))); > } > > void VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation(WebCore::HTMLVideoElement& videoElement, WebCore::HTMLMediaElementEnums::VideoFullscreenMode targetMode) >@@ -324,7 +324,7 @@ void VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation(WebCore:: > > interface.setTargetIsFullscreen(false); > >- m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreenWithoutAnimationToMode(contextId, targetMode), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::ExitFullscreenWithoutAnimationToMode(contextId, targetMode)); > #else > UNUSED_PARAM(videoElement); > UNUSED_PARAM(targetMode); >@@ -336,13 +336,13 @@ void VideoFullscreenManager::exitVideoFullscreenToModeWithoutAnimation(WebCore:: > void VideoFullscreenManager::hasVideoChanged(uint64_t contextId, bool hasVideo) > { > if (m_page) >- m_page->send(Messages::VideoFullscreenManagerProxy::SetHasVideo(contextId, hasVideo), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::SetHasVideo(contextId, hasVideo)); > } > > void VideoFullscreenManager::videoDimensionsChanged(uint64_t contextId, const FloatSize& videoDimensions) > { > if (m_page) >- m_page->send(Messages::VideoFullscreenManagerProxy::SetVideoDimensions(contextId, videoDimensions), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::SetVideoDimensions(contextId, videoDimensions)); > } > > #pragma mark Messages from VideoFullscreenManagerProxy: >@@ -364,7 +364,7 @@ void VideoFullscreenManager::requestUpdateInlineRect(uint64_t contextId) > > auto& model = ensureModel(contextId); > IntRect inlineRect = inlineVideoFrame(*model.videoElement()); >- m_page->send(Messages::VideoFullscreenManagerProxy::SetInlineRect(contextId, inlineRect, inlineRect != IntRect(0, 0, 0, 0)), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::SetInlineRect(contextId, inlineRect, inlineRect != IntRect(0, 0, 0, 0))); > } > > void VideoFullscreenManager::requestVideoContentLayer(uint64_t contextId) >@@ -378,7 +378,7 @@ void VideoFullscreenManager::requestVideoContentLayer(uint64_t contextId) > model->setVideoFullscreenLayer(videoLayer, [protectedThis = makeRefPtr(this), this, contextId] () mutable { > dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, contextId] { > if (protectedThis->m_page) >- m_page->send(Messages::VideoFullscreenManagerProxy::SetHasVideoContentLayer(contextId, true), protectedThis->m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::SetHasVideoContentLayer(contextId, true)); > }); > }); > } >@@ -394,7 +394,7 @@ void VideoFullscreenManager::returnVideoContentLayer(uint64_t contextId) > model->setVideoFullscreenLayer(nil, [protectedThis = WTFMove(protectedThis), this, contextId] () mutable { > dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, contextId] { > if (protectedThis->m_page) >- m_page->send(Messages::VideoFullscreenManagerProxy::SetHasVideoContentLayer(contextId, false), protectedThis->m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::SetHasVideoContentLayer(contextId, false)); > }); > }); > }); >@@ -413,7 +413,7 @@ void VideoFullscreenManager::didSetupFullscreen(uint64_t contextId) > #if PLATFORM(IOS_FAMILY) > dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, contextId] { > if (protectedThis->m_page) >- m_page->send(Messages::VideoFullscreenManagerProxy::EnterFullscreen(contextId), protectedThis->m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::EnterFullscreen(contextId)); > }); > #else > CALayer* videoLayer = interface->layerHostingContext()->rootLayer(); >@@ -421,7 +421,7 @@ void VideoFullscreenManager::didSetupFullscreen(uint64_t contextId) > model->setVideoFullscreenLayer(videoLayer, [protectedThis = makeRefPtr(this), this, contextId] () mutable { > dispatch_async(dispatch_get_main_queue(), [protectedThis = WTFMove(protectedThis), this, contextId] { > if (protectedThis->m_page) >- m_page->send(Messages::VideoFullscreenManagerProxy::EnterFullscreen(contextId), protectedThis->m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::EnterFullscreen(contextId)); > }); > }); > #endif >@@ -442,7 +442,7 @@ void VideoFullscreenManager::willExitFullscreen(uint64_t contextId) > dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), videoElement = WTFMove(videoElement), contextId] { > videoElement->willExitFullscreen(); > if (protectedThis->m_page) >- protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::PreparedToExitFullscreen(contextId), protectedThis->m_page->pageID()); >+ protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::PreparedToExitFullscreen(contextId)); > }); > } > >@@ -486,7 +486,7 @@ void VideoFullscreenManager::didExitFullscreen(uint64_t contextId) > #if PLATFORM(IOS_FAMILY) > dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), contextId, interface] { > if (protectedThis->m_page) >- protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::CleanupFullscreen(contextId), protectedThis->m_page->pageID()); >+ protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::CleanupFullscreen(contextId)); > }); > #else > model->waitForPreparedForInlineThen([protectedThis = makeRefPtr(this), contextId, interface, model] () mutable { >@@ -498,7 +498,7 @@ void VideoFullscreenManager::didExitFullscreen(uint64_t contextId) > interface->setLayerHostingContext(nullptr); > } > if (protectedThis->m_page) >- protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::CleanupFullscreen(contextId), protectedThis->m_page->pageID()); >+ protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::CleanupFullscreen(contextId)); > }); > }); > }); >@@ -555,7 +555,7 @@ void VideoFullscreenManager::fullscreenMayReturnToInline(uint64_t contextId, boo > > if (!isPageVisible) > model.videoElement()->scrollIntoViewIfNotVisible(false); >- m_page->send(Messages::VideoFullscreenManagerProxy::PreparedToReturnToInline(contextId, true, inlineVideoFrame(*model.videoElement())), m_page->pageID()); >+ m_page->send(Messages::VideoFullscreenManagerProxy::PreparedToReturnToInline(contextId, true, inlineVideoFrame(*model.videoElement()))); > } > > void VideoFullscreenManager::requestRouteSharingPolicyAndContextUID(uint64_t contextId, Messages::VideoFullscreenManager::RequestRouteSharingPolicyAndContextUID::AsyncReply&& reply) >diff --git a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >index 2e190b035f7..b9ce79d274c 100644 >--- a/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >+++ b/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >@@ -539,7 +539,7 @@ static NSURL *origin(WebPage& page) > #endif > > #if PLATFORM(MAC) >-static RetainPtr<NSArray<NSString *>> activePagesOrigins(const HashMap<uint64_t, RefPtr<WebPage>>& pageMap) >+static RetainPtr<NSArray<NSString *>> activePagesOrigins(const HashMap<PageIdentifier, RefPtr<WebPage>>& pageMap) > { > RetainPtr<NSMutableArray<NSString *>> activeOrigins = adoptNS([[NSMutableArray alloc] init]); > >diff --git a/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.cpp b/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.cpp >index 9872c31ba58..796024c8ce4 100644 >--- a/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.cpp >+++ b/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.cpp >@@ -111,7 +111,7 @@ void WebResourceLoadScheduler::loadResourceSynchronously(FrameLoader& frameLoade > ResourceHandle::loadResourceSynchronously(frameLoader.networkingContext(), request, options.credentials == FetchOptions::Credentials::Omit ? StoredCredentialsPolicy::DoNotUse : StoredCredentialsPolicy::Use, error, response, data); > } > >-void WebResourceLoadScheduler::pageLoadCompleted(uint64_t /*webPageID*/) >+void WebResourceLoadScheduler::pageLoadCompleted(PageIdentifier) > { > } > >diff --git a/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.h b/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.h >index 55b36975306..5f62f777aa7 100644 >--- a/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.h >+++ b/Source/WebKitLegacy/WebCoreSupport/WebResourceLoadScheduler.h >@@ -46,7 +46,7 @@ public: > > void loadResource(WebCore::Frame&, WebCore::CachedResource&, WebCore::ResourceRequest&&, const WebCore::ResourceLoaderOptions&, CompletionHandler<void(RefPtr<WebCore::SubresourceLoader>&&)>&&) final; > void loadResourceSynchronously(WebCore::FrameLoader&, unsigned long, const WebCore::ResourceRequest&, WebCore::ClientCredentialPolicy, const WebCore::FetchOptions&, const WebCore::HTTPHeaderMap&, WebCore::ResourceError&, WebCore::ResourceResponse&, Vector<char>&) final; >- void pageLoadCompleted(uint64_t webPageID) final; >+ void pageLoadCompleted(WebCore::PageIdentifier) final; > > void remove(WebCore::ResourceLoader*) final; > void setDefersLoading(WebCore::ResourceLoader&, bool) final; >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h >index 1385583af29..b1403d05639 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h >@@ -63,7 +63,7 @@ private: > void frameLoaderDestroyed() final; > bool hasWebView() const final; // mainly for assertions > >- Optional<uint64_t> pageID() const final; >+ Optional<WebCore::PageIdentifier> pageID() const final; > Optional<uint64_t> frameID() const final; > PAL::SessionID sessionID() const final; > >diff --git a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm >index 7f869f1ddcb..7eba3a98aa3 100644 >--- a/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm >+++ b/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm >@@ -209,7 +209,7 @@ WebFrameLoaderClient::WebFrameLoaderClient(WebFrame *webFrame) > { > } > >-Optional<uint64_t> WebFrameLoaderClient::pageID() const >+Optional<PageIdentifier> WebFrameLoaderClient::pageID() const > { > return WTF::nullopt; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198206
:
370541
|
370554
|
370572
|
370573
|
370576
|
370589
|
370590
|
370592
|
370598
|
370600
|
370604
|
370613
|
370614
|
370618
|
370619
|
370621
|
370696
|
370697
|
370698
|
370701