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

LibJS: Convert get_method to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-09-23 21:24:51 +03:00
parent ab594e5f2f
commit ee825d6d9e
10 changed files with 47 additions and 92 deletions

View file

@ -108,9 +108,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
auto this_arg = vm.argument(2);
auto items = vm.argument(0);
auto using_iterator = items.get_method(global_object, *vm.well_known_symbol_iterator());
if (vm.exception())
return {};
auto using_iterator = TRY_OR_DISCARD(items.get_method(global_object, *vm.well_known_symbol_iterator()));
if (using_iterator) {
Value array;
if (constructor.is_constructor()) {