Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 0b006273b242ae23f683f81c5fe2821a9320e77d..e53c168113768301b761227651b4e27099423198 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -2025,7 +2025,6 @@ BUILTIN(ObjectEntries) { |
BUILTIN(ObjectGetOwnPropertyDescriptors) { |
HandleScope scope(isolate); |
Handle<Object> object = args.atOrUndefined(isolate, 1); |
- Handle<Object> undefined = isolate->factory()->undefined_value(); |
Handle<JSReceiver> receiver; |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, receiver, |
@@ -2047,9 +2046,8 @@ BUILTIN(ObjectGetOwnPropertyDescriptors) { |
isolate, receiver, key, &descriptor); |
MAYBE_RETURN(did_get_descriptor, isolate->heap()->exception()); |
- Handle<Object> from_descriptor = did_get_descriptor.FromJust() |
- ? descriptor.ToObject(isolate) |
- : undefined; |
+ if (!did_get_descriptor.FromJust()) continue; |
+ Handle<Object> from_descriptor = descriptor.ToObject(isolate); |
LookupIterator it = LookupIterator::PropertyOrElement( |
isolate, descriptors, key, descriptors, LookupIterator::OWN); |