diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-28 14:20:06 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-28 16:36:56 +0100 |
commit | 867ad039959e92b05b728f7a45d6793c34aa853f (patch) | |
tree | 432303cfbedf9b05f37d0349b4a3b5e4779218ad /Userland/Services | |
parent | 78eca3ae64155fbad5035e3254941a62f0de4e1f (diff) | |
download | serenity-867ad039959e92b05b728f7a45d6793c34aa853f.zip |
LibJS: Move Console ownership from GlobalObject to ConsoleObject
GlobalObject is now a regular object with no special properties :^)
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index 90bb582e09..901f56bd33 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -15,6 +15,7 @@ #include <LibJS/Heap/Heap.h> #include <LibJS/Interpreter.h> #include <LibJS/Parser.h> +#include <LibJS/Runtime/ConsoleObject.h> #include <LibWeb/Bindings/MainThreadVM.h> #include <LibWeb/Cookie/ParsedCookie.h> #include <LibWeb/DOM/Document.h> @@ -389,9 +390,10 @@ void ConnectionFromClient::initialize_js_console(Badge<PageHost>) if (m_interpreter.ptr() == interpreter.ptr()) return; + auto& console_object = *interpreter->realm().intrinsics().console_object(); m_interpreter = interpreter; - m_console_client = make<WebContentConsoleClient>(interpreter->realm().global_object().console(), interpreter, *this); - interpreter->realm().global_object().console().set_client(*m_console_client.ptr()); + m_console_client = make<WebContentConsoleClient>(console_object.console(), interpreter, *this); + console_object.console().set_client(*m_console_client.ptr()); } void ConnectionFromClient::js_console_input(String const& js_source) |