mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 16:33:13 +00:00
LibWeb: Capture incoming reason argument
Capture the incoming reason argument to transform_stream_default_source_cancel_algorithm() on the on_fulfilled_callback() of WebIDL::react_to_promise() on step 7.
This commit is contained in:
parent
514a2a1757
commit
26fe7a628c
Notes:
github-actions[bot]
2024-08-21 10:22:54 +00:00
Author: https://github.com/kennethmyhra
Commit: 26fe7a628c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1151
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 26 additions and 1 deletions
|
@ -5168,7 +5168,7 @@ JS::NonnullGCPtr<WebIDL::Promise> transform_stream_default_source_cancel_algorit
|
|||
WebIDL::react_to_promise(
|
||||
*cancel_promise,
|
||||
// 1. If cancelPromise was fulfilled, then:
|
||||
JS::create_heap_function(realm.heap(), [&realm, writable, controller, &stream](JS::Value reason) -> WebIDL::ExceptionOr<JS::Value> {
|
||||
JS::create_heap_function(realm.heap(), [&realm, writable, controller, &stream, reason](JS::Value) -> WebIDL::ExceptionOr<JS::Value> {
|
||||
// 1. If writable.[[state]] is "errored", reject controller.[[finishPromise]] with writable.[[storedError]].
|
||||
if (writable->state() == WritableStream::State::Errored) {
|
||||
WebIDL::reject_promise(realm, *controller->finish_promise(), writable->stored_error());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue