bug 879647: Don't throw process fatal assortions when we're about to abort the compilation. (r=jbramley)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Wed, 23 Oct 2013 08:29:45 -0400
changeset 152134 cacd167576982df9da6ec5fb35f88e1502fcb2aa
parent 152133 d64bea16611b69c3533ec238577c5139a02b3f1e
child 152165 124fc1fcd3ebbe8484d0a5fb66bba6336daa3300
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersjbramley
bugs879647
milestone27.0a1
bug 879647: Don't throw process fatal assortions when we're about to abort the compilation. (r=jbramley)
js/src/jit/arm/Assembler-arm.h
js/src/jit/arm/CodeGenerator-arm.cpp
--- a/js/src/jit/arm/Assembler-arm.h
+++ b/js/src/jit/arm/Assembler-arm.h
@@ -1816,17 +1816,19 @@ class Assembler
 
     static void ToggleToJmp(CodeLocationLabel inst_);
     static void ToggleToCmp(CodeLocationLabel inst_);
 
     static void ToggleCall(CodeLocationLabel inst_, bool enabled);
 
     static void updateBoundsCheck(uint32_t logHeapSize, Instruction *inst);
     void processCodeLabels(uint8_t *rawCode);
-
+    bool bailed() {
+        return m_buffer.bail();
+    }
 }; // Assembler
 
 // An Instruction is a structure for both encoding and decoding any and all ARM instructions.
 // many classes have not been implemented thusfar.
 class Instruction
 {
     uint32_t data;
 
--- a/js/src/jit/arm/CodeGenerator-arm.cpp
+++ b/js/src/jit/arm/CodeGenerator-arm.cpp
@@ -207,16 +207,18 @@ CodeGeneratorARM::bailoutIf(Assembler::C
 
     masm.ma_b(ool->entry(), condition);
 
     return true;
 }
 bool
 CodeGeneratorARM::bailoutFrom(Label *label, LSnapshot *snapshot)
 {
+    if (masm.bailed())
+        return false;
     JS_ASSERT(label->used());
     JS_ASSERT(!label->bound());
 
     CompileInfo &info = snapshot->mir()->block()->info();
     switch (info.executionMode()) {
 
       case ParallelExecution: {
         // in parallel mode, make no attempt to recover, just signal an error.