1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

LibJS: Implement ShadowRealm.prototype.evaluate()

This commit is contained in:
Linus Groh 2021-10-13 21:40:33 +01:00
parent b0ee7f38d0
commit c70784bb82
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());