mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibJS: Properly initialize the global object for $262.createRealm
This commit is contained in:
parent
48cb15283a
commit
123cdfa1f1
Notes:
sideshowbarker
2024-07-17 07:38:30 +09:00
Author: https://github.com/davidot Commit: https://github.com/SerenityOS/serenity/commit/123cdfa1f1 Pull-request: https://github.com/SerenityOS/serenity/pull/15072 Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 0 deletions
|
@ -62,6 +62,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm)
|
|||
auto* realm_global_object = vm.heap().allocate_without_realm<GlobalObject>(*realm);
|
||||
VERIFY(realm_global_object);
|
||||
realm->set_global_object(realm_global_object, nullptr);
|
||||
set_default_global_bindings(*realm);
|
||||
realm_global_object->initialize(*realm);
|
||||
return Value(realm_global_object->$262());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue