mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
LibJS: Convert set_mutable_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
ae397541fb
commit
7652138ce0
Notes:
sideshowbarker
2024-07-18 02:52:20 +09:00
Author: https://github.com/linusg
Commit: 7652138ce0
Pull-request: https://github.com/SerenityOS/serenity/pull/10413
Reviewed-by: https://github.com/IdanHo ✅
11 changed files with 68 additions and 52 deletions
|
@ -534,7 +534,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
|
|||
|
||||
for (auto& declaration : functions_to_initialize) {
|
||||
auto* function = ECMAScriptFunctionObject::create(global_object(), declaration.name(), declaration.body(), declaration.parameters(), declaration.function_length(), lex_environment, declaration.kind(), declaration.is_strict_mode(), declaration.might_need_arguments_object(), declaration.contains_direct_call_to_eval());
|
||||
var_environment->set_mutable_binding(global_object(), declaration.name(), function, false);
|
||||
MUST(var_environment->set_mutable_binding(global_object(), declaration.name(), function, false));
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue