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

Unified Diff: src/ast/prettyprinter.cc

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
Index: src/ast/prettyprinter.cc
diff --git a/src/ast/prettyprinter.cc b/src/ast/prettyprinter.cc
index 9a4332bf9bc0212b997fe242487017a086985853..93bce313d9cd65ae37632af007514f16e50c755a 100644
--- a/src/ast/prettyprinter.cc
+++ b/src/ast/prettyprinter.cc
@@ -885,8 +885,20 @@ void AstPrinter::VisitTryFinallyStatement(TryFinallyStatement* node) {
void AstPrinter::PrintTryStatement(TryStatement* node) {
PrintIndentedVisit("TRY", node->try_block());
- PrintIndented("CATCH PREDICTED");
- Print(" %d\n", node->catch_predicted());
+ PrintIndented("CATCH PREDICTION");
+ const char* prediction;
+ switch (node->catch_prediction()) {
+ case HandlerTable::UNCAUGHT:
+ prediction = "UNCAUGHT";
+ break;
+ case HandlerTable::CAUGHT:
+ prediction = "CAUGHT";
+ break;
+ case HandlerTable::PROMISE:
+ prediction = "PROMISE";
+ break;
+ }
+ Print(" %s\n", prediction);
}
void AstPrinter::VisitDebuggerStatement(DebuggerStatement* node) {

Powered by Google App Engine
This is Rietveld 408576698