mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibJS: Convert Object::create() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 03:17:23 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/ddc6e139a6 Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
@@ -600,7 +600,7 @@ ThrowCompletionOr<Object*> coerce_options_to_object(VM& vm, Value options)
|
||||
// 1. If options is undefined, then
|
||||
if (options.is_undefined()) {
|
||||
// a. Return OrdinaryObjectCreate(null).
|
||||
return Object::create(realm, nullptr);
|
||||
return Object::create(realm, nullptr).ptr();
|
||||
}
|
||||
|
||||
// 2. Return ? ToObject(options).
|
||||
|
||||
Reference in New Issue
Block a user