Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: src/builtins.cc

Issue 2118613003: [builtins] don't create keys for undefined property descriptors in O.gOPDs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test262.status Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/object-get-own-property-descriptors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | test/mjsunit/harmony/object-get-own-property-descriptors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698