ServiceWorkerClientFetch should create not null ResourceError
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Nov 2017 18:24:21 +0000 (18:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Nov 2017 18:24:21 +0000 (18:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179485

Patch by Youenn Fablet <youenn@apple.com> on 2017-11-09
Reviewed by Darin Adler.

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224633 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Storage/ServiceWorkerClientFetch.cpp

index ec04b3c..f27d4c7 100644 (file)
@@ -1,3 +1,13 @@
+2017-11-09  Youenn Fablet  <youenn@apple.com>
+
+        ServiceWorkerClientFetch should create not null ResourceError
+        https://bugs.webkit.org/show_bug.cgi?id=179485
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/Storage/ServiceWorkerClientFetch.cpp:
+        (WebKit::ServiceWorkerClientFetch::didReceiveResponse):
+
 2017-11-09  Andy Estes  <aestes@apple.com>
 
         [iOS] Adopt UIPreviewDataAttachmentListIsContentManaged
index 7467dfe..f618fc4 100644 (file)
@@ -53,7 +53,7 @@ void ServiceWorkerClientFetch::didReceiveResponse(WebCore::ResourceResponse&& re
     if (!(response.httpStatusCode() <= 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || response.httpStatusCode() == 305 || response.httpStatusCode() == 306)) {
         // FIXME: Support redirections.
         notImplemented();
-        m_loader->didFail({ });
+        m_loader->didFail({ ResourceError::Type::General });
         if (auto callback = WTFMove(m_callback))
             callback(Result::Succeeded);
         return;
@@ -61,7 +61,7 @@ void ServiceWorkerClientFetch::didReceiveResponse(WebCore::ResourceResponse&& re
 
     if (response.type() == ResourceResponse::Type::Error) {
         // Add support for a better error.
-        m_loader->didFail({ });
+        m_loader->didFail({ ResourceError::Type::General });
         if (auto callback = WTFMove(m_callback))
             callback(Result::Succeeded);
         return;