mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibJS: Convert to_object() to ThrowCompletionOr
This commit is contained in:
parent
9eb065a1f6
commit
52976bfac6
45 changed files with 239 additions and 490 deletions
|
@ -18,9 +18,7 @@ Object* get_iterator(GlobalObject& global_object, Value value, IteratorHint hint
|
|||
if (method.is_empty()) {
|
||||
if (hint == IteratorHint::Async)
|
||||
TODO();
|
||||
auto object = value.to_object(global_object);
|
||||
if (!object)
|
||||
return {};
|
||||
auto object = TRY_OR_DISCARD(value.to_object(global_object));
|
||||
method = TRY_OR_DISCARD(object->get(*vm.well_known_symbol_iterator()));
|
||||
}
|
||||
if (!method.is_function()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue