Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 86bfbbcb643475ce65fd8dfaae5384ccaa052f54..d8844cc414e3f03c64f803dac22fdfaa8c5a003f 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -2121,7 +2121,10 @@ Object* Debug::FindSharedFunctionInfoInScript(Handle<Script> script, |
Heap* heap = isolate_->heap(); |
while (!done) { |
{ // Extra scope for iterator. |
- HeapIterator iterator(heap); |
+ // If lazy compilation is off, we won't have duplicate shared function |
+ // infos that need to be filtered. |
+ HeapIterator iterator(heap, FLAG_lazy ? HeapIterator::kNoFiltering |
+ : HeapIterator::kFilterUnreachable); |
for (HeapObject* obj = iterator.next(); |
obj != NULL; obj = iterator.next()) { |
bool found_next_candidate = false; |