mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +00:00
LibJS: Remove ConsoleMessage from LibJS
We don't need to store the past messages in LibJS. We'll implement a way to let LibJS users expand the vanilla Console.
This commit is contained in:
parent
7dd49047f3
commit
046f9cf115
3 changed files with 20 additions and 84 deletions
|
@ -33,22 +33,6 @@
|
|||
|
||||
namespace JS {
|
||||
|
||||
enum class ConsoleMessageKind {
|
||||
Clear,
|
||||
Count,
|
||||
Debug,
|
||||
Error,
|
||||
Info,
|
||||
Log,
|
||||
Trace,
|
||||
Warn,
|
||||
};
|
||||
|
||||
struct ConsoleMessage {
|
||||
ConsoleMessageKind kind;
|
||||
String text;
|
||||
};
|
||||
|
||||
class Console {
|
||||
AK_MAKE_NONCOPYABLE(Console);
|
||||
AK_MAKE_NONMOVABLE(Console);
|
||||
|
@ -70,17 +54,12 @@ public:
|
|||
|
||||
void trace(String title);
|
||||
|
||||
unsigned count(String label = "default");
|
||||
bool count_reset(String label = "default");
|
||||
|
||||
void add_message(ConsoleMessageKind, String text);
|
||||
|
||||
AK::Function<void(ConsoleMessage&)> on_new_message;
|
||||
void count(String label = "default");
|
||||
void count_reset(String label = "default");
|
||||
|
||||
private:
|
||||
Interpreter& m_interpreter;
|
||||
|
||||
Vector<ConsoleMessage> m_messages;
|
||||
HashMap<String, unsigned> m_counters;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue