mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibJS: Convert coerce_options_to_object() to ThrowCompletionOr
This commit is contained in:
parent
d0e5fc4576
commit
b9c7a629f8
4 changed files with 11 additions and 12 deletions
|
@ -298,9 +298,7 @@ Value LocaleConstructor::construct(FunctionObject& new_target)
|
|||
}
|
||||
|
||||
// 10. Set options to ? CoerceOptionsToObject(options).
|
||||
auto* options = coerce_options_to_object(global_object, options_value);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto* options = TRY_OR_DISCARD(coerce_options_to_object(global_object, options_value));
|
||||
|
||||
// 11. Set tag to ? ApplyOptionsToTag(tag, options).
|
||||
if (auto applied_tag = apply_options_to_tag(global_object, tag, *options); applied_tag.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue