Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: src/api.cc

Issue 2630593004: [promises] Remove runtime call from fastpath in PromiseReject (Closed)
Patch Set: add comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/builtins/builtins-promise.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index e313812a6ceafc3adc70cebe1d00b3c663967c21..366d8b3204da714ce5ca2de79b8b480ebf4e2726 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();
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/builtins/builtins-promise.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698