mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 12:17:52 +00:00
LibWeb: Make a bunch of CSP classes not realm associated
These are not associated with a javascript realm, so to avoid confusion about which realm these need to be created in, make all of these objects a GC::Cell, and deal with the fallout.
This commit is contained in:
parent
04fde1c550
commit
8a3c66d8a6
Notes:
github-actions[bot]
2025-04-28 10:42:23 +00:00
Author: https://github.com/shannonbooth
Commit: 8a3c66d8a6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4484
20 changed files with 91 additions and 92 deletions
|
@ -12,13 +12,13 @@
|
|||
|
||||
namespace Web::ContentSecurityPolicy {
|
||||
|
||||
class PolicyList final : public JS::Cell {
|
||||
GC_CELL(PolicyList, JS::Cell);
|
||||
class PolicyList final : public GC::Cell {
|
||||
GC_CELL(PolicyList, GC::Cell);
|
||||
GC_DECLARE_ALLOCATOR(PolicyList);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static GC::Ref<PolicyList> create(JS::Realm&, GC::RootVector<GC::Ref<Policy>> const&);
|
||||
[[nodiscard]] static GC::Ref<PolicyList> create(JS::Realm&, Vector<SerializedPolicy> const&);
|
||||
[[nodiscard]] static GC::Ref<PolicyList> create(GC::Heap&, GC::RootVector<GC::Ref<Policy>> const&);
|
||||
[[nodiscard]] static GC::Ref<PolicyList> create(GC::Heap&, Vector<SerializedPolicy> const&);
|
||||
[[nodiscard]] static GC::Ptr<PolicyList> from_object(JS::Object&);
|
||||
|
||||
virtual ~PolicyList() = default;
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
|
||||
[[nodiscard]] HTML::SandboxingFlagSet csp_derived_sandboxing_flags() const;
|
||||
|
||||
[[nodiscard]] GC::Ref<PolicyList> clone(JS::Realm&) const;
|
||||
[[nodiscard]] GC::Ref<PolicyList> clone(GC::Heap&) const;
|
||||
[[nodiscard]] Vector<SerializedPolicy> serialize() const;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue