Index: src/debug/debug.cc |
diff --git a/src/debug/debug.cc b/src/debug/debug.cc |
index de29b83adde0600972ca7ea85a44947043ad8b9e..4556206e5bfa4d4feddaa1b6e558179668036a0e 100644 |
--- a/src/debug/debug.cc |
+++ b/src/debug/debug.cc |
@@ -1722,8 +1722,11 @@ MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler( |
void Debug::OnException(Handle<Object> exception, Handle<Object> promise) { |
- // In our prediction, try-finally is not considered to catch. |
Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher(); |
+ |
+ // Don't notify listener of exceptions that are internal to a desugaring. |
+ if (catch_type == Isolate::CAUGHT_BY_DESUGARING) return; |
+ |
bool uncaught = (catch_type == Isolate::NOT_CAUGHT); |
if (promise->IsJSObject()) { |
Handle<JSObject> jspromise = Handle<JSObject>::cast(promise); |