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); |