mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
Ladybird: Retrieve console object from the realm's intrinsic
See: 867ad03
This commit is contained in:
parent
ced442f426
commit
1e7d4bc089
Notes:
sideshowbarker
2024-07-17 18:46:30 +09:00
Author: https://github.com/Lubrsi
Commit: 1e7d4bc089
Pull-request: https://github.com/SerenityOS/serenity/pull/16583
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/linusg
1 changed files with 4 additions and 4 deletions
|
@ -32,6 +32,7 @@
|
|||
#include <LibGfx/PNGWriter.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Runtime/ConsoleObject.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
|
@ -187,10 +188,9 @@ public:
|
|||
|
||||
m_interpreter = interpreter;
|
||||
|
||||
auto& realm = interpreter->realm();
|
||||
auto& global_object = realm.global_object();
|
||||
m_console_client = make<Ladybird::ConsoleClient>(global_object.console(), interpreter, m_view);
|
||||
global_object.console().set_client(*m_console_client.ptr());
|
||||
auto& console_object = *interpreter->realm().intrinsics().console_object();
|
||||
m_console_client = make<Ladybird::ConsoleClient>(console_object.console(), interpreter, m_view);
|
||||
console_object.console().set_client(*m_console_client.ptr());
|
||||
}
|
||||
|
||||
virtual void page_did_change_selection() override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue