Chromium Code Reviews| Index: src/profile-generator.cc |
| diff --git a/src/profile-generator.cc b/src/profile-generator.cc |
| index ec08f8dca806b0f34985ca4dbd859b8e464ce9eb..2b9d710ecd6f210798a6fe7de4a33b5d0e99a8f9 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,17 @@ 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 = |
| +#ifdef ENABLE_DEBUGGER_SUPPORT |
| + object->IsGlobalObject() && |
| + Isolate::Current()->debug()->IsDebugGlobal(GlobalObject::cast(object)); |
| +#else |
| + false; |
|
yurys
2012/04/16 17:44:15
You could initialize is_debug_object with false an
alexeif
2012/04/17 13:43:00
Done.
|
| +#endif |
| + if (!is_debug_object) { |
| + SetUserGlobalReference(object); |
| + } |
| } else if (obj->IsJSObject()) { |
| JSObject* js_obj = JSObject::cast(obj); |
| ExtractClosureReferences(js_obj, entry); |
| @@ -2631,7 +2642,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( |