summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Environment.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-28 22:11:20 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-29 03:24:54 +0200
commit6e973ce69b2205779b9999e15c45d95a015f15b3 (patch)
tree3b5da1efe4c3a4f11e1577c58b2e280ff2afefc9 /Userland/Libraries/LibJS/Runtime/Environment.h
parent94f016b363c2ee969637217d73890d8dd5d7f3e5 (diff)
downloadserenity-6e973ce69b2205779b9999e15c45d95a015f15b3.zip
LibJS: Add JS_CELL macro and use it in all JS::Cell subclasses
This is similar to what we already had with JS_OBJECT (and also JS_ENVIRONMENT) but sits at the top of the Cell inheritance hierarchy.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Environment.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Environment.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Environment.h b/Userland/Libraries/LibJS/Runtime/Environment.h
index 6ff74a4a74..f25753aefa 100644
--- a/Userland/Libraries/LibJS/Runtime/Environment.h
+++ b/Userland/Libraries/LibJS/Runtime/Environment.h
@@ -23,6 +23,8 @@ public: \
virtual StringView class_name() const override { return #class_##sv; }
class Environment : public Cell {
+ JS_CELL(Environment, Cell);
+
public:
virtual bool has_this_binding() const { return false; }
virtual ThrowCompletionOr<Value> get_this_binding(VM&) const { return Value {}; }
@@ -48,8 +50,6 @@ public:
template<typename T>
bool fast_is() const = delete;
- virtual StringView class_name() const override { return "Environment"sv; }
-
// This flag is set on the entire variable environment chain when direct eval() is performed.
// It is used to disable non-local variable access caching.
bool is_permanently_screwed_by_eval() const { return m_permanently_screwed_by_eval; }