1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibJS: Start implementing a Console class for the interpreter

The goal is to start factoring out core ConsoleObject functionality and
to make ConsoleObject only a JS wrapper around Console.
This commit is contained in:
Emanuele Torre 2020-05-01 14:40:43 +02:00 committed by Andreas Kling
parent 745b0b27fd
commit 2e92c2e5e1
6 changed files with 95 additions and 4 deletions

View file

@ -30,6 +30,7 @@
#include <AK/HashMap.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibJS/Console.h>
#include <LibJS/Forward.h>
#include <LibJS/Heap/Heap.h>
#include <LibJS/Runtime/Exception.h>
@ -163,7 +164,7 @@ public:
Value last_value() const { return m_last_value; }
HashMap<String, unsigned>& console_counters() { return m_console_counters; }
Console& console() { return m_console; }
private:
Interpreter();
@ -181,7 +182,7 @@ private:
ScopeType m_unwind_until { ScopeType::None };
HashMap<String, unsigned> m_console_counters;
Console m_console;
};
}