diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index 79bd5a0e39..35d929c89d 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -721,10 +721,14 @@ FetchDriver::OnDataAvailable(nsIRequest* aRequest, } } + if (!mResponse) { + MOZ_ASSERT(false); + return NS_ERROR_UNEXPECTED; + } + // Explicitly initialized to 0 because in some cases nsStringInputStream may // not write to aRead. uint32_t aRead = 0; - MOZ_ASSERT(mResponse); MOZ_ASSERT(mPipeOutputStream); // From "Main Fetch" step 17: SRI-part2.