1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibJS: Convert initialize_binding() to ThrowCompletionOr

Also add spec step comments to it while we're here.
This commit is contained in:
Linus Groh 2021-10-09 19:16:24 +01:00
parent 2691c65639
commit ae397541fb
12 changed files with 50 additions and 36 deletions

View file

@ -178,7 +178,7 @@ ThrowCompletionOr<void> VM::destructuring_assignment_evaluation(NonnullRefPtr<Bi
ThrowCompletionOr<void> VM::binding_initialization(FlyString const& target, Value value, Environment* environment, GlobalObject& global_object)
{
if (environment) {
environment->initialize_binding(global_object, target, value);
MUST(environment->initialize_binding(global_object, target, value));
return {};
}
auto reference = resolve_binding(target);