mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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
Notes:
sideshowbarker
2024-07-18 08:39:39 +09:00
Author: https://github.com/davidot
Commit: a394aa5830
Pull-request: https://github.com/SerenityOS/serenity/pull/8667
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/linusg
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