Commit 0400e059 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Handle OOM failures correctly in the CEntryStub when embedders set...

MIPS: Handle OOM failures correctly in the CEntryStub when embedders set V8::IgnoreOutOfMemoryException()

Port r14279 (81829ab4)

BUG=

Review URL: https://codereview.chromium.org/14299006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 091f0b7f
......@@ -3454,11 +3454,18 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
// 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment