Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index fd99b6ddc5589788bc1fed996d6a201aa1bb5038..598e027401e8a249262a70929c9a4ba10d9a408f 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -1350,6 +1350,17 @@ |
} |
+static bool HasInPrototypeChainIgnoringProxies(Isolate* isolate, Object* object, |
+ Object* proto) { |
+ PrototypeIterator iter(isolate, object, PrototypeIterator::START_AT_RECEIVER); |
+ while (true) { |
+ iter.AdvanceIgnoringProxies(); |
+ if (iter.IsAtEnd()) return false; |
+ if (iter.IsAtEnd(proto)) return true; |
+ } |
+} |
+ |
+ |
// Scan the heap for objects with direct references to an object |
// args[0]: the object to find references to |
// args[1]: constructor function for instances to exclude (Mirror) |
@@ -1379,7 +1390,7 @@ |
// Check filter if supplied. This is normally used to avoid |
// references from mirror objects. |
if (!filter->IsUndefined() && |
- obj->HasInPrototypeChain(isolate, *filter)) { |
+ HasInPrototypeChainIgnoringProxies(isolate, obj, *filter)) { |
continue; |
} |
if (obj->IsJSGlobalObject()) { |