Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 8fcb370c3e9ebf9fc5894a4b0826b1339966c60a..54a72d3c2ccd454d2a512ea51e3d780f61fe1808 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -945,9 +945,12 @@ void Isolate::ScheduleThrow(Object* exception) { |
// When scheduling a throw we first throw the exception to get the |
// error reporting if it is uncaught before rescheduling it. |
Throw(exception); |
- thread_local_top()->scheduled_exception_ = pending_exception(); |
- thread_local_top()->external_caught_exception_ = false; |
- clear_pending_exception(); |
+ PropagatePendingExceptionToExternalTryCatch(); |
+ if (has_pending_exception()) { |
+ thread_local_top()->scheduled_exception_ = pending_exception(); |
+ thread_local_top()->external_caught_exception_ = false; |
+ clear_pending_exception(); |
+ } |
} |