mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibJS: Convert get_binding_value() 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:16 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/f35e2680241 Pull-request: https://github.com/SerenityOS/serenity/pull/10413 Reviewed-by: https://github.com/IdanHo ✅
@@ -464,7 +464,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
|
||||
if (!parameter_names.contains(name) || function_names.contains(name))
|
||||
initial_value = js_undefined();
|
||||
else
|
||||
initial_value = environment->get_binding_value(global_object(), name, false);
|
||||
initial_value = MUST(environment->get_binding_value(global_object(), name, false));
|
||||
|
||||
MUST(var_environment->initialize_binding(global_object(), name, initial_value));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user