mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
LibJS: Convert get_binding_value() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
7652138ce0
commit
f35e268024
Notes:
sideshowbarker
2024-07-18 02:52:16 +09:00
Author: https://github.com/linusg
Commit: f35e268024
Pull-request: https://github.com/SerenityOS/serenity/pull/10413
Reviewed-by: https://github.com/IdanHo ✅
11 changed files with 43 additions and 27 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue