LibJS: Remove unnecessary GlobalObject pointer from Environment

As it turns out, we didn't actually need this pointer. :^)
This commit is contained in:
Andreas Kling 2022-01-31 13:00:02 +01:00
parent 4a51165f5f
commit fc04465fa3
Notes: sideshowbarker 2024-07-17 20:22:04 +09:00
8 changed files with 17 additions and 32 deletions

View file

@ -328,7 +328,7 @@ Completion SourceTextModule::initialize_environment(VM& vm)
auto& global_object = realm().global_object();
// 5. Let env be NewModuleEnvironment(realm.[[GlobalEnv]]).
auto* environment = vm.heap().allocate<ModuleEnvironment>(global_object, &realm().global_environment());
auto* environment = vm.heap().allocate_without_global_object<ModuleEnvironment>(&realm().global_environment());
// 6. Set module.[[Environment]] to env.
set_environment(environment);