mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +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
|
@ -680,10 +680,10 @@ void PageClient::initialize_js_console(Web::DOM::Document& document)
|
|||
{
|
||||
auto& realm = document.realm();
|
||||
auto console_object = realm.intrinsics().console_object();
|
||||
auto console_client = make<WebContentConsoleClient>(console_object->console(), document.realm(), *this);
|
||||
auto console_client = heap().allocate_without_realm<WebContentConsoleClient>(console_object->console(), document.realm(), *this);
|
||||
console_object->console().set_client(*console_client);
|
||||
|
||||
m_console_clients.set(document, move(console_client));
|
||||
m_console_clients.set(document, console_client);
|
||||
}
|
||||
|
||||
void PageClient::destroy_js_console(Web::DOM::Document& document)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue