Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 4c3f8940cd2fd00719fcfcd6a3a0212ed8208f98..0a83dd2b059a46d93356a0b2a01247ae4945142a 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1309,9 +1309,16 @@ HandlerTable::CatchPrediction PredictException(JavaScriptFrame* frame) { |
List<FrameSummary> summaries; |
frame->Summarize(&summaries); |
for (const FrameSummary& summary : summaries) { |
+ Handle<AbstractCode> code = summary.abstract_code(); |
+ if (code->kind() == AbstractCode::OPTIMIZED_FUNCTION) { |
+ DCHECK(summary.function()->shared()->asm_function()); |
+ DCHECK(!FLAG_turbo_asm_deoptimization); |
+ // asm code cannot contain try-catch. |
+ continue; |
+ } |
int code_offset = summary.code_offset(); |
- int index = summary.abstract_code()->LookupRangeInHandlerTable( |
- code_offset, nullptr, &prediction); |
+ int index = |
+ code->LookupRangeInHandlerTable(code_offset, nullptr, &prediction); |
if (index <= 0) continue; |
if (prediction == HandlerTable::UNCAUGHT) continue; |
return prediction; |