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

LibJS: Convert Realm::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
parent e0818bf21e
commit bfb8d83535
4 changed files with 6 additions and 7 deletions

View file

@ -58,8 +58,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::clear_kept_objects)
JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm)
{
auto* realm = Realm::create(vm);
VERIFY(realm);
auto realm = Realm::create(vm);
auto* realm_global_object = vm.heap().allocate_without_realm<GlobalObject>(*realm);
VERIFY(realm_global_object);
realm->set_global_object(realm_global_object, nullptr);