mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Remove underlying realm from SyntheticRealmSettings
This was removed from the ShadowRealm HTML spec integration PR after my suggestion as it is not used anywhere, and I don't believe it would ever need to be used in the future or by other specs.
This commit is contained in:
committed by
Andrew Kaster
parent
43f75dcba0
commit
b677844f8d
@@ -583,29 +583,26 @@ ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
|
||||
// 5. Set settings's principal realm to O's associated realm
|
||||
.principal_realm = object.shape().realm(),
|
||||
|
||||
// 6. Set settings's underlying realm to realm.
|
||||
.underlying_realm = realm,
|
||||
|
||||
// 7. Set settings's module map to a new module map, initially empty.
|
||||
// 6. Set settings's module map to a new module map, initially empty.
|
||||
.module_map = realm.create<HTML::ModuleMap>(),
|
||||
};
|
||||
|
||||
// 8. Set realm.[[HostDefined]] to settings.
|
||||
// 7. Set realm.[[HostDefined]] to settings.
|
||||
realm.set_host_defined(make<Bindings::SyntheticHostDefined>(move(settings), realm.create<Bindings::Intrinsics>(realm)));
|
||||
|
||||
// 9. Set realm.[[GlobalObject]] to globalObject.
|
||||
// 8. Set realm.[[GlobalObject]] to globalObject.
|
||||
realm.set_global_object(global_object);
|
||||
|
||||
// 10. Set realm.[[GlobalEnv]] to NewGlobalEnvironment(globalObject, globalObject).
|
||||
// 9. Set realm.[[GlobalEnv]] to NewGlobalEnvironment(globalObject, globalObject).
|
||||
realm.set_global_environment(realm.heap().allocate<JS::GlobalEnvironment>(global_object, global_object));
|
||||
|
||||
// 11. Perform ? SetDefaultGlobalBindings(realm).
|
||||
// 10. Perform ? SetDefaultGlobalBindings(realm).
|
||||
set_default_global_bindings(realm);
|
||||
|
||||
// NOTE: This needs to be done after initialization so that the realm has an intrinsics in its [[HostDefined]]
|
||||
global_object->initialize_web_interfaces();
|
||||
|
||||
// 12. Return NormalCompletion(unused).
|
||||
// 11. Return NormalCompletion(unused).
|
||||
return {};
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ void SyntheticRealmSettings::visit_edges(JS::Cell::Visitor& visitor)
|
||||
{
|
||||
execution_context->visit_edges(visitor);
|
||||
visitor.visit(principal_realm);
|
||||
visitor.visit(underlying_realm);
|
||||
visitor.visit(module_map);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ struct SyntheticRealmSettings {
|
||||
// The principal realm which this synthetic realm exists within.
|
||||
GC::Ref<JS::Realm> principal_realm;
|
||||
|
||||
// An underlying realm
|
||||
// The synthetic realm which this settings object represents.
|
||||
GC::Ref<JS::Realm> underlying_realm;
|
||||
|
||||
// A module map
|
||||
// A module map that is used when importing JavaScript modules.
|
||||
GC::Ref<ModuleMap> module_map;
|
||||
|
||||
Reference in New Issue
Block a user