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

LibJS: Convert the PromiseResolve AO to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-23 03:44:07 +03:00 committed by Andreas Kling
parent 0d602c5ec5
commit 81bdb20c61
4 changed files with 8 additions and 12 deletions

View file

@ -357,7 +357,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(PromiseConstructor::resolve)
{
auto* constructor = TRY_OR_DISCARD(vm.this_value(global_object).to_object(global_object));
auto value = vm.argument(0);
return promise_resolve(global_object, *constructor, value);
return TRY_OR_DISCARD(promise_resolve(global_object, *constructor, value));
}
// 27.2.4.8 get Promise [ @@species ], https://tc39.es/ecma262/#sec-get-promise-@@species