summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-28 22:12:42 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-29 03:24:54 +0200
commit49fd92d92a8673f5fa45049ffd5c2d3f7c5ec5ff (patch)
tree1f465f4a255d48db576576ddd6ba2f689e5dc236 /Userland/Libraries/LibJS/Runtime
parent6e973ce69b2205779b9999e15c45d95a015f15b3 (diff)
downloadserenity-49fd92d92a8673f5fa45049ffd5c2d3f7c5ec5ff.zip
LibJS: Make JS_OBJECT and JS_ENVIRONMENT forward to JS_CELL
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Environment.h5
-rw-r--r--Userland/Libraries/LibJS/Runtime/Object.h8
2 files changed, 2 insertions, 11 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Environment.h b/Userland/Libraries/LibJS/Runtime/Environment.h
index f25753aefa..9073eeab05 100644
--- a/Userland/Libraries/LibJS/Runtime/Environment.h
+++ b/Userland/Libraries/LibJS/Runtime/Environment.h
@@ -17,10 +17,7 @@ struct Variable {
DeclarationKind declaration_kind;
};
-#define JS_ENVIRONMENT(class_, base_class) \
-public: \
- using Base = base_class; \
- virtual StringView class_name() const override { return #class_##sv; }
+#define JS_ENVIRONMENT(class_, base_class) JS_CELL(class_, base_class)
class Environment : public Cell {
JS_CELL(Environment, Cell);
diff --git a/Userland/Libraries/LibJS/Runtime/Object.h b/Userland/Libraries/LibJS/Runtime/Object.h
index 13f6bd9a70..a2a1ebec7a 100644
--- a/Userland/Libraries/LibJS/Runtime/Object.h
+++ b/Userland/Libraries/LibJS/Runtime/Object.h
@@ -25,13 +25,7 @@
namespace JS {
-#define JS_OBJECT(class_, base_class) \
-public: \
- using Base = base_class; \
- virtual StringView class_name() const override \
- { \
- return #class_##sv; \
- }
+#define JS_OBJECT(class_, base_class) JS_CELL(class_, base_class)
struct PrivateElement {
enum class Kind {