1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 21:48:11 +00:00

LibJS+LibWeb: Let Realm store a plain Object for [[GlobalObject]]

This removes the requirement of having a global object that actually
inherits from JS::GlobalObject, which is now a perfectly valid scenario.

With the upcoming removal of wrapper objects in LibWeb, the HTML::Window
object will inherit from DOM::EventTarget, which means it cannot also
inherit from JS::GlobalObject.
This commit is contained in:
Linus Groh 2022-08-28 15:03:45 +01:00
parent 72730422bb
commit 52543fc771
8 changed files with 20 additions and 20 deletions

View file

@ -79,7 +79,7 @@ struct EnvironmentSettingsObject
virtual CanUseCrossOriginIsolatedAPIs cross_origin_isolated_capability() = 0;
JS::Realm& realm();
JS::GlobalObject& global_object();
JS::Object& global_object();
EventLoop& responsible_event_loop();
RunScriptDecision can_run_script();
@ -121,12 +121,12 @@ private:
EnvironmentSettingsObject& incumbent_settings_object();
JS::Realm& incumbent_realm();
JS::GlobalObject& incumbent_global_object();
JS::Object& incumbent_global_object();
EnvironmentSettingsObject& current_settings_object();
JS::GlobalObject& current_global_object();
JS::Object& current_global_object();
JS::Realm& relevant_realm(JS::Object const&);
EnvironmentSettingsObject& relevant_settings_object(JS::Object const&);
EnvironmentSettingsObject& relevant_settings_object(DOM::Node const&);
JS::GlobalObject& relevant_global_object(JS::Object const&);
JS::Object& relevant_global_object(JS::Object const&);
}