Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 927ff012f7740e4afd3a4c3e6f837f2fb4e68787..b2b37b268053b7c4a4b4b5c8c394be23d307ccff 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -7267,9 +7267,12 @@ Maybe<bool> Promise::Resolver::Reject(Local<Context> context, |
Local<Value> value) { |
PREPARE_FOR_EXECUTION_PRIMITIVE(context, Promise_Resolver, Resolve, bool); |
auto self = Utils::OpenHandle(this); |
- i::Handle<i::Object> argv[] = {self, Utils::OpenHandle(*value)}; |
+ |
+ // We pass true to trigger the debugger's on exception handler. |
+ i::Handle<i::Object> argv[] = {self, Utils::OpenHandle(*value), |
+ isolate->factory()->ToBoolean(true)}; |
has_pending_exception = |
- i::Execution::Call(isolate, isolate->promise_reject(), |
+ i::Execution::Call(isolate, isolate->promise_internal_reject(), |
isolate->factory()->undefined_value(), arraysize(argv), |
argv) |
.is_null(); |