Bug 1455811 - ReadableStream.cancel() must cancel the actual download - part 2, r=bkelly
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 24 Apr 2018 16:10:38 +0200
changeset 468900 1723fb2d2d83a3022daa8ad19efb1c65ca9d895b
parent 468899 21d58d5d3819b36a5c7dd8267e9bf1ca96e5ba30
child 468901 909e130076ec98076317ce2dd72c2f3af69a2f5c
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1455811
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455811 - ReadableStream.cancel() must cancel the actual download - part 2, r=bkelly
dom/fetch/Fetch.cpp
--- a/dom/fetch/Fetch.cpp
+++ b/dom/fetch/Fetch.cpp
@@ -1396,17 +1396,19 @@ FetchBody<Response>::MaybeTeeReadableStr
                                                 FetchStreamReader** aStreamReader,
                                                 nsIInputStream** aInputStream,
                                                 ErrorResult& aRv);
 
 template <class Derived>
 void
 FetchBody<Derived>::Abort()
 {
-  MOZ_ASSERT(mReadableStreamBody);
+  if (!mReadableStreamBody) {
+    return;
+  }
 
   AutoJSAPI jsapi;
   if (!jsapi.Init(mOwner)) {
     return;
   }
 
   JSContext* cx = jsapi.cx();