mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Make PolicyContainer GC allocated
This is required to store Content Security Policies, as their Directives are implemented as subclasses with overridden virtual functions. Thus, they cannot be stored as generic Directive classes, as it'll lose the ability to call overridden functions when they are copied.
This commit is contained in:
@@ -111,7 +111,7 @@ URL::Origin WindowEnvironmentSettingsObject::origin() const
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects:concept-settings-object-policy-container
|
||||
PolicyContainer WindowEnvironmentSettingsObject::policy_container() const
|
||||
GC::Ref<PolicyContainer> WindowEnvironmentSettingsObject::policy_container() const
|
||||
{
|
||||
// Return the policy container of window's associated Document.
|
||||
return m_window->associated_document().policy_container();
|
||||
|
||||
Reference in New Issue
Block a user