mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +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:
parent
43f75dcba0
commit
b677844f8d
Notes:
github-actions[bot]
2024-11-24 22:30:53 +00:00
Author: https://github.com/shannonbooth
Commit: b677844f8d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2556
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/yyny
3 changed files with 6 additions and 14 deletions
|
@ -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 {};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue