mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 07:37:03 +00:00
LibJS: Convert get_options_object() to ThrowCompletionOr
This commit is contained in:
parent
f2b5ddd167
commit
08dd1c3e2d
Notes:
sideshowbarker
2024-07-18 03:49:37 +09:00
Author: https://github.com/linusg
Commit: 08dd1c3e2d
Pull-request: https://github.com/SerenityOS/serenity/pull/10065
Reviewed-by: https://github.com/IdanHo ✅
15 changed files with 25 additions and 64 deletions
|
@ -82,9 +82,7 @@ Value PlainDateConstructor::construct(FunctionObject& new_target)
|
|||
JS_DEFINE_NATIVE_FUNCTION(PlainDateConstructor::from)
|
||||
{
|
||||
// 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)));
|
||||
|
||||
auto item = vm.argument(0);
|
||||
// 2. If Type(item) is Object and item has an [[InitializedTemporalDate]] internal slot, then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue