LibJS: Convert Object::set() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-03 00:32:43 +01:00
commit 1d45541278
Notes: sideshowbarker 2024-07-18 03:07:37 +09:00
18 changed files with 89 additions and 188 deletions

View file

@ -489,9 +489,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::assign)
auto prop_value = TRY_OR_DISCARD(from->get(property_name));
// b. Perform ? Set(to, nextKey, propValue, true).
to->set(property_name, prop_value, Object::ShouldThrowExceptions::Yes);
if (vm.exception())
return {};
TRY_OR_DISCARD(to->set(property_name, prop_value, Object::ShouldThrowExceptions::Yes));
}
}