mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 02:59:45 +00:00
LibJS+LibWeb: Make Console, ConsoleClient & subclasses GC-allocated
These objects had confusing ownership semantics. Let's just throw them all on the GC heap and stop worrying about it.
This commit is contained in:
parent
44659f2f2a
commit
4db1712f90
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/awesomekling
Commit: 4db1712f90
Pull-request: https://github.com/SerenityOS/serenity/pull/24035
Issue: https://github.com/SerenityOS/serenity/issues/14612
13 changed files with 95 additions and 34 deletions
|
@ -55,7 +55,7 @@ void DedicatedWorkerHost::run(JS::NonnullGCPtr<Web::Page> page, Web::HTML::Trans
|
|||
auto inner_settings = Web::HTML::WorkerEnvironmentSettingsObject::setup(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()));
|
||||
m_console = console_object.heap().allocate_without_realm<Web::HTML::WorkerDebugConsoleClient>(console_object.console());
|
||||
VERIFY(m_console);
|
||||
console_object.console().set_client(*m_console);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue