mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:38:10 +00:00
LibJS: Fix that vm.in_strict_mode was propagated to eval and functions
For eval it depends on the CallerMode and for a created function it depends on the function itself.
This commit is contained in:
parent
a6263150be
commit
a394aa5830
2 changed files with 2 additions and 1 deletions
|
@ -399,6 +399,7 @@ Value perform_eval(Value x, GlobalObject& caller_realm, CallerMode strict_caller
|
|||
return interpreter.execute_statement(caller_realm, program).value_or(js_undefined());
|
||||
|
||||
TemporaryChange scope_change(vm.running_execution_context().lexical_environment, static_cast<Environment*>(&caller_realm.environment()));
|
||||
TemporaryChange scope_change_strict(vm.running_execution_context().is_strict_mode, strict_caller == CallerMode::Strict);
|
||||
return interpreter.execute_statement(caller_realm, program).value_or(js_undefined());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue