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

Unified Diff: src/full-codegen.cc

Issue 1154163006: Debugger: consider try-finally scopes not catching wrt debug events. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove modes for PredictExceptionCatcher Created 5 years, 7 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/full-codegen.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index a25669777144553769883aa0d97b6c4b96d261c4..95957d61411ed219736607dd607a23d77b3c7792 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -1209,11 +1209,14 @@ void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
// Try block code. Sets up the exception handler chain.
__ bind(&try_entry);
+
+ try_catch_depth_++;
EnterTryBlock(stmt->index(), &handler_entry);
{ TryCatch try_body(this);
Visit(stmt->try_block());
}
ExitTryBlock(stmt->index());
+ try_catch_depth_--;
__ bind(&exit);
}
@@ -1428,7 +1431,9 @@ void FullCodeGenerator::VisitThrow(Throw* expr) {
void FullCodeGenerator::EnterTryBlock(int index, Label* handler) {
handler_table()->SetRangeStart(index, masm()->pc_offset());
- handler_table()->SetRangeHandler(index, handler->pos());
+ HandlerTable::CatchPrediction prediction =
+ try_catch_depth_ > 0 ? HandlerTable::CAUGHT : HandlerTable::UNCAUGHT;
+ handler_table()->SetRangeHandler(index, handler->pos(), prediction);
// Determine expression stack depth of try statement.
int stack_depth = info_->scope()->num_stack_slots(); // Include stack locals.
« no previous file with comments | « src/full-codegen.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698