Diff
Modified: trunk/Source/WebCore/ChangeLog (250042 => 250043)
--- trunk/Source/WebCore/ChangeLog 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebCore/ChangeLog 2019-09-18 17:14:15 UTC (rev 250043)
@@ -1,5 +1,22 @@
2019-09-18 Chris Dumez <[email protected]>
+ Drop FrameLoaderClient::sessionID()
+ https://bugs.webkit.org/show_bug.cgi?id=201916
+
+ Reviewed by Geoffrey Garen.
+
+ Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
+ what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
+ can get the sessionID from the WebProcess singleton.
+
+ * loader/EmptyClients.cpp:
+ * loader/EmptyFrameLoaderClient.h:
+ * loader/FrameLoaderClient.h:
+ * page/Frame.cpp:
+ (WebCore::Frame::sessionID const):
+
+2019-09-18 Chris Dumez <[email protected]>
+
WebSWServerToContextConnection::PostMessageToServiceWorkerClient IPC no longer needs to take a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201883
Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (250042 => 250043)
--- trunk/Source/WebCore/loader/EmptyClients.cpp 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp 2019-09-18 17:14:15 UTC (rev 250043)
@@ -465,11 +465,6 @@
{
}
-PAL::SessionID EmptyFrameLoaderClient::sessionID() const
-{
- return PAL::SessionID::defaultSessionID();
-}
-
void EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, FormState*, const String&, PolicyCheckIdentifier, FramePolicyFunction&&)
{
}
Modified: trunk/Source/WebCore/loader/EmptyFrameLoaderClient.h (250042 => 250043)
--- trunk/Source/WebCore/loader/EmptyFrameLoaderClient.h 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebCore/loader/EmptyFrameLoaderClient.h 2019-09-18 17:14:15 UTC (rev 250043)
@@ -42,7 +42,6 @@
Optional<FrameIdentifier> frameID() 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
Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (250042 => 250043)
--- trunk/Source/WebCore/loader/FrameLoaderClient.h 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h 2019-09-18 17:14:15 UTC (rev 250043)
@@ -130,7 +130,6 @@
virtual Optional<PageIdentifier> pageID() const = 0;
virtual Optional<FrameIdentifier> frameID() const = 0;
- virtual PAL::SessionID sessionID() const = 0;
#if PLATFORM(IOS_FAMILY)
// Returns true if the client forced the layout.
Modified: trunk/Source/WebCore/page/Frame.cpp (250042 => 250043)
--- trunk/Source/WebCore/page/Frame.cpp 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebCore/page/Frame.cpp 2019-09-18 17:14:15 UTC (rev 250043)
@@ -1015,7 +1015,8 @@
PAL::SessionID Frame::sessionID() const
{
- return m_loader->client().sessionID();
+ auto* page = this->page();
+ return page ? page->sessionID() : PAL::SessionID::defaultSessionID();
}
} // namespace WebCore
Modified: trunk/Source/WebKit/ChangeLog (250042 => 250043)
--- trunk/Source/WebKit/ChangeLog 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKit/ChangeLog 2019-09-18 17:14:15 UTC (rev 250043)
@@ -1,5 +1,25 @@
2019-09-18 Chris Dumez <[email protected]>
+ Drop FrameLoaderClient::sessionID()
+ https://bugs.webkit.org/show_bug.cgi?id=201916
+
+ Reviewed by Geoffrey Garen.
+
+ Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
+ what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
+ can get the sessionID from the WebProcess singleton.
+
+ * WebProcess/Network/WebLoaderStrategy.cpp:
+ (WebKit::WebLoaderStrategy::scheduleLoad):
+ * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+ (WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
+ (WebKit::WebSWContextManagerConnection::installServiceWorker):
+ * WebProcess/Storage/WebSWContextManagerConnection.h:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+
+2019-09-18 Chris Dumez <[email protected]>
+
WebServiceWorkerProvider::handleFetch() does not need to take in a sessionID
https://bugs.webkit.org/show_bug.cgi?id=201917
Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (250042 => 250043)
--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp 2019-09-18 17:14:15 UTC (rev 250043)
@@ -168,7 +168,7 @@
trackingParameters.pageID = frameLoaderClient.pageID().valueOr(PageIdentifier { });
trackingParameters.frameID = frameLoaderClient.frameID().valueOr(FrameIdentifier { });
trackingParameters.resourceID = identifier;
- auto sessionID = frameLoaderClient.sessionID();
+ auto sessionID = WebProcess::singleton().sessionID();
#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
// If the DocumentLoader schedules this as an archive resource load,
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (250042 => 250043)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2019-09-18 17:14:15 UTC (rev 250043)
@@ -72,9 +72,8 @@
static const Seconds asyncWorkerTerminationTimeout { 10_s };
static const Seconds syncWorkerTerminationTimeout { 100_ms }; // Only used by layout tests.
-ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection& connection, SessionID sessionID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, FrameIdentifier frameID, const String& userAgent)
+ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection& connection, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, FrameIdentifier frameID, const String& userAgent)
: m_connection(connection)
- , m_sessionID(sessionID)
, m_webPageProxyID(webPageProxyID)
, m_pageID(pageID)
, m_frameID(frameID)
@@ -139,7 +138,7 @@
// FIXME: This method should be moved directly to WebCore::SWContextManager::Connection
// If it weren't for ServiceWorkerFrameLoaderClient's dependence on WebDocumentLoader, this could already happen.
// FIXME: Weird to pass m_previousServiceWorkerID as a FrameIdentifier.
- auto frameLoaderClient = makeUnique<ServiceWorkerFrameLoaderClient>(*this, sessionID, m_webPageProxyID, m_pageID, frameIdentifierFromID(++m_previousServiceWorkerID), effectiveUserAgent);
+ auto frameLoaderClient = makeUnique<ServiceWorkerFrameLoaderClient>(*this, m_webPageProxyID, m_pageID, frameIdentifierFromID(++m_previousServiceWorkerID), effectiveUserAgent);
pageConfiguration.loaderClientForMainFrame = frameLoaderClient.get();
m_loaders.add(WTFMove(frameLoaderClient));
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h (250042 => 250043)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h 2019-09-18 17:14:15 UTC (rev 250043)
@@ -119,7 +119,7 @@
class ServiceWorkerFrameLoaderClient final : public WebCore::EmptyFrameLoaderClient {
public:
- ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection&, PAL::SessionID, WebPageProxyIdentifier, WebCore::PageIdentifier, WebCore::FrameIdentifier, const String& userAgent);
+ ServiceWorkerFrameLoaderClient(WebSWContextManagerConnection&, WebPageProxyIdentifier, WebCore::PageIdentifier, WebCore::FrameIdentifier, const String& userAgent);
void setUserAgent(String&& userAgent) { m_userAgent = WTFMove(userAgent); }
@@ -135,11 +135,9 @@
bool shouldUseCredentialStorage(WebCore::DocumentLoader*, unsigned long) final { return true; }
bool isServiceWorkerFrameLoaderClient() const final { return true; }
- PAL::SessionID sessionID() const final { return m_sessionID; }
String userAgent(const URL&) final { return m_userAgent; }
WebSWContextManagerConnection& m_connection;
- PAL::SessionID m_sessionID;
WebPageProxyIdentifier m_webPageProxyID;
WebCore::PageIdentifier m_pageID;
WebCore::FrameIdentifier m_frameID;
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (250042 => 250043)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2019-09-18 17:14:15 UTC (rev 250043)
@@ -136,16 +136,6 @@
return WTF::nullopt;
}
-PAL::SessionID WebFrameLoaderClient::sessionID() const
-{
- WebPage* page = m_frame ? m_frame->page() : nullptr;
- if (!page || !page->corePage()) {
- ASSERT_NOT_REACHED();
- return PAL::SessionID::defaultSessionID();
- }
- return page->sessionID();
-}
-
#if ENABLE(RESOURCE_LOAD_STATISTICS)
void WebFrameLoaderClient::setHasFrameSpecificStorageAccess(FrameSpecificStorageAccessIdentifier&& frameSpecificStorageAccessIdentifier )
{
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (250042 => 250043)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h 2019-09-18 17:14:15 UTC (rev 250043)
@@ -56,7 +56,6 @@
Optional<WebPageProxyIdentifier> webPageProxyID() const;
Optional<WebCore::PageIdentifier> pageID() const final;
Optional<WebCore::FrameIdentifier> frameID() const final;
- PAL::SessionID sessionID() const final;
#if ENABLE(RESOURCE_LOAD_STATISTICS)
bool hasFrameSpecificStorageAccess() final { return !!m_frameSpecificStorageAccessIdentifier; }
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (250042 => 250043)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2019-09-18 17:14:15 UTC (rev 250043)
@@ -1,3 +1,17 @@
+2019-09-18 Chris Dumez <[email protected]>
+
+ Drop FrameLoaderClient::sessionID()
+ https://bugs.webkit.org/show_bug.cgi?id=201916
+
+ Reviewed by Geoffrey Garen.
+
+ Drop FrameLoaderClient::sessionID(). The Frame can get the sessionID from its page (Which is
+ what the FrameLoaderClient::sessionID() ended up doing) and other call sites at WebKit2 layer
+ can get the sessionID from the WebProcess singleton.
+
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
2019-09-17 Chris Dumez <[email protected]>
Stop calling Page::setSessionID() from WebKit2
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h (250042 => 250043)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h 2019-09-18 17:14:15 UTC (rev 250043)
@@ -65,7 +65,6 @@
Optional<WebCore::PageIdentifier> pageID() const final;
Optional<WebCore::FrameIdentifier> frameID() const final;
- PAL::SessionID sessionID() const final;
void makeRepresentation(WebCore::DocumentLoader*) final;
bool hasHTMLView() const final;
Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (250042 => 250043)
--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm 2019-09-18 17:14:15 UTC (rev 250043)
@@ -219,12 +219,6 @@
return WTF::nullopt;
}
-PAL::SessionID WebFrameLoaderClient::sessionID() const
-{
- auto* coreFrame = core(m_webFrame.get());
- return coreFrame && coreFrame->page() ? coreFrame->page()->sessionID() : PAL::SessionID::defaultSessionID();
-}
-
void WebFrameLoaderClient::frameLoaderDestroyed()
{
[m_webFrame.get() _clearCoreFrame];
Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp (250042 => 250043)
--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.cpp 2019-09-18 17:14:15 UTC (rev 250043)
@@ -133,12 +133,6 @@
return WTF::nullopt;
}
-PAL::SessionID WebFrameLoaderClient::sessionID() const
-{
- auto* coreFrame = core(m_webFrame);
- return coreFrame && coreFrame->page() ? coreFrame->page()->sessionID() : PAL::SessionID::defaultSessionID();
-}
-
bool WebFrameLoaderClient::hasWebView() const
{
return m_webFrame->webView();
Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h (250042 => 250043)
--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h 2019-09-18 17:13:29 UTC (rev 250042)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameLoaderClient.h 2019-09-18 17:14:15 UTC (rev 250043)
@@ -53,7 +53,6 @@
Optional<WebCore::PageIdentifier> pageID() const final;
Optional<WebCore::FrameIdentifier> frameID() const final;
- PAL::SessionID sessionID() const final;
bool hasWebView() const override;