summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2022-08-28 18:07:38 +0100
committerAndrew Kaster <andrewdkaster@gmail.com>2022-12-25 07:58:58 -0700
commit1e7d4bc089a016b2cb673b0dd77b010119972fd8 (patch)
tree23e2d72d9070a369de77d07ee55f30ccde6be2ea
parentced442f426c75ecb569c015ba7e816b481febc09 (diff)
downloadserenity-1e7d4bc089a016b2cb673b0dd77b010119972fd8.zip
Ladybird: Retrieve console object from the realm's intrinsic
See: https://github.com/SerenityOS/serenity/commit/867ad03
-rw-r--r--Ladybird/WebView.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Ladybird/WebView.cpp b/Ladybird/WebView.cpp
index 5c5d06e8ed..d9b3593d4f 100644
--- a/Ladybird/WebView.cpp
+++ b/Ladybird/WebView.cpp
@@ -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