Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index fcce24ff8ea4e559a9a4ed7156c0c990df4280ad..97c3ff48a9a6535208c91ceb733e3f7ae3fa5af4 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -1399,6 +1399,11 @@ static int DebugReferencedBy(HeapIterator* iterator, JSObject* target, |
} |
} |
+ // Do not expose the global object directly. |
+ if (obj->IsJSGlobalObject()) { |
+ obj = JSGlobalObject::cast(obj)->global_proxy(); |
+ } |
+ |
if (obj != NULL) { |
// Valid reference found add to instance array if supplied an update |
// count. |