Bug 1019684 - Turn an assert into a release mode crash instead. r=mjrosenb, a=1.4+
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 12 Jun 2014 09:11:00 -0400
changeset 188062 5509f025a2338cf91d156a47eda853d7d366cd3b
parent 188061 31558da14ea5fac4642b2d2b69d0a101de3dfcab
child 188063 591d1d56cdefce0872b0ff8f021ccf1b18614be9
push id382
push userryanvm@gmail.com
push dateTue, 17 Jun 2014 15:35:05 +0000
treeherdermozilla-b2g30_v1_4@5509f025a233 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjrosenb, 1
bugs1019684
milestone30.0
Bug 1019684 - Turn an assert into a release mode crash instead. r=mjrosenb, a=1.4+
js/src/jit/arm/Assembler-arm.cpp
js/src/jit/arm/Assembler-arm.h
--- a/js/src/jit/arm/Assembler-arm.cpp
+++ b/js/src/jit/arm/Assembler-arm.cpp
@@ -1856,17 +1856,17 @@ Assembler::as_b(Label *l, Condition c, b
 
     int32_t old;
     BufferOffset ret;
     if (l->used()) {
         old = l->offset();
         // This will currently throw an assertion if we couldn't actually
         // encode the offset of the branch.
         if (!BOffImm::isInRange(old)) {
-            m_buffer.bail();
+            m_buffer.fail_bail();
             return ret;
         }
         ret = as_b(BOffImm(old), c, isPatchable);
     } else {
         old = LabelBase::INVALID_OFFSET;
         BOffImm inv;
         ret = as_b(inv, c, isPatchable);
     }
@@ -1918,17 +1918,17 @@ Assembler::as_bl(Label *l, Condition c)
     int32_t old;
     BufferOffset ret;
     // See if the list was empty :(
     if (l->used()) {
         // This will currently throw an assertion if we couldn't actually
         // encode the offset of the branch.
         old = l->offset();
         if (!BOffImm::isInRange(old)) {
-            m_buffer.bail();
+            m_buffer.fail_bail();
             return ret;
         }
         ret = as_bl(BOffImm(old), c);
     } else {
         old = LabelBase::INVALID_OFFSET;
         BOffImm inv;
         ret = as_bl(inv, c);
     }
--- a/js/src/jit/arm/Assembler-arm.h
+++ b/js/src/jit/arm/Assembler-arm.h
@@ -967,17 +967,18 @@ class BOffImm
     int32_t decode() {
         return ((((int32_t)data) << 8) >> 6) + 8;
     }
 
     explicit BOffImm(int offset)
       : data ((offset - 8) >> 2 & 0x00ffffff)
     {
         JS_ASSERT((offset & 0x3) == 0);
-        JS_ASSERT(isInRange(offset));
+        if (!isInRange(offset))
+            CrashAtUnhandlableOOM("BOffImm");
     }
     static bool isInRange(int offset)
     {
         if ((offset - 8) < -33554432)
             return false;
         if ((offset - 8) > 33554428)
             return false;
         return true;