Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index f50c2fad876a7c8898ce1dc56451166e73815dd6..e6e64c20e72f1cf69eeb125753567d7c58d5954d 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1019,6 +1019,11 @@ Object* Isolate::Throw(Object* exception, MessageLocation* location) { |
Handle<Object> message_obj = CreateMessage(exception_handle, location); |
thread_local_top()->pending_message_obj_ = *message_obj; |
+ bool exception_is_uncaught = ( |
+ PredictExceptionCatcher() != CAUGHT_BY_JAVASCRIPT); |
Michael Starzinger
2015/10/29 13:42:55
Notes about PredictExceptionCatcher:
1) Calling t
Michael Hablich
2015/10/29 15:23:34
I moved the whole counting into the factory which
|
+ |
+ if (exception_is_uncaught) context()->IncrementExceptionsThrown(); |
jochen (gone - plz use gerrit)
2015/10/29 14:37:07
use native_context()
Michael Hablich
2015/10/29 15:23:34
Done.
|
+ |
// For any exception not caught by JavaScript, even when an external |
// handler is present: |
// If the abort-on-uncaught-exception flag is specified, and if the |
@@ -1026,7 +1031,7 @@ Object* Isolate::Throw(Object* exception, MessageLocation* location) { |
// or if the custom callback determined that V8 should abort, then |
// abort. |
if (FLAG_abort_on_uncaught_exception && |
- PredictExceptionCatcher() != CAUGHT_BY_JAVASCRIPT && |
+ exception_is_uncaught && |
(!abort_on_uncaught_exception_callback_ || |
abort_on_uncaught_exception_callback_( |
reinterpret_cast<v8::Isolate*>(this)))) { |
@@ -2855,5 +2860,6 @@ bool PostponeInterruptsScope::Intercept(StackGuard::InterruptFlag flag) { |
return false; |
} |
+ |
} // namespace internal |
} // namespace v8 |