diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /dom/webtransport | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webtransport')
-rw-r--r-- | dom/webtransport/api/WebTransportDatagramDuplexStream.cpp | 8 | ||||
-rw-r--r-- | dom/webtransport/api/WebTransportDatagramDuplexStream.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dom/webtransport/api/WebTransportDatagramDuplexStream.cpp b/dom/webtransport/api/WebTransportDatagramDuplexStream.cpp index 30d7451414..b40991c9a1 100644 --- a/dom/webtransport/api/WebTransportDatagramDuplexStream.cpp +++ b/dom/webtransport/api/WebTransportDatagramDuplexStream.cpp @@ -258,7 +258,7 @@ NS_IMPL_ADDREF_INHERITED(OutgoingDatagramStreamAlgorithms, NS_IMPL_RELEASE_INHERITED(OutgoingDatagramStreamAlgorithms, UnderlyingSinkAlgorithmsWrapper) -already_AddRefed<Promise> OutgoingDatagramStreamAlgorithms::WriteCallback( +already_AddRefed<Promise> OutgoingDatagramStreamAlgorithms::WriteCallbackImpl( JSContext* aCx, JS::Handle<JS::Value> aChunk, WritableStreamDefaultController& aController, ErrorResult& aError) { // https://w3c.github.io/webtransport/#writedatagrams @@ -269,9 +269,9 @@ already_AddRefed<Promise> OutgoingDatagramStreamAlgorithms::WriteCallback( // rejected with a TypeError. { BufferSource == ArrayBuffer/ArrayBufferView } ArrayBufferViewOrArrayBuffer arrayBuffer; if (!arrayBuffer.Init(aCx, aChunk)) { - return Promise::CreateRejectedWithTypeError( - mDatagrams->GetParentObject(), - "Wrong type for Datagram stream write"_ns, aError); + JS_ClearPendingException(aCx); + aError.ThrowTypeError("Wrong type for Datagram stream write"_ns); + return nullptr; } // Step 3: Let datagrams be transport.[[Datagrams]]. diff --git a/dom/webtransport/api/WebTransportDatagramDuplexStream.h b/dom/webtransport/api/WebTransportDatagramDuplexStream.h index 510cbcac71..a9f8ce7b56 100644 --- a/dom/webtransport/api/WebTransportDatagramDuplexStream.h +++ b/dom/webtransport/api/WebTransportDatagramDuplexStream.h @@ -71,7 +71,7 @@ class OutgoingDatagramStreamAlgorithms final // Streams algorithms - already_AddRefed<Promise> WriteCallback( + already_AddRefed<Promise> WriteCallbackImpl( JSContext* aCx, JS::Handle<JS::Value> aChunk, WritableStreamDefaultController& aController, ErrorResult& aError) override; |