mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibJS: Visit GC allocated members of ModuleEnvironment
This commit is contained in:
parent
a4ccdce011
commit
93464d4e41
2 changed files with 9 additions and 0 deletions
|
@ -126,4 +126,11 @@ Optional<ModuleEnvironment::BindingAndIndex> ModuleEnvironment::find_binding_and
|
||||||
return DeclarativeEnvironment::find_binding_and_index(name);
|
return DeclarativeEnvironment::find_binding_and_index(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ModuleEnvironment::visit_edges(Visitor& visitor)
|
||||||
|
{
|
||||||
|
Base::visit_edges(visitor);
|
||||||
|
for (auto& indirect_binding : m_indirect_bindings)
|
||||||
|
visitor.visit(indirect_binding.module);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,8 @@ public:
|
||||||
private:
|
private:
|
||||||
explicit ModuleEnvironment(Environment* outer_environment);
|
explicit ModuleEnvironment(Environment* outer_environment);
|
||||||
|
|
||||||
|
virtual void visit_edges(Visitor&) override;
|
||||||
|
|
||||||
struct IndirectBinding {
|
struct IndirectBinding {
|
||||||
FlyString name;
|
FlyString name;
|
||||||
Module* module;
|
Module* module;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue