From ed3209e821d80133259b120bb488a869fec3bd02 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Mon, 13 Jul 2015 14:26:01 +0100 Subject: [PATCH] Backed out changeset afb1f49458db (bug 1171909) for SM(arm) errors --- js/src/jit-test/tests/gc/bug-1171909.js | 3 --- js/src/jit/Bailouts.cpp | 17 +++++++++-------- .../IonAssemblerBufferWithConstantPools.h | 4 ---- 3 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 js/src/jit-test/tests/gc/bug-1171909.js diff --git a/js/src/jit-test/tests/gc/bug-1171909.js b/js/src/jit-test/tests/gc/bug-1171909.js deleted file mode 100644 index 590c41b7822..00000000000 --- a/js/src/jit-test/tests/gc/bug-1171909.js +++ /dev/null @@ -1,3 +0,0 @@ -// |jit-test| --no-ggc; allow-unhandlable-oom -load(libdir + 'oomTest.js'); -oomTest((function(x) { assertEq(x + y + ex, 25); })); diff --git a/js/src/jit/Bailouts.cpp b/js/src/jit/Bailouts.cpp index a618c129e16..8807bf7f111 100644 --- a/js/src/jit/Bailouts.cpp +++ b/js/src/jit/Bailouts.cpp @@ -221,18 +221,19 @@ jit::ExceptionHandlerBailout(JSContext* cx, const InlineFrameIterator& frame, rfe->target = cx->runtime()->jitRuntime()->getBailoutTail()->raw(); rfe->bailoutInfo = bailoutInfo; } else { - // Bailout failed. If the overrecursion check failed, clear the - // exception to turn this into an uncatchable error, continue popping - // all inline frames and have the caller report the error. + // Bailout failed. If there was a fatal error, clear the + // exception to turn this into an uncatchable error. If the + // overrecursion check failed, continue popping all inline + // frames and have the caller report an overrecursion error. MOZ_ASSERT(!bailoutInfo); - if (retval == BAILOUT_RETURN_OVERRECURSED) { + if (!excInfo.propagatingIonExceptionForDebugMode()) + cx->clearPendingException(); + + if (retval == BAILOUT_RETURN_OVERRECURSED) *overrecursed = true; - if (!excInfo.propagatingIonExceptionForDebugMode()) - cx->clearPendingException(); - } else { + else MOZ_ASSERT(retval == BAILOUT_RETURN_FATAL_ERROR); - } } // Make the frame being bailed out the top profiled frame. diff --git a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h index 36a01ff6a08..9b8fc7481c1 100644 --- a/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h +++ b/js/src/jit/shared/IonAssemblerBufferWithConstantPools.h @@ -460,10 +460,6 @@ struct AssemblerBufferWithConstantPools : public AssemblerBufferlifoAlloc_.template newArrayUninitialized(poolInfoSize_); - if (!poolInfo_) { - this->fail_oom(); - return; - } new (&pool_) Pool (poolMaxOffset_, pcBias_, this->lifoAlloc_); if (pool_.poolData() == nullptr)