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

Unified Diff: src/objects.cc

Issue 1408163005: [es6] Partially implement Reflect.getOwnPropertyDescriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/objects.h ('k') | src/property-descriptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index a31600eb6c5d47a753d85358d298f19c9a299978..3aeee36ee1a0d132c4360c04d031300dc65e2049 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6608,7 +6608,7 @@ bool JSArray::ArraySetLength(Isolate* isolate, Handle<JSArray> a,
// static
bool JSReceiver::GetOwnPropertyDescriptor(Isolate* isolate,
- Handle<JSObject> object,
+ Handle<JSReceiver> object,
Handle<Object> key,
PropertyDescriptor* desc) {
bool success = false;
@@ -6672,6 +6672,8 @@ bool JSReceiver::GetOwnPropertyDescriptor(LookupIterator* it,
// 8. Set D.[[Configurable]] to the value of X's [[Configurable]] attribute.
desc->set_configurable((attrs & DONT_DELETE) == 0);
// 9. Return D.
+ DCHECK(PropertyDescriptor::IsAccessorDescriptor(desc) !=
+ PropertyDescriptor::IsDataDescriptor(desc));
return true;
}
« no previous file with comments | « src/objects.h ('k') | src/property-descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698