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

Unified Diff: src/runtime.cc

Issue 6246054: Properly process getOwnPropertyDescriptor for elements on global proxy object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 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.cc ('k') | test/mjsunit/get-own-property-descriptor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 9911e1e3a3251620c68297902e4655875d6d9e86..e1a8954f50ef1e680a0f799ba3e6f165f6fdf53f 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -779,6 +779,12 @@ static MaybeObject* Runtime_GetOwnProperty(Arguments args) {
}
case JSObject::DICTIONARY_ELEMENT: {
+ if (obj->IsJSGlobalProxy()) {
+ Object* proto = obj->GetPrototype();
+ if (proto->IsNull()) return Heap::undefined_value();
+ ASSERT(proto->IsJSGlobalObject());
+ obj = Handle<JSObject>(JSObject::cast(proto));
+ }
NumberDictionary* dictionary = obj->element_dictionary();
int entry = dictionary->FindEntry(index);
ASSERT(entry != NumberDictionary::kNotFound);
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/get-own-property-descriptor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698