From 66faca22de3a2f98398b992dadae334db4c4f044 Mon Sep 17 00:00:00 2001 From: Matthew Gaudet Date: Wed, 16 Feb 2022 20:52:12 +0000 Subject: [PATCH] Bug 1754913 - Intentionally ignore errors in FetchStreamReader::OnOutputStreamReader r=smaug Differential Revision: https://phabricator.services.mozilla.com/D138703 --- dom/fetch/FetchStreamReader.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dom/fetch/FetchStreamReader.cpp b/dom/fetch/FetchStreamReader.cpp index a439061a4f78..448095515dfe 100644 --- a/dom/fetch/FetchStreamReader.cpp +++ b/dom/fetch/FetchStreamReader.cpp @@ -271,7 +271,7 @@ FetchStreamReader::OnOutputStreamReady(nsIAsyncOutputStream* aStream) { AutoEntryScript aes(mGlobal, "ReadableStreamReader.read", !mWorkerRef); #ifdef MOZ_DOM_STREAMS - ErrorResult rv; + IgnoredErrorResult rv; // The below very loosely tries to implement the incrementally-read-loop from // the fetch spec: However, because of the structure of the surrounding code, @@ -292,10 +292,6 @@ FetchStreamReader::OnOutputStreamReady(nsIAsyncOutputStream* aStream) { ReadableStreamDefaultReaderRead(aes.cx(), MOZ_KnownLive(mReader), readRequest, rv); - // We report the (potential) JS Exception via the AutoEntryScript above, as - // was done in the JS Streams implementation as well. - rv.WouldReportJSException(); - if (NS_WARN_IF(rv.Failed())) { // Let's close the stream. CloseAndRelease(aes.cx(), NS_ERROR_DOM_INVALID_STATE_ERR);