LibJS: Implement ShadowRealm.prototype.evaluate()

This commit is contained in:
Linus Groh 2021-10-13 21:40:33 +01:00
commit c70784bb82
Notes: sideshowbarker 2024-07-18 02:45:44 +09:00
9 changed files with 260 additions and 1 deletions

View file

@ -150,6 +150,9 @@ Value BlockStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
Value Program::execute(Interpreter& interpreter, GlobalObject& global_object) const
{
// FIXME: This tries to be "ScriptEvaluation" and "evaluating scriptBody" at once. It shouldn't.
// Clean this up and update perform_eval() / perform_shadow_realm_eval()
InterpreterNodeScope node_scope { interpreter, *this };
VERIFY(interpreter.lexical_environment() && interpreter.lexical_environment()->is_global_environment());