Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 6df7574287540f197f7cc5bd797ef5a0e6d82bd8..6d6d1f04724576472577d46cd0d5cbd5391e6986 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -1733,6 +1733,10 @@ void Debug::PrepareForBreakPoints() { |
if (!has_break_points_) { |
Deoptimizer::DeoptimizeAll(); |
+ // We are going to iterate heap to find all functions without |
+ // debug break slots. |
+ isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask); |
+ |
AssertNoAllocation no_allocation; |
Builtins* builtins = isolate_->builtins(); |
Code* lazy_compile = builtins->builtin(Builtins::kLazyCompile); |