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

Unified Diff: src/interpreter/bytecode-generator.cc

Issue 1842953003: Preserve exception message in iterator finalization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Turbofan Created 4 years, 9 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/interpreter/bytecode-generator.cc
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index 619ed89a942807cd3d55f7c5bb450452ea5e2392..f153397931ca3bf03888b9c281a6c2e2af858377 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -1199,8 +1199,10 @@ void BytecodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
VisitNewLocalCatchContext(stmt->variable());
builder()->StoreAccumulatorInRegister(context);
- // Clear message object as we enter the catch block.
- builder()->CallRuntime(Runtime::kInterpreterClearPendingMessage, no_reg, 0);
+ // If requested, clear message object as we enter the catch block.
+ if (stmt->clear_pending_message()) {
+ builder()->CallRuntime(Runtime::kInterpreterClearPendingMessage, no_reg, 0);
+ }
// Load the catch context into the accumulator.
builder()->LoadAccumulatorWithRegister(context);
« src/ast/ast.h ('K') | « src/full-codegen/full-codegen.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698