mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
LibJS: Convert create_immutable_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
4baf3a91e8
commit
2691c65639
10 changed files with 29 additions and 22 deletions
|
@ -678,7 +678,7 @@ ThrowCompletionOr<void> eval_declaration_instantiation(VM& vm, GlobalObject& glo
|
|||
program.for_each_lexically_scoped_declaration([&](Declaration const& declaration) {
|
||||
declaration.for_each_bound_name([&](auto const& name) {
|
||||
if (declaration.is_constant_declaration())
|
||||
lexical_environment->create_immutable_binding(global_object, name, true);
|
||||
(void)lexical_environment->create_immutable_binding(global_object, name, true);
|
||||
else
|
||||
(void)lexical_environment->create_mutable_binding(global_object, name, false);
|
||||
if (vm.exception())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue