[tor-commits] [tor-browser/esr24] Bug 1019684 - Follow-up bustage fix. r=jandem, a=bustage

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:42 UTC 2014


commit 8aa5416d9797a6ebbf682780ea26882d08095284
Author: Ryan VanderMeulen <ryanvm at gmail.com>
Date:   Tue Jun 17 13:15:22 2014 -0400

    Bug 1019684 - Follow-up bustage fix. r=jandem, a=bustage
---
 js/src/jit/arm/Assembler-arm.h |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h
index f33c2bc..1bc314a 100644
--- a/js/src/jit/arm/Assembler-arm.h
+++ b/js/src/jit/arm/Assembler-arm.h
@@ -18,6 +18,8 @@
 #include "jit/arm/Architecture-arm.h"
 #include "jit/shared/IonAssemblerBufferWithConstantPools.h"
 
+#include "jsprf.h"
+
 namespace js {
 namespace jit {
 
@@ -957,6 +959,15 @@ class VFPImm {
     }
 };
 
+inline void
+AssemblerCrashAtUnhandlableOOM(const char *reason)
+{
+    char msgbuf[1024];
+    JS_snprintf(msgbuf, sizeof(msgbuf), "[unhandlable oom] %s", reason);
+    MOZ_ReportAssertionFailure(msgbuf, __FILE__, __LINE__);
+    MOZ_CRASH();
+}
+
 // A BOffImm is an immediate that is used for branches. Namely, it is the offset that will
 // be encoded in the branch instruction. This is the only sane way of constructing a branch.
 class BOffImm
@@ -976,7 +987,7 @@ class BOffImm
     {
         JS_ASSERT((offset & 0x3) == 0);
         if (!isInRange(offset))
-            CrashAtUnhandlableOOM("BOffImm");
+            AssemblerCrashAtUnhandlableOOM("BOffImm");
     }
     static bool isInRange(int offset)
     {





More information about the tor-commits mailing list