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); |