mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr
This commit is contained in:
parent
a90107b02a
commit
ab594e5f2f
Notes:
sideshowbarker
2024-07-18 03:31:06 +09:00
Author: https://github.com/IdanHo
Commit: ab594e5f2f
Pull-request: https://github.com/SerenityOS/serenity/pull/10190
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
35 changed files with 196 additions and 328 deletions
|
@ -32,9 +32,7 @@ Object* promise_resolve(GlobalObject& global_object, Object& constructor, Value
|
|||
auto promise_capability = new_promise_capability(global_object, &constructor);
|
||||
if (vm.exception())
|
||||
return nullptr;
|
||||
[[maybe_unused]] auto result = vm.call(*promise_capability.resolve, js_undefined(), value);
|
||||
if (vm.exception())
|
||||
return nullptr;
|
||||
[[maybe_unused]] auto result = TRY_OR_DISCARD(vm.call(*promise_capability.resolve, js_undefined(), value));
|
||||
return promise_capability.promise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue