| Index: src/profile-generator.cc
|
| diff --git a/src/profile-generator.cc b/src/profile-generator.cc
|
| index ec08f8dca806b0f34985ca4dbd859b8e464ce9eb..9c50383e8ec3feb8282874cc742271a05c8d499f 100644
|
| --- a/src/profile-generator.cc
|
| +++ b/src/profile-generator.cc
|
| @@ -34,6 +34,7 @@
|
| #include "scopeinfo.h"
|
| #include "unicode.h"
|
| #include "zone-inl.h"
|
| +#include "debug.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -1986,7 +1987,15 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) {
|
| // We use JSGlobalProxy because this is what embedder (e.g. browser)
|
| // uses for the global object.
|
| JSGlobalProxy* proxy = JSGlobalProxy::cast(obj);
|
| - SetWindowReference(proxy->map()->prototype());
|
| + Object* object = proxy->map()->prototype();
|
| + bool is_debug_object = false;
|
| +#ifdef ENABLE_DEBUGGER_SUPPORT
|
| + is_debug_object = object->IsGlobalObject() &&
|
| + Isolate::Current()->debug()->IsDebugGlobal(GlobalObject::cast(object));
|
| +#endif
|
| + if (!is_debug_object) {
|
| + SetUserGlobalReference(object);
|
| + }
|
| } else if (obj->IsJSObject()) {
|
| JSObject* js_obj = JSObject::cast(obj);
|
| ExtractClosureReferences(js_obj, entry);
|
| @@ -2631,7 +2640,7 @@ void V8HeapExplorer::SetRootGcRootsReference() {
|
| }
|
|
|
|
|
| -void V8HeapExplorer::SetWindowReference(Object* child_obj) {
|
| +void V8HeapExplorer::SetUserGlobalReference(Object* child_obj) {
|
| HeapEntry* child_entry = GetEntry(child_obj);
|
| ASSERT(child_entry != NULL);
|
| filler_->SetNamedAutoIndexReference(
|
|
|