mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibJS: Remove Console's reliance on GlobalObject
This was not being used for anything meaningful, just store a reference to the VM directly.
This commit is contained in:
parent
9d14ed6c14
commit
d35f53c344
3 changed files with 21 additions and 36 deletions
|
@ -53,14 +53,12 @@ public:
|
|||
Vector<String> stack;
|
||||
};
|
||||
|
||||
explicit Console(GlobalObject&);
|
||||
explicit Console(VM&);
|
||||
|
||||
void set_client(ConsoleClient& client) { m_client = &client; }
|
||||
|
||||
GlobalObject& global_object() { return m_global_object; }
|
||||
GlobalObject const& global_object() const { return m_global_object; }
|
||||
VM& vm() const { return m_vm; }
|
||||
|
||||
VM& vm();
|
||||
MarkedVector<Value> vm_arguments();
|
||||
|
||||
HashMap<String, unsigned>& counters() { return m_counters; }
|
||||
|
@ -89,7 +87,7 @@ private:
|
|||
ThrowCompletionOr<String> value_vector_to_string(MarkedVector<Value> const&);
|
||||
ThrowCompletionOr<String> format_time_since(Core::ElapsedTimer timer);
|
||||
|
||||
GlobalObject& m_global_object;
|
||||
VM& m_vm;
|
||||
ConsoleClient* m_client { nullptr };
|
||||
|
||||
HashMap<String, unsigned> m_counters;
|
||||
|
@ -116,11 +114,6 @@ public:
|
|||
protected:
|
||||
virtual ~ConsoleClient() = default;
|
||||
|
||||
VM& vm();
|
||||
|
||||
GlobalObject& global_object() { return m_console.global_object(); }
|
||||
GlobalObject const& global_object() const { return m_console.global_object(); }
|
||||
|
||||
Console& m_console;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue