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

Unified Diff: src/debug/debug.cc

Issue 2286753002: Synchronous path changes
Patch Set: Created 4 years, 4 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 | « src/debug/debug.h ('k') | src/heap-symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index e04695771bf1f1c7755832ad10c240853a56ad6a..6e9322473d68f1b9b08e3016942f3575db190f41 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -1693,31 +1693,21 @@ void Debug::OnPromiseReject(Handle<JSObject> promise, Handle<Object> value) {
}
-MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler(
- Handle<JSObject> promise) {
- Handle<JSFunction> fun = isolate_->promise_has_user_defined_reject_handler();
- return Execution::Call(isolate_, fun, promise, 0, NULL);
-}
-
-
void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
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()) {
+ bool uncaught = (catch_type == Isolate::NOT_CAUGHT ||
+ catch_type == Isolate::CAUGHT_BY_ASYNC_AWAIT);
+ if (catch_type != Isolate::CAUGHT_BY_JAVASCRIPT && promise->IsJSObject()) {
Handle<JSObject> jspromise = Handle<JSObject>::cast(promise);
// Mark the promise as already having triggered a message.
Handle<Symbol> key = isolate_->factory()->promise_debug_marker_symbol();
JSObject::SetProperty(jspromise, key, key, STRICT).Assert();
// Check whether the promise reject is considered an uncaught exception.
- Handle<Object> has_reject_handler;
- ASSIGN_RETURN_ON_EXCEPTION_VALUE(
- isolate_, has_reject_handler,
- PromiseHasUserDefinedRejectHandler(jspromise), /* void */);
- uncaught = has_reject_handler->IsFalse(isolate_);
+ uncaught = !isolate_->PromiseHasUserDefinedRejectHandler(jspromise);
}
// Bail out if exception breaks are not active
if (uncaught) {
« no previous file with comments | « src/debug/debug.h ('k') | src/heap-symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698