mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +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
|
@ -51,7 +51,7 @@ Value WeakRefConstructor::construct(FunctionObject& new_target)
|
|||
vm.throw_exception<TypeError>(global_object, ErrorType::NotAnObject, target.to_string_without_side_effects());
|
||||
return {};
|
||||
}
|
||||
return ordinary_create_from_constructor<WeakRef>(global_object, new_target, &GlobalObject::weak_ref_prototype, &target.as_object());
|
||||
return TRY_OR_DISCARD(ordinary_create_from_constructor<WeakRef>(global_object, new_target, &GlobalObject::weak_ref_prototype, &target.as_object()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue