Index: runtime/vm/exceptions.cc |
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc |
index 343373fa127adef6f5465ce76ed174207d028ef2..cbca706093310e7490bc824b9cc4aad44aeef378 100644 |
--- a/runtime/vm/exceptions.cc |
+++ b/runtime/vm/exceptions.cc |
@@ -763,6 +763,7 @@ void Exceptions::Throw(Thread* thread, const Instance& exception) { |
// Do not notify debugger on stack overflow and out of memory exceptions. |
// The VM would crash when the debugger calls back into the VM to |
// get values of variables. |
+#if !defined(PRODUCT) |
if (FLAG_support_debugger) { |
Isolate* isolate = thread->isolate(); |
if (exception.raw() != isolate->object_store()->out_of_memory() && |
@@ -770,6 +771,7 @@ void Exceptions::Throw(Thread* thread, const Instance& exception) { |
isolate->debugger()->PauseException(exception); |
} |
} |
+#endif |
// Null object is a valid exception object. |
ThrowExceptionHelper(thread, exception, StackTrace::Handle(thread->zone()), |
false); |