Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 8d28c9c3ec15c00ae404dbef121298493404a7ba..05dceb7e2818d6b18efe895b9cd0fb9e0db601b2 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -5065,8 +5065,13 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, |
// Special handling of out of memory exceptions. |
JumpIfOOM(masm, eax, ecx, throw_out_of_memory_exception); |
- // Retrieve the pending exception and clear the variable. |
+ // Retrieve the pending exception. |
__ mov(eax, Operand::StaticVariable(pending_exception_address)); |
+ |
+ // See if we just retrieved an OOM exception. |
+ JumpIfOOM(masm, eax, ecx, throw_out_of_memory_exception); |
+ |
+ // Clear the pending exception. |
__ mov(edx, Immediate(masm->isolate()->factory()->the_hole_value())); |
__ mov(Operand::StaticVariable(pending_exception_address), edx); |