mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibJS: Let Shape store a Realm instead of a GlobalObject
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
This commit is contained in:
parent
7a6935a2ff
commit
50d951aea2
22 changed files with 104 additions and 55 deletions
|
@ -57,7 +57,8 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::clear_kept_objects)
|
|||
|
||||
JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm)
|
||||
{
|
||||
auto realm = vm.heap().allocate_without_global_object<GlobalObject>();
|
||||
// FIXME: This doesn't look right.
|
||||
auto realm = vm.heap().allocate_without_global_object<GlobalObject>(*global_object.associated_realm());
|
||||
realm->initialize_global_object();
|
||||
return Value(realm->$262());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue