mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02: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:
Notes:
sideshowbarker
2024-07-17 20:33:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/abfb73f2e7 Pull-request: https://github.com/SerenityOS/serenity/pull/14816 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg ✅
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user