diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/webtransport | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/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; |