mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
LibJS: Convert get_method to ThrowCompletionOr
This commit is contained in:
parent
ab594e5f2f
commit
ee825d6d9e
10 changed files with 47 additions and 92 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue