1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

LibJS: Port Value::to_object() to NonnullGCPtr

This commit is contained in:
Linus Groh 2023-04-13 15:26:41 +02:00 committed by Andreas Kling
parent e79f5b6e85
commit f345f72b55
29 changed files with 264 additions and 263 deletions

View file

@ -73,7 +73,7 @@ ThrowCompletionOr<Object*> to_date_time_options(VM& vm, Value options_value, Opt
auto& realm = *vm.current_realm();
// 1. If options is undefined, let options be null; otherwise let options be ? ToObject(options).
Object* options = nullptr;
GCPtr<Object> options;
if (!options_value.is_undefined())
options = TRY(options_value.to_object(vm));
@ -150,7 +150,7 @@ ThrowCompletionOr<Object*> to_date_time_options(VM& vm, Value options_value, Opt
}
// 13. Return options.
return options;
return options.ptr();
}
// 11.5.2 DateTimeStyleFormat ( dateStyle, timeStyle, styles ), https://tc39.es/ecma402/#sec-date-time-style-format