1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 20:25:07 +00:00

LibJS: Convert has_binding() to ThrowCompletionOr

Also add spec step comments to it while we're here.
This commit is contained in:
Linus Groh 2021-10-09 17:07:32 +01:00
parent 617d3cd3d3
commit fbb176c926
11 changed files with 50 additions and 29 deletions

View file

@ -357,7 +357,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
}
for (auto const& parameter_name : parameter_names) {
if (environment->has_binding(parameter_name))
if (MUST(environment->has_binding(parameter_name)))
continue;
environment->create_mutable_binding(global_object(), parameter_name, false);