LibWeb: Make HTML::Environment a GC-allocated type

The only subclass was already GC-allocated, so let's hoist the JS::Cell
inheritance up one level. This ends up simplifying a bit of rather
dubious looking code where we were previously slicing ESOs.
This commit is contained in:
Andreas Kling
2024-04-24 11:09:36 +02:00
parent 7fa45c5fdf
commit f60d82eb85
9 changed files with 29 additions and 26 deletions

View File

@@ -16,7 +16,7 @@ class WindowEnvironmentSettingsObject final : public EnvironmentSettingsObject {
JS_DECLARE_ALLOCATOR(WindowEnvironmentSettingsObject);
public:
static void setup(Page&, URL::URL const& creation_url, NonnullOwnPtr<JS::ExecutionContext>, Optional<Environment>, URL::URL top_level_creation_url, Origin top_level_origin);
static void setup(Page&, URL::URL const& creation_url, NonnullOwnPtr<JS::ExecutionContext>, JS::GCPtr<Environment>, URL::URL top_level_creation_url, Origin top_level_origin);
virtual ~WindowEnvironmentSettingsObject() override;