Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index a56da2ddf0901b553655eb0f0a4f9173ee37bfef..42a5a55b9d622a39ecf8cea37bcf555a7329b47f 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1335,6 +1335,10 @@ HandlerTable::CatchPrediction PredictException(JavaScriptFrame* frame) { |
frame->Summarize(&summaries); |
for (const FrameSummary& summary : summaries) { |
Handle<AbstractCode> code = summary.abstract_code(); |
+ if (code->IsCode() && code->kind() == AbstractCode::BUILTIN && |
+ code->GetCode()->is_promise_rejection()) { |
+ return HandlerTable::PROMISE; |
+ } |
if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { |
DCHECK(summary.function()->shared()->asm_function()); |
DCHECK(!FLAG_turbo_asm_deoptimization); |