mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:55:08 +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:
parent
745b0b27fd
commit
2e92c2e5e1
6 changed files with 95 additions and 4 deletions
|
@ -121,7 +121,7 @@ Value ConsoleObject::count(Interpreter& interpreter)
|
|||
else
|
||||
counter_name = interpreter.argument(0).to_string();
|
||||
|
||||
auto& counters = interpreter.console_counters();
|
||||
auto& counters = interpreter.console().counters();
|
||||
auto counter_value = counters.get(counter_name);
|
||||
|
||||
if (counter_value.has_value()) {
|
||||
|
@ -142,7 +142,7 @@ Value ConsoleObject::count_reset(Interpreter& interpreter)
|
|||
else
|
||||
counter_name = interpreter.argument(0).to_string();
|
||||
|
||||
auto& counters = interpreter.console_counters();
|
||||
auto& counters = interpreter.console().counters();
|
||||
|
||||
if (counters.contains(counter_name)) {
|
||||
counters.remove(counter_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue