1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 01:05:08 +00:00

LibWeb+LibJS: Let JS::Realm::HostDefined objects mark things during GC

This allows us to mark the HTML::Window from our window environment
settings object.
This commit is contained in:
Andreas Kling 2022-09-01 21:22:02 +02:00
parent 2ff7e37048
commit abfb73f2e7
4 changed files with 18 additions and 3 deletions

View file

@ -6,8 +6,8 @@
#pragma once
#include <LibJS/Heap/Cell.h>
#include <LibWeb/HTML/Scripting/Environments.h>
#include <LibWeb/HTML/Window.h>
namespace Web::HTML {
@ -15,7 +15,7 @@ class WindowEnvironmentSettingsObject final : public EnvironmentSettingsObject {
public:
static void setup(AK::URL const& creation_url, NonnullOwnPtr<JS::ExecutionContext>, Optional<Environment>, AK::URL top_level_creation_url, Origin top_level_origin);
virtual ~WindowEnvironmentSettingsObject() override = default;
virtual ~WindowEnvironmentSettingsObject() override;
virtual JS::GCPtr<DOM::Document> responsible_document() override;
virtual String api_url_character_encoding() override;
@ -26,7 +26,9 @@ public:
private:
WindowEnvironmentSettingsObject(Window&, NonnullOwnPtr<JS::ExecutionContext>);
WeakPtr<Window> m_window;
virtual void visit_edges(JS::Cell::Visitor&) override;
JS::GCPtr<Window> m_window;
};
}