mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Make ResolveBinding() produce strict References in strict mode
This commit is contained in:
parent
db334b50d0
commit
57db058652
1 changed files with 2 additions and 2 deletions
|
@ -400,9 +400,9 @@ Reference VM::resolve_binding(GlobalObject& global_object, FlyString const& name
|
|||
for (auto* environment = lexical_environment(); environment && environment->outer_environment(); environment = environment->outer_environment()) {
|
||||
auto possible_match = environment->get_from_environment(name);
|
||||
if (possible_match.has_value())
|
||||
return Reference { *environment, name };
|
||||
return Reference { *environment, name, in_strict_mode() };
|
||||
}
|
||||
return Reference { global_object.environment(), name };
|
||||
return Reference { global_object.environment(), name, in_strict_mode() };
|
||||
}
|
||||
|
||||
Value VM::construct(FunctionObject& function, FunctionObject& new_target, Optional<MarkedValueList> arguments)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue