Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index 9b1df4ee735dd314b94ac3ee0101dd43cd1eebcb..4ddc0ae5c8ab936611ba55f98b5867721ce2b4ac 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -1287,7 +1287,11 @@ void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) { |
// is thrown. The exception is in the result register, and must be |
// preserved by the finally block. Call the finally block and then |
// rethrow the exception if it returns. |
+ // Preserve the pending message corresponding to the thrown error when |
+ // executing the finally block. |
+ SavePendingMessage(); |
__ Call(&finally_entry); |
+ RestorePendingMessage(); |
__ push(result_register()); |
__ CallRuntime(Runtime::kReThrow, 1); |