mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
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:
@@ -263,13 +263,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> Document::create_and_initialize(
|
||||
browsing_context->page(),
|
||||
creation_url.value(),
|
||||
move(realm_execution_context),
|
||||
navigation_params.reserved_environment.visit(
|
||||
// FIXME: Environment is virtual. We *really* shouldn't be slicing it here
|
||||
[](Empty const&) -> Optional<HTML::Environment> { return {}; },
|
||||
[](HTML::Environment* env) -> Optional<HTML::Environment> { if (env) return *env; return {}; },
|
||||
[](JS::NonnullGCPtr<HTML::EnvironmentSettingsObject>) -> Optional<HTML::Environment> {
|
||||
TODO();
|
||||
}),
|
||||
navigation_params.reserved_environment,
|
||||
top_level_creation_url.value(),
|
||||
top_level_origin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user