mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibJS: Convert get_method to ThrowCompletionOr
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 03:31:02 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/ee825d6d9e1 Pull-request: https://github.com/SerenityOS/serenity/pull/10190 Reviewed-by: https://github.com/davidot Reviewed-by: https://github.com/linusg ✅
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user