mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02: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:
Notes:
sideshowbarker
2024-07-17 07:39:33 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/52543fc771 Pull-request: https://github.com/SerenityOS/serenity/pull/15057
@@ -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&);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user