1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

LibWeb: Let Document have a direct GCPtr to its containing Web::Page

With this change, Document now always has a Web::Page. This means we no
longer rely on the breakable link between Document and BrowsingContext
to find a relevant Web::Page.

Fixes #22290
This commit is contained in:
Andreas Kling 2023-12-15 13:43:39 +01:00
parent b2b5297997
commit 70193c0009
12 changed files with 35 additions and 10 deletions

View file

@ -55,7 +55,7 @@ void DedicatedWorkerHost::run()
// 9. Set up a worker environment settings object with realm execution context,
// outside settings, and unsafeWorkerCreationTime, and let inside settings be the result.
auto inner_settings = Web::HTML::WorkerEnvironmentSettingsObject::setup(move(realm_execution_context));
auto inner_settings = Web::HTML::WorkerEnvironmentSettingsObject::setup(m_page, move(realm_execution_context));
auto& console_object = *inner_settings->realm().intrinsics().console_object();
m_console = adopt_ref(*new Web::HTML::WorkerDebugConsoleClient(console_object.console()));