LibJS+LibWeb: Remove now-unused lexical environment override

In our current bytecode interpreter, this override cannot work anyways.
This commit is contained in:
Timothy Flynn 2024-10-29 13:51:55 -04:00 committed by Andreas Kling
commit 7b3a3c2066
Notes: github-actions[bot] 2024-10-30 07:55:28 +00:00
4 changed files with 5 additions and 9 deletions

View file

@ -182,7 +182,7 @@ ALWAYS_INLINE Value Interpreter::do_yield(Value value, Optional<Label> continuat
}
// 16.1.6 ScriptEvaluation ( scriptRecord ), https://tc39.es/ecma262/#sec-runtime-semantics-scriptevaluation
ThrowCompletionOr<Value> Interpreter::run(Script& script_record, JS::GCPtr<Environment> lexical_environment_override)
ThrowCompletionOr<Value> Interpreter::run(Script& script_record)
{
auto& vm = this->vm();
@ -207,10 +207,6 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record, JS::GCPtr<Envir
// 7. Set the LexicalEnvironment of scriptContext to globalEnv.
script_context->lexical_environment = &global_environment;
// Non-standard: Override the lexical environment if requested.
if (lexical_environment_override)
script_context->lexical_environment = lexical_environment_override;
// 8. Set the PrivateEnvironment of scriptContext to null.
// NOTE: This isn't in the spec, but we require it.