Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 6358d353174fde937f6c40e107a97f18dffcd9ca..cb2501eb92e504b9763495596daad1ae6888445b 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -2826,6 +2826,7 @@ void Debugger::OnScriptCollected(int id) { |
HandleScope scope(isolate_); |
// No more to do if not debugging. |
+ if (isolate_->debug()->InDebugger()) return; |
if (!IsDebuggerActive()) return; |
if (!Debugger::EventActive(v8::ScriptCollected)) return; |