mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
This commit is contained in:
parent
b61eff8730
commit
5a4c90fcb1
Notes:
sideshowbarker
2024-07-18 03:54:00 +09:00
Author: https://github.com/IdanHo
Commit: 5a4c90fcb1
Pull-request: https://github.com/SerenityOS/serenity/pull/10048
Reviewed-by: https://github.com/linusg ✅
30 changed files with 38 additions and 93 deletions
|
@ -47,7 +47,7 @@ Value BooleanConstructor::construct(FunctionObject& new_target)
|
|||
auto& global_object = this->global_object();
|
||||
|
||||
auto b = vm.argument(0).to_boolean();
|
||||
return ordinary_create_from_constructor<BooleanObject>(global_object, new_target, &GlobalObject::boolean_prototype, b);
|
||||
return TRY_OR_DISCARD(ordinary_create_from_constructor<BooleanObject>(global_object, new_target, &GlobalObject::boolean_prototype, b));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue