1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

LibJS: Convert enumerable_own_property_names() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-10-03 02:25:28 +01:00
parent 3af559ee8a
commit e5b8544762
6 changed files with 14 additions and 37 deletions

View file

@ -825,7 +825,7 @@ Value ForInStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
auto last_value = js_undefined();
while (object) {
auto property_names = object->enumerable_own_property_names(Object::PropertyKind::Key);
auto property_names = TRY_OR_DISCARD(object->enumerable_own_property_names(Object::PropertyKind::Key));
for (auto& value : property_names) {
TRY_OR_DISCARD(for_in_head_state.execute_head(interpreter, global_object, value));
last_value = m_body->execute(interpreter, global_object).value_or(last_value);