diff options
author | Brian Smith <brian@dbsoft.org> | 2023-09-29 15:34:10 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2023-09-29 15:34:10 -0500 |
commit | aa1caf5ade21ed691579ef1245c25c354d2d4707 (patch) | |
tree | 997dfeb5f0e40256398f81eb4f11eedbc6bc6bf4 /js/src/builtin | |
parent | bc4d5cec6a96e619453f02fbe743677412c009ec (diff) | |
download | uxp-aa1caf5ade21ed691579ef1245c25c354d2d4707.tar.gz |
Issue #1442 & #1691 Follow-up - Part 22 - Changes that came with Dynamic Module Import.
At the time we did not have ReadableStreams in our tree so these changes were left out.
https://bugzilla.mozilla.org/show_bug.cgi?id=1499140
Implement support for dynamic module import in the interpreter.
Diffstat (limited to 'js/src/builtin')
-rw-r--r-- | js/src/builtin/Stream.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp index de2414d351..c8d8e3e324 100644 --- a/js/src/builtin/Stream.cpp +++ b/js/src/builtin/Stream.cpp @@ -285,15 +285,6 @@ ReportArgTypeError(JSContext* cx, const char* funName, const char* expectedType, } static MOZ_MUST_USE bool -RejectWithPendingError(JSContext* cx, Handle<PromiseObject*> promise) { - // Not much we can do about uncatchable exceptions, just bail. - RootedValue exn(cx); - if (!GetAndClearException(cx, &exn)) - return false; - return PromiseObject::reject(cx, promise, exn); -} - -static MOZ_MUST_USE bool ReturnPromiseRejectedWithPendingError(JSContext* cx, const CallArgs& args) { JSObject* promise = PromiseRejectedWithPendingError(cx); @@ -1183,7 +1174,7 @@ ReadableStreamTee_Cancel(JSContext* cx, Handle<TeeState*> teeState, // Step b: Let cancelResult be ! ReadableStreamCancel(stream, compositeReason). RootedObject cancelResult(cx, ReadableStream::cancel(cx, stream, compositeReasonVal)); if (!cancelResult) { - if (!RejectWithPendingError(cx, promise)) + if (!RejectPromiseWithPendingError(cx, promise)) return nullptr; } else { // Step c: Resolve teeState.[[promise]] with cancelResult. |