mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +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
|
@ -111,7 +111,7 @@ Value FunctionExpression::execute(Interpreter& interpreter, GlobalObject& global
|
|||
func_env->create_immutable_binding(global_object, name(), false);
|
||||
}
|
||||
|
||||
auto closure = OrdinaryFunctionObject::create(global_object, name(), body(), parameters(), function_length(), func_env, kind(), is_strict_mode() || interpreter.vm().in_strict_mode(), is_arrow_function());
|
||||
auto closure = OrdinaryFunctionObject::create(global_object, name(), body(), parameters(), function_length(), func_env, kind(), is_strict_mode(), is_arrow_function());
|
||||
|
||||
if (has_identifier)
|
||||
func_env->initialize_binding(global_object, name(), closure);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue