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:
Luke Wilde 2024-11-25 14:30:12 +00:00 committed by Sam Atkins
parent 2e27ffab6c
commit cae0ab2139
Notes: github-actions[bot] 2025-02-21 12:55:13 +00:00
43 changed files with 381 additions and 130 deletions

View file

@ -66,7 +66,7 @@ URL::Origin WorkerEnvironmentSettingsObject::origin() const
return m_origin;
}
PolicyContainer WorkerEnvironmentSettingsObject::policy_container() const
GC::Ref<PolicyContainer> WorkerEnvironmentSettingsObject::policy_container() const
{
// Return worker global scope's policy container.
return m_global_scope->policy_container();