mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibWeb: Change backup imcumbent stack to hold Realm instead of Settings
This is a bit of a chonkier commit as it results in both: clean_up_after_running_callback and prepare_to_run_callback being changed to accept a realm instead of an environment settings object, which has a bunch of fallout, particuarly for IDL abstract operations.
This commit is contained in:
committed by
Andrew Kaster
parent
8dffd8e7d6
commit
d7023f5f45
Notes:
github-actions[bot]
2024-11-01 19:16:12 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/d7023f5f450 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1932 Reviewed-by: https://github.com/ADKaster ✅
@@ -61,10 +61,10 @@ public:
|
||||
|
||||
Vector<JS::Handle<HTML::Window>> same_loop_windows() const;
|
||||
|
||||
void push_onto_backup_incumbent_settings_object_stack(Badge<EnvironmentSettingsObject>, EnvironmentSettingsObject& environment_settings_object);
|
||||
void pop_backup_incumbent_settings_object_stack(Badge<EnvironmentSettingsObject>);
|
||||
EnvironmentSettingsObject& top_of_backup_incumbent_settings_object_stack();
|
||||
bool is_backup_incumbent_settings_object_stack_empty() const { return m_backup_incumbent_settings_object_stack.is_empty(); }
|
||||
void push_onto_backup_incumbent_realm_stack(JS::Realm&);
|
||||
void pop_backup_incumbent_realm_stack();
|
||||
JS::Realm& top_of_backup_incumbent_realm_stack();
|
||||
bool is_backup_incumbent_realm_stack_empty() const { return m_backup_incumbent_realm_stack.is_empty(); }
|
||||
|
||||
void register_environment_settings_object(Badge<EnvironmentSettingsObject>, EnvironmentSettingsObject&);
|
||||
void unregister_environment_settings_object(Badge<EnvironmentSettingsObject>, EnvironmentSettingsObject&);
|
||||
@@ -107,7 +107,8 @@ private:
|
||||
Vector<RawPtr<EnvironmentSettingsObject>> m_related_environment_settings_objects;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#backup-incumbent-settings-object-stack
|
||||
Vector<JS::NonnullGCPtr<EnvironmentSettingsObject>> m_backup_incumbent_settings_object_stack;
|
||||
// https://whatpr.org/html/9893/webappapis.html#backup-incumbent-realm-stack
|
||||
Vector<JS::NonnullGCPtr<JS::Realm>> m_backup_incumbent_realm_stack;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#termination-nesting-level
|
||||
size_t m_termination_nesting_level { 0 };
|
||||
|
||||
Reference in New Issue
Block a user