mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02: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:
Notes:
github-actions[bot]
2025-02-21 12:55:13 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/cae0ab2139a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3627 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2021-2025, Luke Wilde <luke@ladybird.org>
|
||||
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
virtual URL::Origin origin() const = 0;
|
||||
|
||||
// A policy container https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-policy-container
|
||||
virtual PolicyContainer policy_container() const = 0;
|
||||
virtual GC::Ref<PolicyContainer> policy_container() const = 0;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-cross-origin-isolated-capability
|
||||
virtual CanUseCrossOriginIsolatedAPIs cross_origin_isolated_capability() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user