mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibJS: Remove unnecessary GlobalObject pointer from Environment
As it turns out, we didn't actually need this pointer. :^)
This commit is contained in:
parent
4a51165f5f
commit
fc04465fa3
8 changed files with 17 additions and 32 deletions
|
@ -1,12 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Environment.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
|
@ -15,16 +14,9 @@ Environment::Environment(Environment* outer_environment)
|
|||
{
|
||||
}
|
||||
|
||||
void Environment::initialize(GlobalObject& global_object)
|
||||
{
|
||||
m_global_object = &global_object;
|
||||
Cell::initialize(global_object);
|
||||
}
|
||||
|
||||
void Environment::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Cell::visit_edges(visitor);
|
||||
visitor.visit(m_global_object);
|
||||
visitor.visit(m_outer_environment);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue