mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1751917 - Indicate JS Exception handling to ErrorResult in FetchStreamReader r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D136913
This commit is contained in:
parent
9d410ec1bb
commit
a215c65d60
@ -291,6 +291,11 @@ 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user