[GTK][WPE] Fetch tests assert in SubresourceLoader::didReceiveResponse()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 06:43:51 +0000 (06:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 06:43:51 +0000 (06:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188163

Patch by Rob Buis <rbuis@igalia.com> on 2018-08-05
Reviewed by Frédéric Wang.

Source/WebCore:

Fetch in manual redirect mode uses didReceiveResponse instead of
willSendRequestInternal, so update the ASSERT.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):

LayoutTests:

Unskip since this will not crash in Debug anymore.

* platform/wpe/TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/platform/wpe/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/loader/SubresourceLoader.cpp

index 09f09c2..8c01403 100644 (file)
@@ -1,3 +1,14 @@
+2018-08-05  Rob Buis  <rbuis@igalia.com>
+
+        [GTK][WPE] Fetch tests assert in SubresourceLoader::didReceiveResponse()
+        https://bugs.webkit.org/show_bug.cgi?id=188163
+
+        Reviewed by Frédéric Wang.
+
+        Unskip since this will not crash in Debug anymore.
+
+        * platform/wpe/TestExpectations:
+
 2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Add support for microtasks in workers
index ded2697..32ccf7a 100644 (file)
@@ -1328,10 +1328,3 @@ webkit.org/b/188161 [ Debug ] webgl/1.0.2/conformance/context/context-lost-resto
 
 webkit.org/b/188162 [ Debug ] fast/canvas/webgl/texImage2D-video-flipY-false.html [ Crash ]
 webkit.org/b/188162 [ Debug ] fast/canvas/webgl/texImage2D-video-flipY-true.html [ Crash ]
-
-webkit.org/b/188163 [ Debug ] http/tests/fetch/caching-with-different-options.html [ Crash ]
-webkit.org/b/188163 [ Debug ] http/tests/fetch/redirectmode-and-preload.html [ Crash ]
-webkit.org/b/188163 [ Debug ] imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-worker.html [ Crash ]
-webkit.org/b/188163 [ Debug ] imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.html [ Crash ]
-webkit.org/b/188163 [ Debug ] imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode-worker.html [ Crash ]
-webkit.org/b/188163 [ Debug ] imported/w3c/web-platform-tests/fetch/api/redirect/redirect-mode.html[ Crash ]
index 35b4a0b..b798755 100644 (file)
@@ -1,3 +1,16 @@
+2018-08-05  Rob Buis  <rbuis@igalia.com>
+
+        [GTK][WPE] Fetch tests assert in SubresourceLoader::didReceiveResponse()
+        https://bugs.webkit.org/show_bug.cgi?id=188163
+
+        Reviewed by Frédéric Wang.
+
+        Fetch in manual redirect mode uses didReceiveResponse instead of
+        willSendRequestInternal, so update the ASSERT.
+
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::didReceiveResponse):
+
 2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Add support for microtasks in workers
index 2cf70fa..9a4dd30 100644 (file)
@@ -318,11 +318,11 @@ void SubresourceLoader::didReceiveResponse(const ResourceResponse& response, Com
     }
 #endif
 
-    // We want redirect responses to be processed through willSendRequestInternal.
-    // The only exception is redirection with no Location headers. Or in rare circumstances,
+    // We want redirect responses to be processed through willSendRequestInternal. Exceptions are
+    // redirection with no Location headers and fetch in manual redirect mode. Or in rare circumstances,
     // cases of too many redirects from CFNetwork (<rdar://problem/30610988>).
 #if !PLATFORM(COCOA)
-    ASSERT(response.httpStatusCode() < 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || !response.httpHeaderField(HTTPHeaderName::Location));
+    ASSERT(response.httpStatusCode() < 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || !response.httpHeaderField(HTTPHeaderName::Location) || response.type() == ResourceResponse::Type::Opaqueredirect);
 #endif
 
     // Reference the object in this method since the additional processing can do