Title: [225705] trunk/Source
Revision
225705
Author
[email protected]
Date
2017-12-08 14:45:21 -0800 (Fri, 08 Dec 2017)

Log Message

WebServiceWorkerProvider should use Cancellation error to notify DTL that it cannot handle a fetch
https://bugs.webkit.org/show_bug.cgi?id=180584

Patch by Youenn Fablet <[email protected]> on 2017-12-08
Reviewed by Alex Christensen.

Source/WebCore:

Previously, for each cross origin fetch that is going through a service worker and service worker is not handling the fetch,
we return an AccessControl error so that DocumentThreadableLoader will do preflight and regular load through the network.
This error is wrongly logged in the Inspector.
Change error type to Cancellation so that the Inspector does not log it.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didFail):

Source/WebKit:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (225704 => 225705)


--- trunk/Source/WebCore/ChangeLog	2017-12-08 22:44:47 UTC (rev 225704)
+++ trunk/Source/WebCore/ChangeLog	2017-12-08 22:45:21 UTC (rev 225705)
@@ -1,5 +1,20 @@
 2017-12-08  Youenn Fablet  <[email protected]>
 
+        WebServiceWorkerProvider should use Cancellation error to notify DTL that it cannot handle a fetch
+        https://bugs.webkit.org/show_bug.cgi?id=180584
+
+        Reviewed by Alex Christensen.
+
+        Previously, for each cross origin fetch that is going through a service worker and service worker is not handling the fetch,
+        we return an AccessControl error so that DocumentThreadableLoader will do preflight and regular load through the network.
+        This error is wrongly logged in the Inspector.
+        Change error type to Cancellation so that the Inspector does not log it.
+
+        * loader/DocumentThreadableLoader.cpp:
+        (WebCore::DocumentThreadableLoader::didFail):
+
+2017-12-08  Youenn Fablet  <[email protected]>
+
         Service Worker should use a correct SessionID
         https://bugs.webkit.org/show_bug.cgi?id=180585
 

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (225704 => 225705)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2017-12-08 22:44:47 UTC (rev 225704)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2017-12-08 22:45:21 UTC (rev 225705)
@@ -405,7 +405,7 @@
 {
     ASSERT(m_client);
 #if ENABLE(SERVICE_WORKER)
-    if (m_bypassingPreflightForServiceWorkerRequest && error.isAccessControl()) {
+    if (m_bypassingPreflightForServiceWorkerRequest && error.isCancellation()) {
         clearResource();
 
         m_options.serviceWorkersMode = ServiceWorkersMode::None;

Modified: trunk/Source/WebKit/ChangeLog (225704 => 225705)


--- trunk/Source/WebKit/ChangeLog	2017-12-08 22:44:47 UTC (rev 225704)
+++ trunk/Source/WebKit/ChangeLog	2017-12-08 22:45:21 UTC (rev 225705)
@@ -1,5 +1,15 @@
 2017-12-08  Youenn Fablet  <[email protected]>
 
+        WebServiceWorkerProvider should use Cancellation error to notify DTL that it cannot handle a fetch
+        https://bugs.webkit.org/show_bug.cgi?id=180584
+
+        Reviewed by Alex Christensen.
+
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::WebLoaderStrategy::scheduleLoad):
+
+2017-12-08  Youenn Fablet  <[email protected]>
+
         Service Worker should use a correct SessionID
         https://bugs.webkit.org/show_bug.cgi?id=180585
 

Modified: trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp (225704 => 225705)


--- trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp	2017-12-08 22:44:47 UTC (rev 225704)
+++ trunk/Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp	2017-12-08 22:45:21 UTC (rev 225705)
@@ -228,7 +228,7 @@
         if (resourceLoader->options().serviceWorkersMode == ServiceWorkersMode::Only) {
             callOnMainThread([resourceLoader = WTFMove(resourceLoader)] {
                 auto error = internalError(resourceLoader->request().url());
-                error.setType(ResourceError::Type::AccessControl);
+                error.setType(ResourceError::Type::Cancellation);
                 resourceLoader->didFail(error);
             });
             return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to