diff --git a/dom/streams/StreamUtils.h b/dom/streams/StreamUtils.h index 08a6fad13ba3..f0b09c63b825 100644 --- a/dom/streams/StreamUtils.h +++ b/dom/streams/StreamUtils.h @@ -35,6 +35,10 @@ MOZ_CAN_RUN_SCRIPT static already_AddRefed PromisifyAlgorithm( aFunc(aRv); } + if (aRv.IsUncatchableException()) { + return nullptr; + } + if (aRv.Failed()) { return Promise::CreateRejectedWithErrorResult(aGlobal, aRv); } diff --git a/testing/web-platform/tests/encoding/streams/stringification-crash.html b/testing/web-platform/tests/encoding/streams/stringification-crash.html new file mode 100644 index 000000000000..bbcbe3009661 --- /dev/null +++ b/testing/web-platform/tests/encoding/streams/stringification-crash.html @@ -0,0 +1,20 @@ + + + +