Chromium Code Reviews| Index: src/x64/code-stubs-x64.cc |
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
| index b43d583028776b4eb5c3ada584915c8f19dbc7b5..349adc512e1c2b95be6a1c8312ce518b55f80bd1 100644 |
| --- a/src/x64/code-stubs-x64.cc |
| +++ b/src/x64/code-stubs-x64.cc |
| @@ -4152,12 +4152,19 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, |
| // Special handling of out of memory exceptions. |
| JumpIfOOM(masm, rax, kScratchRegister, throw_out_of_memory_exception); |
| - // Retrieve the pending exception and clear the variable. |
| + // Retrieve the pending exception. |
| ExternalReference pending_exception_address( |
| Isolate::kPendingExceptionAddress, masm->isolate()); |
| Operand pending_exception_operand = |
| masm->ExternalOperand(pending_exception_address); |
| __ movq(rax, pending_exception_operand); |
| + |
| + // See if we just retrieved an OOM exception. |
| + JumpIfOOM(masm, rax, kScratchRegister, throw_out_of_memory_exception); |
| + |
| + // Clear the pending exception. |
| + pending_exception_operand = |
| + masm->ExternalOperand(pending_exception_address); |
|
Michael Starzinger
2013/04/16 12:09:45
nit: Do we really need to recompute the operand he
Jakob Kummerow
2013/04/16 12:13:11
Yes, we need to, because the call to masm->Externa
|
| __ LoadRoot(rdx, Heap::kTheHoleValueRootIndex); |
| __ movq(pending_exception_operand, rdx); |