Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4354)

Unified Diff: runtime/vm/exceptions.cc

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 29f16848f17ccaeec0c97f737240493543103b59..369d099793d7deaf620a70ecc5109600d0625843 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -489,10 +489,12 @@ 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.
- Isolate* isolate = thread->isolate();
- if (exception.raw() != isolate->object_store()->out_of_memory() &&
- exception.raw() != isolate->object_store()->stack_overflow()) {
- isolate->debugger()->SignalExceptionThrown(exception);
+ if (FLAG_support_debugger) {
+ Isolate* isolate = thread->isolate();
+ if (exception.raw() != isolate->object_store()->out_of_memory() &&
+ exception.raw() != isolate->object_store()->stack_overflow()) {
+ isolate->debugger()->SignalExceptionThrown(exception);
+ }
}
// Null object is a valid exception object.
ThrowExceptionHelper(thread, exception,
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698