Revert "LibJS: Shrink ExecutionContext by replacing ScriptOrModule …"

… with Cell*.

This reverts commit d3495c62a7.
This commit is contained in:
Tim Ledbetter
2026-03-11 20:35:43 +00:00
committed by Tim Ledbetter
parent ba8d63556f
commit 36f74ba96c
Notes: github-actions[bot] 2026-03-11 23:14:19 +00:00
16 changed files with 50 additions and 60 deletions

View File

@@ -548,7 +548,7 @@ ThrowCompletionOr<void> SourceTextModule::initialize_environment(VM& vm)
m_execution_context->realm = &this->realm();
// 12. Set the ScriptOrModule of moduleContext to module.
m_execution_context->script_or_module = this;
m_execution_context->script_or_module = GC::Ref<Module>(*this);
// 13. Set the VariableEnvironment of moduleContext to module.[[Environment]].
m_execution_context->variable_environment = environment;
@@ -801,7 +801,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, GC::Ptr<Promise
module_context->realm = &realm();
// 4. Set the ScriptOrModule of moduleContext to module.
module_context->script_or_module = this;
module_context->script_or_module = GC::Ref<Module>(*this);
// 5. Assert: module has been linked and declarations in its module environment have been instantiated.
VERIFY(m_status != ModuleStatus::New);