1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +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

@ -528,7 +528,7 @@ ThrowCompletionOr<Value> perform_eval(Value x, GlobalObject& caller_realm, Calle
auto& interpreter = vm.interpreter();
TemporaryChange scope_change_strict(vm.running_execution_context().is_strict_mode, strict_eval);
// Note: We specifically use evaluate_statements here since we don't want to use global_declaration_instantiation from Program::execute.
// FIXME: We need to use evaluate_statements() here because Program::execute() calls global_declaration_instantiation() when it shouldn't
auto eval_result = program->evaluate_statements(interpreter, caller_realm);
if (auto* exception = vm.exception())