mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:47:45 +00:00
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
This commit is contained in:
parent
b61eff8730
commit
5a4c90fcb1
30 changed files with 38 additions and 93 deletions
|
@ -263,9 +263,7 @@ Value PromiseConstructor::construct(FunctionObject& new_target)
|
|||
return {};
|
||||
}
|
||||
|
||||
auto* promise = ordinary_create_from_constructor<Promise>(global_object, new_target, &GlobalObject::promise_prototype);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto* promise = TRY_OR_DISCARD(ordinary_create_from_constructor<Promise>(global_object, new_target, &GlobalObject::promise_prototype));
|
||||
|
||||
auto [resolve_function, reject_function] = promise->create_resolving_functions();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue