mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibJS: Convert get_options_object() to ThrowCompletionOr
This commit is contained in:
parent
f2b5ddd167
commit
08dd1c3e2d
15 changed files with 25 additions and 64 deletions
|
@ -103,9 +103,7 @@ JS_DEFINE_NATIVE_FUNCTION(PlainDateTimeConstructor::from)
|
|||
auto item = vm.argument(0);
|
||||
|
||||
// 1. Set options to ? GetOptionsObject(options).
|
||||
auto* options = get_options_object(global_object, vm.argument(1));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto* options = TRY_OR_DISCARD(get_options_object(global_object, vm.argument(1)));
|
||||
|
||||
// 2. If Type(item) is Object and item has an [[InitializedTemporalDateTime]] internal slot, then
|
||||
if (item.is_object() && is<PlainDateTime>(item.as_object())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue