Revision: 14294
Author:   [email protected]
Date:     Tue Apr 16 14:35:42 2013
Log: MIPS: Handle OOM failures correctly in the CEntryStub when embedders set V8::IgnoreOutOfMemoryException()

Port r14279 (81829ab4)

BUG=

Review URL: https://codereview.chromium.org/14299006
http://code.google.com/p/v8/source/detail?r=14294

Modified:
 /branches/bleeding_edge/src/mips/code-stubs-mips.cc

=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Apr 16 04:33:02 2013 +++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Apr 16 14:35:42 2013
@@ -3454,11 +3454,18 @@
   // Special handling of out of memory exceptions.
   JumpIfOOM(masm, v0, t0, throw_out_of_memory_exception);

-  // Retrieve the pending exception and clear the variable.
-  __ LoadRoot(a3, Heap::kTheHoleValueRootIndex);
+  // Retrieve the pending exception.
   __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
                                       isolate)));
   __ lw(v0, MemOperand(t0));
+
+  // See if we just retrieved an OOM exception.
+  JumpIfOOM(masm, v0, t0, throw_out_of_memory_exception);
+
+  // Clear the pending exception.
+  __ li(a3, Operand(isolate->factory()->the_hole_value()));
+  __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
+                                      isolate)));
   __ sw(a3, MemOperand(t0));

   // Special handling of termination exceptions which are uncatchable

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to