summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-09 17:07:32 +0100
committerLinus Groh <mail@linusgroh.de>2021-10-09 21:53:47 +0100
commitfbb176c926e84d0ed768700ab2af0449de0457ed (patch)
tree5ff4b12a7c2a12895b5aeec24efe631c889fc5dc /Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
parent617d3cd3d3d03fc5c2af8cfe71d8c34be2031bc0 (diff)
downloadserenity-fbb176c926e84d0ed768700ab2af0449de0457ed.zip
LibJS: Convert has_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
index d65080792f..1bdd1386da 100644
--- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
@@ -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);