Diff
Modified: trunk/Source/WebCore/ChangeLog (262479 => 262480)
--- trunk/Source/WebCore/ChangeLog 2020-06-03 06:53:16 UTC (rev 262479)
+++ trunk/Source/WebCore/ChangeLog 2020-06-03 07:28:11 UTC (rev 262480)
@@ -1,3 +1,18 @@
+2020-06-03 Youenn Fablet <[email protected]>
+
+ Add more logging related to service worker fetch event handling
+ https://bugs.webkit.org/show_bug.cgi?id=212632
+
+ Reviewed by Chris Dumez.
+
+ Add logging related to creating/canceling/deleting fetch event handler related client.
+ No change of behavior.
+
+ * workers/service/context/ServiceWorkerThreadProxy.cpp:
+ (WebCore::ServiceWorkerThreadProxy::startFetch):
+ (WebCore::ServiceWorkerThreadProxy::cancelFetch):
+ (WebCore::ServiceWorkerThreadProxy::removeFetch):
+
2020-06-02 Yusuke Suzuki <[email protected]>
ASSERTION FAILED: isCell() under WebCore::JSDOMConstructor seen with webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html
Modified: trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp (262479 => 262480)
--- trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp 2020-06-03 06:53:16 UTC (rev 262479)
+++ trunk/Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp 2020-06-03 07:28:11 UTC (rev 262480)
@@ -35,6 +35,7 @@
#include "Frame.h"
#include "FrameLoader.h"
#include "LoaderStrategy.h"
+#include "Logging.h"
#include "MessageWithMessagePorts.h"
#include "PlatformStrategies.h"
#include "ServiceWorkerClientData.h"
@@ -196,6 +197,8 @@
void ServiceWorkerThreadProxy::startFetch(SWServerConnectionIdentifier connectionIdentifier, FetchIdentifier fetchIdentifier, Ref<ServiceWorkerFetch::Client>&& client, Optional<ServiceWorkerClientIdentifier>&& clientId, ResourceRequest&& request, String&& referrer, FetchOptions&& options)
{
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerThreadProxy::startFetch %llu", fetchIdentifier.toUInt64());
+
auto key = std::make_pair(connectionIdentifier, fetchIdentifier);
if (m_ongoingFetchTasks.isEmpty())
@@ -210,6 +213,8 @@
void ServiceWorkerThreadProxy::cancelFetch(SWServerConnectionIdentifier connectionIdentifier, FetchIdentifier fetchIdentifier)
{
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerThreadProxy::cancelFetch %llu", fetchIdentifier.toUInt64());
+
auto client = m_ongoingFetchTasks.take(std::make_pair(connectionIdentifier, fetchIdentifier));
if (!client)
return;
@@ -235,6 +240,8 @@
void ServiceWorkerThreadProxy::removeFetch(SWServerConnectionIdentifier connectionIdentifier, FetchIdentifier fetchIdentifier)
{
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerThreadProxy::removeFetch %llu", fetchIdentifier.toUInt64());
+
m_ongoingFetchTasks.remove(std::make_pair(connectionIdentifier, fetchIdentifier));
if (m_ongoingFetchTasks.isEmpty())
Modified: trunk/Source/WebKit/ChangeLog (262479 => 262480)
--- trunk/Source/WebKit/ChangeLog 2020-06-03 06:53:16 UTC (rev 262479)
+++ trunk/Source/WebKit/ChangeLog 2020-06-03 07:28:11 UTC (rev 262480)
@@ -1,3 +1,22 @@
+2020-06-03 Youenn Fablet <[email protected]>
+
+ Add more logging related to service worker fetch event handling
+ https://bugs.webkit.org/show_bug.cgi?id=212632
+
+ Reviewed by Chris Dumez.
+
+ Add logging to identify the page ID and frame ID used by a service worker.
+ Add logging to identify what is happening in the case of a response being buffered for navigation purposes.
+
+ * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+ (WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
+ (WebKit::WebSWContextManagerConnection::installServiceWorker):
+ (WebKit::WebSWContextManagerConnection::continueDidReceiveFetchResponse):
+ * WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
+ (WebKit::WebServiceWorkerFetchTaskClient::didFail):
+ (WebKit::WebServiceWorkerFetchTaskClient::didFinish):
+ (WebKit::WebServiceWorkerFetchTaskClient::continueDidReceiveResponse):
+
2020-06-02 Chris Dumez <[email protected]>
[iOS] WKProcessAssertionBackgroundTaskManager incorrectly ignores expiration notifications for daemons
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (262479 => 262480)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2020-06-03 06:53:16 UTC (rev 262479)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2020-06-03 07:28:11 UTC (rev 262480)
@@ -79,6 +79,7 @@
, m_frameID(frameID)
, m_userAgent(userAgent)
{
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient webPageProxyID %llu, pageID %llu, frameID %llu", webPageProxyID.toUInt64(), pageID.toUInt64(), frameID.toUInt64());
}
Ref<DocumentLoader> ServiceWorkerFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
@@ -138,8 +139,6 @@
void WebSWContextManagerConnection::installServiceWorker(const ServiceWorkerContextData& data, String&& userAgent)
{
- LOG(ServiceWorker, "WebSWContextManagerConnection::installServiceWorker for worker %" PRIu64, data.serviceWorkerIdentifier.toUInt64());
-
auto pageConfiguration = pageConfigurationWithEmptyClients(WebProcess::singleton().sessionID());
#if ENABLE(INDEXED_DATABASE)
@@ -212,7 +211,10 @@
void WebSWContextManagerConnection::continueDidReceiveFetchResponse(SWServerConnectionIdentifier serverConnectionIdentifier, ServiceWorkerIdentifier serviceWorkerIdentifier, FetchIdentifier fetchIdentifier)
{
- if (auto* serviceWorkerThreadProxy = SWContextManager::singleton().serviceWorkerThreadProxy(serviceWorkerIdentifier))
+ auto* serviceWorkerThreadProxy = SWContextManager::singleton().serviceWorkerThreadProxy(serviceWorkerIdentifier);
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerFrameLoaderClient::continueDidReceiveFetchResponse for service worker %llu, fetch identifier %llu, has service worker %d", serviceWorkerIdentifier.toUInt64(), fetchIdentifier.toUInt64(), !!serviceWorkerThreadProxy);
+
+ if (serviceWorkerThreadProxy)
serviceWorkerThreadProxy->continueDidReceiveFetchResponse(serverConnectionIdentifier, fetchIdentifier);
}
Modified: trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp (262479 => 262480)
--- trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp 2020-06-03 06:53:16 UTC (rev 262479)
+++ trunk/Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp 2020-06-03 07:28:11 UTC (rev 262480)
@@ -145,6 +145,8 @@
return;
if (m_waitingForContinueDidReceiveResponseMessage) {
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerFrameLoaderClient::didFail while waiting, fetch identifier %llu", m_fetchIdentifier.toUInt64());
+
m_responseData = makeUniqueRef<ResourceError>(error.isolatedCopy());
return;
}
@@ -160,6 +162,8 @@
return;
if (m_waitingForContinueDidReceiveResponseMessage) {
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerFrameLoaderClient::didFinish while waiting, fetch identifier %llu", m_fetchIdentifier.toUInt64());
+
m_didFinish = true;
return;
}
@@ -186,6 +190,8 @@
void WebServiceWorkerFetchTaskClient::continueDidReceiveResponse()
{
+ RELEASE_LOG(ServiceWorker, "ServiceWorkerFrameLoaderClient::continueDidReceiveResponse, has connection %d, didFinish %d, response type %ld", !!m_connection, m_didFinish, m_responseData.index());
+
if (!m_connection)
return;