1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:37:35 +00:00

LibWeb: Properly reject abrupt completion in clean_up_on_return

This commit is contained in:
Matthew Olsson 2023-04-16 17:40:09 -07:00 committed by Linus Groh
parent 4ed71d5b40
commit c40109628d
8 changed files with 46 additions and 25 deletions

View file

@ -19,10 +19,10 @@ JS::ThrowCompletionOr<UnderlyingSink> UnderlyingSink::from_value(JS::VM& vm, JS:
auto& object = value.as_object();
UnderlyingSink underlying_sink {
.start = TRY(property_to_callback(vm, value, "start")),
.write = TRY(property_to_callback(vm, value, "write")),
.close = TRY(property_to_callback(vm, value, "close")),
.abort = TRY(property_to_callback(vm, value, "abort")),
.start = TRY(property_to_callback(vm, value, "start", WebIDL::OperationReturnsPromise::No)),
.write = TRY(property_to_callback(vm, value, "write", WebIDL::OperationReturnsPromise::Yes)),
.close = TRY(property_to_callback(vm, value, "close", WebIDL::OperationReturnsPromise::Yes)),
.abort = TRY(property_to_callback(vm, value, "abort", WebIDL::OperationReturnsPromise::Yes)),
.type = {},
};