summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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