mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
LibJS: Add EnvironmentRecord::global_object()
Our environment records are currently weird in that they inherit from Object, but don't have a connection to the global object. I'd like to remove this inheritance, and the first step is giving them their own pointer to the global object.
This commit is contained in:
parent
9d49a5478a
commit
f1e1d9dd74
3 changed files with 15 additions and 0 deletions
|
@ -15,6 +15,12 @@ EnvironmentRecord::EnvironmentRecord(EnvironmentRecord* outer_environment)
|
|||
{
|
||||
}
|
||||
|
||||
void EnvironmentRecord::initialize(GlobalObject& global_object)
|
||||
{
|
||||
m_global_object = &global_object;
|
||||
Base::initialize(global_object);
|
||||
}
|
||||
|
||||
void EnvironmentRecord::visit_edges(Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue