diff --git a/Services/WebContent/PageClient.cpp b/Services/WebContent/PageClient.cpp index 1c74e087bf..da4d33f44d 100644 --- a/Services/WebContent/PageClient.cpp +++ b/Services/WebContent/PageClient.cpp @@ -87,6 +87,7 @@ void PageClient::visit_edges(JS::Cell::Visitor& visitor) { Base::visit_edges(visitor); visitor.visit(m_page); + visitor.visit(m_top_level_document_console_client); if (m_webdriver) m_webdriver->visit_edges(visitor); diff --git a/Services/WebContent/PageClient.h b/Services/WebContent/PageClient.h index 4a9d632962..117227816f 100644 --- a/Services/WebContent/PageClient.h +++ b/Services/WebContent/PageClient.h @@ -214,9 +214,7 @@ private: RefPtr m_webdriver; RefPtr m_web_ui; - WeakPtr m_top_level_document_console_client; - - GC::Root m_console_global_object; + GC::Ptr m_top_level_document_console_client; RefPtr m_paint_refresh_timer; diff --git a/Services/WebContent/WebContentConsoleClient.h b/Services/WebContent/WebContentConsoleClient.h index 09ea03258d..69c54b049b 100644 --- a/Services/WebContent/WebContentConsoleClient.h +++ b/Services/WebContent/WebContentConsoleClient.h @@ -16,8 +16,7 @@ namespace WebContent { -class WebContentConsoleClient : public JS::ConsoleClient - , public Weakable { +class WebContentConsoleClient : public JS::ConsoleClient { GC_CELL(WebContentConsoleClient, JS::ConsoleClient); GC_DECLARE_ALLOCATOR(WebContentConsoleClient);