mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +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
|
@ -64,7 +64,7 @@ ThrowCompletionOr<Object*> ShadowRealmConstructor::construct(FunctionObject& new
|
|||
|
||||
// 10. Perform ? SetRealmGlobalObject(realmRec, undefined, undefined).
|
||||
auto* new_global_object = vm.heap().allocate_without_global_object<GlobalObject>(*realm);
|
||||
realm->set_global_object(new_global_object, js_undefined());
|
||||
realm->set_global_object(new_global_object, nullptr);
|
||||
new_global_object->initialize_global_object();
|
||||
|
||||
// TODO: I don't think we should have these exactly like this, that doesn't work well with how
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue