Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 2987777164e8f98e585c6b098a36e131470e8fb1..5a513fd483a645b0e2bc769f58a995409cbd51be 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -4476,14 +4476,49 @@ void FullCodeGenerator::EnterFinallyBlock() { |
STATIC_ASSERT(kSmiTag == 0); |
__ SmiTag(edx); |
__ push(edx); |
+ |
// Store result register while executing finally block. |
__ push(result_register()); |
+ |
+ // Store pending message while executing finally block. |
+ ExternalReference pending_message_obj = |
+ ExternalReference::address_of_pending_message_obj(isolate()); |
+ __ mov(edx, Operand::StaticVariable(pending_message_obj)); |
+ __ push(edx); |
+ |
+ ExternalReference has_pending_message = |
+ ExternalReference::address_of_has_pending_message(isolate()); |
+ __ mov(edx, Operand::StaticVariable(has_pending_message)); |
+ __ push(edx); |
+ |
+ ExternalReference pending_message_script = |
+ ExternalReference::address_of_pending_message_script(isolate()); |
+ __ mov(edx, Operand::StaticVariable(pending_message_script)); |
+ __ push(edx); |
} |
void FullCodeGenerator::ExitFinallyBlock() { |
ASSERT(!result_register().is(edx)); |
+ // Restore pending message from stack. |
+ __ pop(edx); |
+ ExternalReference pending_message_script = |
+ ExternalReference::address_of_pending_message_script(isolate()); |
+ __ mov(Operand::StaticVariable(pending_message_script), edx); |
+ |
+ __ pop(edx); |
+ ExternalReference has_pending_message = |
+ ExternalReference::address_of_has_pending_message(isolate()); |
+ __ mov(Operand::StaticVariable(has_pending_message), edx); |
+ |
+ __ pop(edx); |
+ ExternalReference pending_message_obj = |
+ ExternalReference::address_of_pending_message_obj(isolate()); |
+ __ mov(Operand::StaticVariable(pending_message_obj), edx); |
+ |
+ // Restore result register from stack. |
__ pop(result_register()); |
+ |
// Uncook return address. |
__ pop(edx); |
__ SmiUntag(edx); |