Преглед на файлове

WebContent: Use ConsoleGlobalObject for the console's global object :^)

Seems like this got missed when ESOs were implemented. Now we can use
`$0` again!
Sam Atkins преди 3 години
родител
ревизия
8296dd9955
променени са 2 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 1
      Userland/Services/WebContent/WebContentConsoleClient.cpp
  2. 0 1
      Userland/Services/WebContent/WebContentConsoleClient.h

+ 1 - 1
Userland/Services/WebContent/WebContentConsoleClient.cpp

@@ -35,7 +35,7 @@ WebContentConsoleClient::WebContentConsoleClient(JS::Console& console, WeakPtr<J
     console_global_object->initialize_global_object();
     vm.pop_execution_context();
 
-    m_console_global_object = JS::make_handle(console_global_object);
+    m_interpreter->realm().set_global_object(*console_global_object);
 }
 
 void WebContentConsoleClient::handle_input(String const& js_source)

+ 0 - 1
Userland/Services/WebContent/WebContentConsoleClient.h

@@ -29,7 +29,6 @@ private:
 
     ConnectionFromClient& m_client;
     WeakPtr<JS::Interpreter> m_interpreter;
-    JS::Handle<ConsoleGlobalObject> m_console_global_object;
 
     void clear_output();
     void print_html(String const& line);