mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibJS: Move Console from Interpreter to GlobalObject
Each JS global object has its own "console", so it makes more sense to store it in GlobalObject. We'll need some smartness later to bundle up console messages from all the different frames that make up a page later, but this works for now.
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibJS/AST.h>
|
||||
#include <LibJS/Console.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/DeferGC.h>
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
@@ -87,9 +86,6 @@ public:
|
||||
Heap& heap() { return vm().heap(); }
|
||||
Exception* exception() { return vm().exception(); }
|
||||
|
||||
Console& console() { return m_console; }
|
||||
const Console& console() const { return m_console; }
|
||||
|
||||
bool in_strict_mode() const
|
||||
{
|
||||
// FIXME: This implementation is bogus; strict mode is per-file or per-function, not per-block!
|
||||
@@ -121,8 +117,6 @@ private:
|
||||
|
||||
Handle<Object> m_global_object;
|
||||
|
||||
Console m_console;
|
||||
|
||||
Vector<ScopeFrame> m_scope_stack;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user