Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 4c3f8940cd2fd00719fcfcd6a3a0212ed8208f98..f250e49e165825e4aa62acf7dbdd318e2b64f75d 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1143,20 +1143,21 @@ Object* Isolate::Throw(Object* exception, MessageLocation* location) { |
// embedder didn't specify a custom uncaught exception callback, |
// or if the custom callback determined that V8 should abort, then |
// abort. |
- CatchType prediction = PredictExceptionCatcher(); |
- if (FLAG_abort_on_uncaught_exception && |
- (prediction == NOT_CAUGHT || prediction == CAUGHT_BY_EXTERNAL) && |
- (!abort_on_uncaught_exception_callback_ || |
- abort_on_uncaught_exception_callback_( |
- reinterpret_cast<v8::Isolate*>(this)))) { |
- // Prevent endless recursion. |
- FLAG_abort_on_uncaught_exception = false; |
- // This flag is intended for use by JavaScript developers, so |
- // print a user-friendly stack trace (not an internal one). |
- PrintF(stderr, "%s\n\nFROM\n", |
- MessageHandler::GetLocalizedMessage(this, message_obj).get()); |
- PrintCurrentStackTrace(stderr); |
- base::OS::Abort(); |
+ if (FLAG_abort_on_uncaught_exception) { |
+ CatchType prediction = PredictExceptionCatcher(); |
+ if ((prediction == NOT_CAUGHT || prediction == CAUGHT_BY_EXTERNAL) && |
+ (!abort_on_uncaught_exception_callback_ || |
+ abort_on_uncaught_exception_callback_( |
+ reinterpret_cast<v8::Isolate*>(this)))) { |
+ // Prevent endless recursion. |
+ FLAG_abort_on_uncaught_exception = false; |
+ // This flag is intended for use by JavaScript developers, so |
+ // print a user-friendly stack trace (not an internal one). |
+ PrintF(stderr, "%s\n\nFROM\n", |
+ MessageHandler::GetLocalizedMessage(this, message_obj).get()); |
+ PrintCurrentStackTrace(stderr); |
+ base::OS::Abort(); |
+ } |
} |
} |
} |