mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS: Convert has_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 02:52:35 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/fbb176c926e Pull-request: https://github.com/SerenityOS/serenity/pull/10413 Reviewed-by: https://github.com/IdanHo ✅
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user