diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/EnvironmentRecord.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/EnvironmentRecord.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/EnvironmentRecord.cpp b/Userland/Libraries/LibJS/Runtime/EnvironmentRecord.cpp new file mode 100644 index 0000000000..4e2329c83e --- /dev/null +++ b/Userland/Libraries/LibJS/Runtime/EnvironmentRecord.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <LibJS/Runtime/EnvironmentRecord.h> +#include <LibJS/Runtime/VM.h> + +namespace JS { + +EnvironmentRecord::EnvironmentRecord(EnvironmentRecord* parent) + : Object(vm().environment_record_shape()) + , m_parent(parent) +{ +} + +EnvironmentRecord::EnvironmentRecord(GlobalObjectTag tag) + : Object(tag) +{ +} + +void EnvironmentRecord::visit_edges(Visitor& visitor) +{ + Base::visit_edges(visitor); + visitor.visit(m_parent); +} + +} |