mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
f87041bf3a
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibJS/Runtime/Object.h>
|
|
|
|
namespace JS {
|
|
|
|
class ConsoleObject final : public Object {
|
|
JS_OBJECT(ConsoleObject, Object);
|
|
GC_DECLARE_ALLOCATOR(ConsoleObject);
|
|
|
|
public:
|
|
virtual void initialize(Realm&) override;
|
|
virtual ~ConsoleObject() override;
|
|
|
|
Console& console() { return *m_console; }
|
|
|
|
private:
|
|
explicit ConsoleObject(Realm&);
|
|
virtual void visit_edges(Visitor&) override;
|
|
|
|
JS_DECLARE_NATIVE_FUNCTION(assert_);
|
|
JS_DECLARE_NATIVE_FUNCTION(clear);
|
|
JS_DECLARE_NATIVE_FUNCTION(debug);
|
|
JS_DECLARE_NATIVE_FUNCTION(error);
|
|
JS_DECLARE_NATIVE_FUNCTION(info);
|
|
JS_DECLARE_NATIVE_FUNCTION(log);
|
|
JS_DECLARE_NATIVE_FUNCTION(trace);
|
|
JS_DECLARE_NATIVE_FUNCTION(warn);
|
|
JS_DECLARE_NATIVE_FUNCTION(table);
|
|
JS_DECLARE_NATIVE_FUNCTION(dir);
|
|
JS_DECLARE_NATIVE_FUNCTION(count);
|
|
JS_DECLARE_NATIVE_FUNCTION(count_reset);
|
|
JS_DECLARE_NATIVE_FUNCTION(group);
|
|
JS_DECLARE_NATIVE_FUNCTION(group_collapsed);
|
|
JS_DECLARE_NATIVE_FUNCTION(group_end);
|
|
JS_DECLARE_NATIVE_FUNCTION(time);
|
|
JS_DECLARE_NATIVE_FUNCTION(time_log);
|
|
JS_DECLARE_NATIVE_FUNCTION(time_end);
|
|
|
|
GC::Ptr<Console> m_console;
|
|
};
|
|
|
|
}
|