mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibJS+LibWeb: Restore type safety of Realm::set_global_object()
The changes from 8a03b17
to allow any JS::Value aren't a good fit, as
shown by the excessive amount of verify_cast needed :^)
This commit is contained in:
parent
64b29eb459
commit
c8f1651761
10 changed files with 27 additions and 36 deletions
|
@ -61,7 +61,7 @@ JS_DEFINE_NATIVE_FUNCTION($262Object::create_realm)
|
|||
VERIFY(realm);
|
||||
auto* realm_global_object = vm.heap().allocate_without_global_object<GlobalObject>(*realm);
|
||||
VERIFY(realm_global_object);
|
||||
realm->set_global_object(realm_global_object, js_undefined());
|
||||
realm->set_global_object(realm_global_object, nullptr);
|
||||
realm_global_object->set_associated_realm(*realm);
|
||||
realm_global_object->initialize_global_object();
|
||||
return Value(realm_global_object->$262());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue