| Index: src/heap-snapshot-generator.cc
|
| diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
|
| index 34db11ba5d8f197b01924adea218d5e82c163463..4b3f3be98a20a6b2b109f425b83fe9513b4c7f66 100644
|
| --- a/src/heap-snapshot-generator.cc
|
| +++ b/src/heap-snapshot-generator.cc
|
| @@ -1648,17 +1648,33 @@ void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) {
|
| break;
|
| }
|
| }
|
| + } else if (js_obj->IsGlobalObject()) {
|
| + // We assume that global objects can only have slow properties.
|
| + GlobalDictionary* dictionary = js_obj->global_dictionary();
|
| + int length = dictionary->Capacity();
|
| + for (int i = 0; i < length; ++i) {
|
| + Object* k = dictionary->KeyAt(i);
|
| + if (dictionary->IsKey(k)) {
|
| + Object* target = dictionary->ValueAt(i);
|
| + DCHECK(target->IsPropertyCell());
|
| + Object* value = PropertyCell::cast(target)->value();
|
| + if (k == heap_->hidden_string()) {
|
| + TagObject(value, "(hidden properties)");
|
| + SetInternalReference(js_obj, entry, "hidden_properties", value);
|
| + continue;
|
| + }
|
| + PropertyDetails details = dictionary->DetailsAt(i);
|
| + SetDataOrAccessorPropertyReference(details.kind(), js_obj, entry,
|
| + Name::cast(k), value);
|
| + }
|
| + }
|
| } else {
|
| NameDictionary* dictionary = js_obj->property_dictionary();
|
| int length = dictionary->Capacity();
|
| for (int i = 0; i < length; ++i) {
|
| Object* k = dictionary->KeyAt(i);
|
| if (dictionary->IsKey(k)) {
|
| - Object* target = dictionary->ValueAt(i);
|
| - // We assume that global objects can only have slow properties.
|
| - Object* value = target->IsPropertyCell()
|
| - ? PropertyCell::cast(target)->value()
|
| - : target;
|
| + Object* value = dictionary->ValueAt(i);
|
| if (k == heap_->hidden_string()) {
|
| TagObject(value, "(hidden properties)");
|
| SetInternalReference(js_obj, entry, "hidden_properties", value);
|
|
|