| Index: runtime/lib/errors.cc
|
| diff --git a/runtime/lib/errors.cc b/runtime/lib/errors.cc
|
| index aa985da68c3127bd66d261e8d0542235f45cf91f..434143b30e3de86ec39258dcad8448464867184f 100644
|
| --- a/runtime/lib/errors.cc
|
| +++ b/runtime/lib/errors.cc
|
| @@ -10,11 +10,17 @@
|
|
|
| namespace dart {
|
|
|
| +DECLARE_FLAG(bool, abort_on_assertion_errors);
|
| +
|
| // Allocate and throw a new AssertionError.
|
| // Arg0: index of the first token of the failed assertion.
|
| // Arg1: index of the first token after the failed assertion.
|
| // Return value: none, throws an exception.
|
| DEFINE_NATIVE_ENTRY(AssertionError_throwNew, 2) {
|
| + if (FLAG_abort_on_assertion_errors) {
|
| + Exceptions::PrintStackTraceAndAbort("an assertion failure");
|
| + }
|
| +
|
| // No need to type check the arguments. This function can only be called
|
| // internally from the VM.
|
| intptr_t assertion_start =
|
|
|