Bug 1411528 Clear the intercept listening when synthesizing a redirect in HttpChannelChild. r=asuth
authorBen Kelly <ben@wanderview.com>
Fri, 27 Oct 2017 16:11:57 -0400
changeset 688141 6f9a97d89dfd68a6c0f3ed29841535d5a5408c9d
parent 688140 455c134d1689b1d53a3443dbd460c87915f120fd
child 688142 3eeb19b262ccfd4d4fbb496c03d9752e03c6ffab
push id86669
push userhikezoe@mozilla.com
push dateSat, 28 Oct 2017 10:13:18 +0000
reviewersasuth
bugs1411528
milestone58.0a1
Bug 1411528 Clear the intercept listening when synthesizing a redirect in HttpChannelChild. r=asuth
netwerk/protocol/http/HttpChannelChild.cpp
testing/web-platform/meta/service-workers/service-worker/redirected-response.https.html.ini
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -3619,16 +3619,20 @@ HttpChannelChild::OverrideWithSynthesize
   if (!mSynthesizedInput) {
     rv = NS_NewCStringInputStream(getter_AddRefs(mSynthesizedInput),
                                   EmptyCString());
     NS_ENSURE_SUCCESS_VOID(rv);
   }
 
   if (nsHttpChannel::WillRedirect(mResponseHead)) {
     mShouldInterceptSubsequentRedirect = true;
+    if (mInterceptListener) {
+      mInterceptListener->Cleanup();
+      mInterceptListener = nullptr;
+    }
     // Continue with the original cross-process request
     rv = ContinueAsyncOpen();
     return;
   }
 
   // For progress we trust the content-length for the "maximum" size.
   // We can't determine the full size from the stream itself since we
   // only receive the data incrementally.  We can't trust Available()
--- a/testing/web-platform/meta/service-workers/service-worker/redirected-response.https.html.ini
+++ b/testing/web-platform/meta/service-workers/service-worker/redirected-response.https.html.ini
@@ -1,19 +1,8 @@
 [redirected-response.https.html]
   type: testharness
-  disabled:
-    if debug and os == "win": https://bugzilla.mozilla.org/show_bug.cgi?id=1411528
-  expected:
-    if debug and not stylo and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): CRASH
-    if debug and not stylo and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): CRASH
-    if debug and stylo and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): CRASH
-    if debug and stylo and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): CRASH
-    if debug and stylo and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86") and (bits == 32): CRASH
-    if debug and not stylo and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): CRASH
-    if debug and stylo and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): CRASH
-    if debug and not stylo and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): CRASH
   [mode: "follow", no mode change]
     expected: FAIL
 
   [Fetch should not follow the redirect response 21 times.]
     expected: FAIL