Bug 1036782 - Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/src. r=jorendorff
authorChris Peterson <cpeterson@mozilla.com>
Mon, 14 Jul 2014 19:14:54 -0700
changeset 193973 f8f7b0e89bcfdef690759c38b266ab1fb1002595
parent 193972 5a2cd9e13de1fd98850e4826915053b90637699a
child 193974 2b29602d985075f16e4386b306e28173f1ad0dc6
push id27136
push usercbook@mozilla.com
push dateTue, 15 Jul 2014 12:59:16 +0000
treeherdermozilla-central@d2d56f9066bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1036782
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1036782 - Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/src. r=jorendorff
js/src/builtin/Intl.cpp
js/src/builtin/TestingFunctions.cpp
js/src/builtin/TypedObject.cpp
js/src/builtin/TypedObject.h
js/src/ctypes/CTypes.cpp
js/src/frontend/BytecodeEmitter.cpp
js/src/frontend/Parser.cpp
js/src/frontend/TokenStream.cpp
js/src/irregexp/RegExpAST.h
js/src/irregexp/RegExpEngine.cpp
js/src/irregexp/RegExpEngine.h
js/src/irregexp/RegExpInterpreter.cpp
js/src/irregexp/RegExpParser.cpp
js/src/jsapi.cpp
js/src/jsfriendapi.h
js/src/jsfun.cpp
js/src/jsinfer.h
js/src/jsinferinlines.h
js/src/jsobj.cpp
js/src/jsobjinlines.h
js/src/jsonparser.cpp
js/src/jsopcode.cpp
js/src/jsopcode.h
js/src/jsopcodeinlines.h
js/src/jsproxy.cpp
js/src/jsscript.cpp
js/src/prmjtime.cpp
js/src/shell/jsoptparse.cpp
js/src/tests/js1_8_1/regress/regress-452498-053.js
js/src/vm/ArgumentsObject-inl.h
js/src/vm/Debugger.cpp
js/src/vm/ForkJoin.cpp
js/src/vm/GlobalObject.cpp
js/src/vm/HelperThreads.cpp
js/src/vm/Interpreter.cpp
js/src/vm/MemoryMetrics.cpp
js/src/vm/OldDebugAPI.cpp
js/src/vm/PosixNSPR.cpp
js/src/vm/ScopeObject.cpp
js/src/vm/Stack-inl.h
js/src/vm/Stack.cpp
js/src/vm/StructuredClone.cpp
js/src/vm/TraceLogging.cpp
js/src/vm/TypedArrayObject.cpp
js/src/vm/TypedArrayObject.h
js/src/vm/UbiNode.cpp
--- a/js/src/builtin/Intl.cpp
+++ b/js/src/builtin/Intl.cpp
@@ -73,37 +73,37 @@ using icu::NumberingSystem;
  * and return error codes. Signatures adapted from ICU header files locid.h,
  * numsys.h, ucal.h, ucol.h, udat.h, udatpg.h, uenum.h, unum.h; see the ICU
  * directory for license.
  */
 
 static int32_t
 u_strlen(const UChar *s)
 {
-    MOZ_ASSUME_UNREACHABLE("u_strlen: Intl API disabled");
+    MOZ_CRASH("u_strlen: Intl API disabled");
 }
 
 struct UEnumeration;
 
 static int32_t
 uenum_count(UEnumeration *en, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("uenum_count: Intl API disabled");
+    MOZ_CRASH("uenum_count: Intl API disabled");
 }
 
 static const char *
 uenum_next(UEnumeration *en, int32_t *resultLength, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("uenum_next: Intl API disabled");
+    MOZ_CRASH("uenum_next: Intl API disabled");
 }
 
 static void
 uenum_close(UEnumeration *en)
 {
-    MOZ_ASSUME_UNREACHABLE("uenum_close: Intl API disabled");
+    MOZ_CRASH("uenum_close: Intl API disabled");
 }
 
 struct UCollator;
 
 enum UColAttribute {
      UCOL_ALTERNATE_HANDLING,
      UCOL_CASE_FIRST,
      UCOL_CASE_LEVEL,
@@ -128,55 +128,55 @@ enum UCollationResult {
   UCOL_EQUAL = 0,
   UCOL_GREATER = 1,
   UCOL_LESS = -1
 };
 
 static int32_t
 ucol_countAvailable(void)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_countAvailable: Intl API disabled");
+    MOZ_CRASH("ucol_countAvailable: Intl API disabled");
 }
 
 static const char *
 ucol_getAvailable(int32_t localeIndex)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_getAvailable: Intl API disabled");
+    MOZ_CRASH("ucol_getAvailable: Intl API disabled");
 }
 
 static UCollator *
 ucol_open(const char *loc, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_open: Intl API disabled");
+    MOZ_CRASH("ucol_open: Intl API disabled");
 }
 
 static void
 ucol_setAttribute(UCollator *coll, UColAttribute attr, UColAttributeValue value, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_setAttribute: Intl API disabled");
+    MOZ_CRASH("ucol_setAttribute: Intl API disabled");
 }
 
 static UCollationResult
 ucol_strcoll(const UCollator *coll, const UChar *source, int32_t sourceLength,
              const UChar *target, int32_t targetLength)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_strcoll: Intl API disabled");
+    MOZ_CRASH("ucol_strcoll: Intl API disabled");
 }
 
 static void
 ucol_close(UCollator *coll)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_close: Intl API disabled");
+    MOZ_CRASH("ucol_close: Intl API disabled");
 }
 
 static UEnumeration *
 ucol_getKeywordValuesForLocale(const char *key, const char *locale, UBool commonlyUsed,
                                UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("ucol_getKeywordValuesForLocale: Intl API disabled");
+    MOZ_CRASH("ucol_getKeywordValuesForLocale: Intl API disabled");
 }
 
 struct UParseError;
 struct UFieldPosition;
 typedef void *UNumberFormat;
 
 enum UNumberFormatStyle {
     UNUM_DECIMAL = 1,
@@ -203,195 +203,195 @@ enum UNumberFormatAttribute {
 
 enum UNumberFormatTextAttribute {
   UNUM_CURRENCY_CODE,
 };
 
 static int32_t
 unum_countAvailable(void)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_countAvailable: Intl API disabled");
+    MOZ_CRASH("unum_countAvailable: Intl API disabled");
 }
 
 static const char *
 unum_getAvailable(int32_t localeIndex)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_getAvailable: Intl API disabled");
+    MOZ_CRASH("unum_getAvailable: Intl API disabled");
 }
 
 static UNumberFormat *
 unum_open(UNumberFormatStyle style, const UChar *pattern, int32_t patternLength,
           const char *locale, UParseError *parseErr, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_open: Intl API disabled");
+    MOZ_CRASH("unum_open: Intl API disabled");
 }
 
 static void
 unum_setAttribute(UNumberFormat *fmt, UNumberFormatAttribute  attr, int32_t newValue)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_setAttribute: Intl API disabled");
+    MOZ_CRASH("unum_setAttribute: Intl API disabled");
 }
 
 static int32_t
 unum_formatDouble(const UNumberFormat *fmt, double number, UChar *result,
                   int32_t resultLength, UFieldPosition *pos, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_formatDouble: Intl API disabled");
+    MOZ_CRASH("unum_formatDouble: Intl API disabled");
 }
 
 static void
 unum_close(UNumberFormat *fmt)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_close: Intl API disabled");
+    MOZ_CRASH("unum_close: Intl API disabled");
 }
 
 static void
 unum_setTextAttribute(UNumberFormat *fmt, UNumberFormatTextAttribute tag, const UChar *newValue,
                       int32_t newValueLength, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("unum_setTextAttribute: Intl API disabled");
+    MOZ_CRASH("unum_setTextAttribute: Intl API disabled");
 }
 
 class Locale {
   public:
     Locale(const char *language, const char *country = 0, const char *variant = 0,
            const char *keywordsAndValues = 0);
 };
 
 Locale::Locale(const char *language, const char *country, const char *variant,
                const char *keywordsAndValues)
 {
-    MOZ_ASSUME_UNREACHABLE("Locale::Locale: Intl API disabled");
+    MOZ_CRASH("Locale::Locale: Intl API disabled");
 }
 
 class NumberingSystem {
   public:
     static NumberingSystem *createInstance(const Locale &inLocale, UErrorCode &status);
     const char *getName();
 };
 
 NumberingSystem *
 NumberingSystem::createInstance(const Locale &inLocale, UErrorCode &status)
 {
-    MOZ_ASSUME_UNREACHABLE("NumberingSystem::createInstance: Intl API disabled");
+    MOZ_CRASH("NumberingSystem::createInstance: Intl API disabled");
 }
 
 const char *
 NumberingSystem::getName()
 {
-    MOZ_ASSUME_UNREACHABLE("NumberingSystem::getName: Intl API disabled");
+    MOZ_CRASH("NumberingSystem::getName: Intl API disabled");
 }
 
 typedef void *UCalendar;
 
 enum UCalendarType {
   UCAL_TRADITIONAL,
   UCAL_DEFAULT = UCAL_TRADITIONAL,
   UCAL_GREGORIAN
 };
 
 static UCalendar *
 ucal_open(const UChar *zoneID, int32_t len, const char *locale,
           UCalendarType type, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("ucal_open: Intl API disabled");
+    MOZ_CRASH("ucal_open: Intl API disabled");
 }
 
 static const char *
 ucal_getType(const UCalendar *cal, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("ucal_getType: Intl API disabled");
+    MOZ_CRASH("ucal_getType: Intl API disabled");
 }
 
 static UEnumeration *
 ucal_getKeywordValuesForLocale(const char *key, const char *locale,
                                UBool commonlyUsed, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("ucal_getKeywordValuesForLocale: Intl API disabled");
+    MOZ_CRASH("ucal_getKeywordValuesForLocale: Intl API disabled");
 }
 
 static void
 ucal_close(UCalendar *cal)
 {
-    MOZ_ASSUME_UNREACHABLE("ucal_close: Intl API disabled");
+    MOZ_CRASH("ucal_close: Intl API disabled");
 }
 
 typedef void *UDateTimePatternGenerator;
 
 static UDateTimePatternGenerator *
 udatpg_open(const char *locale, UErrorCode *pErrorCode)
 {
-    MOZ_ASSUME_UNREACHABLE("udatpg_open: Intl API disabled");
+    MOZ_CRASH("udatpg_open: Intl API disabled");
 }
 
 static int32_t
 udatpg_getBestPattern(UDateTimePatternGenerator *dtpg, const UChar *skeleton,
                       int32_t length, UChar *bestPattern, int32_t capacity,
                       UErrorCode *pErrorCode)
 {
-    MOZ_ASSUME_UNREACHABLE("udatpg_getBestPattern: Intl API disabled");
+    MOZ_CRASH("udatpg_getBestPattern: Intl API disabled");
 }
 
 static void
 udatpg_close(UDateTimePatternGenerator *dtpg)
 {
-    MOZ_ASSUME_UNREACHABLE("udatpg_close: Intl API disabled");
+    MOZ_CRASH("udatpg_close: Intl API disabled");
 }
 
 typedef void *UCalendar;
 typedef void *UDateFormat;
 
 enum UDateFormatStyle {
     UDAT_PATTERN = -2,
     UDAT_IGNORE = UDAT_PATTERN
 };
 
 static int32_t
 udat_countAvailable(void)
 {
-    MOZ_ASSUME_UNREACHABLE("udat_countAvailable: Intl API disabled");
+    MOZ_CRASH("udat_countAvailable: Intl API disabled");
 }
 
 static const char *
 udat_getAvailable(int32_t localeIndex)
 {
-    MOZ_ASSUME_UNREACHABLE("udat_getAvailable: Intl API disabled");
+    MOZ_CRASH("udat_getAvailable: Intl API disabled");
 }
 
 static UDateFormat *
 udat_open(UDateFormatStyle timeStyle, UDateFormatStyle dateStyle, const char *locale,
           const UChar *tzID, int32_t tzIDLength, const UChar *pattern,
           int32_t patternLength, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("udat_open: Intl API disabled");
+    MOZ_CRASH("udat_open: Intl API disabled");
 }
 
 static const UCalendar *
 udat_getCalendar(const UDateFormat *fmt)
 {
-    MOZ_ASSUME_UNREACHABLE("udat_getCalendar: Intl API disabled");
+    MOZ_CRASH("udat_getCalendar: Intl API disabled");
 }
 
 static void
 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode)
 {
-    MOZ_ASSUME_UNREACHABLE("ucal_setGregorianChange: Intl API disabled");
+    MOZ_CRASH("ucal_setGregorianChange: Intl API disabled");
 }
 
 static int32_t
 udat_format(const UDateFormat *format, UDate dateToFormat, UChar *result,
             int32_t resultLength, UFieldPosition *position, UErrorCode *status)
 {
-    MOZ_ASSUME_UNREACHABLE("udat_format: Intl API disabled");
+    MOZ_CRASH("udat_format: Intl API disabled");
 }
 
 static void
 udat_close(UDateFormat *format)
 {
-    MOZ_ASSUME_UNREACHABLE("udat_close: Intl API disabled");
+    MOZ_CRASH("udat_close: Intl API disabled");
 }
 
 #endif
 
 
 /******************** Common to Intl constructors ********************/
 
 static bool
@@ -979,17 +979,17 @@ intl_CompareStrings(JSContext *cx, UColl
     UCollationResult uresult = ucol_strcoll(coll,
                                             JSCharToUChar(chars1.start().get()), chars1.length(),
                                             JSCharToUChar(chars2.start().get()), chars2.length());
     int32_t res;
     switch (uresult) {
         case UCOL_LESS: res = -1; break;
         case UCOL_EQUAL: res = 0; break;
         case UCOL_GREATER: res = 1; break;
-        default: MOZ_ASSUME_UNREACHABLE("ucol_strcoll returned bad UCollationResult");
+        default: MOZ_CRASH("ucol_strcoll returned bad UCollationResult");
     }
     result.setInt32(res);
     return true;
 }
 
 bool
 js::intl_CompareStrings(JSContext *cx, unsigned argc, Value *vp)
 {
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -583,17 +583,17 @@ GCState(JSContext *cx, unsigned argc, js
     gc::State globalState = cx->runtime()->gc.state();
     if (globalState == gc::NO_INCREMENTAL)
         state = "none";
     else if (globalState == gc::MARK)
         state = "mark";
     else if (globalState == gc::SWEEP)
         state = "sweep";
     else
-        MOZ_ASSUME_UNREACHABLE("Unobserveable global GC state");
+        MOZ_CRASH("Unobserveable global GC state");
 
     JSString *str = JS_NewStringCopyZ(cx, state);
     if (!str)
         return false;
     args.rval().setString(str);
     return true;
 }
 
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -270,17 +270,17 @@ ScalarTypeDescr::typeName(Type type)
     switch (type) {
 #define NUMERIC_TYPE_TO_STRING(constant_, type_, name_) \
         case constant_: return #name_;
         JS_FOR_EACH_SCALAR_TYPE_REPR(NUMERIC_TYPE_TO_STRING)
 #undef NUMERIC_TYPE_TO_STRING
       case Scalar::TypeMax:
         MOZ_CRASH();
     }
-    MOZ_ASSUME_UNREACHABLE("Invalid type");
+    MOZ_CRASH("Invalid type");
 }
 
 bool
 ScalarTypeDescr::call(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (args.length() < 1) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED,
@@ -371,17 +371,17 @@ ReferenceTypeDescr::alignment(Type t)
 ReferenceTypeDescr::typeName(Type type)
 {
     switch (type) {
 #define NUMERIC_TYPE_TO_STRING(constant_, type_, name_) \
         case constant_: return #name_;
         JS_FOR_EACH_REFERENCE_TYPE_REPR(NUMERIC_TYPE_TO_STRING)
 #undef NUMERIC_TYPE_TO_STRING
     }
-    MOZ_ASSUME_UNREACHABLE("Invalid type");
+    MOZ_CRASH("Invalid type");
 }
 
 bool
 js::ReferenceTypeDescr::call(JSContext *cx, unsigned argc, Value *vp)
 {
     CallArgs args = CallArgsFromVp(argc, vp);
 
     JS_ASSERT(args.callee().is<ReferenceTypeDescr>());
@@ -413,17 +413,17 @@ js::ReferenceTypeDescr::call(JSContext *
         RootedString obj(cx, ToString<CanGC>(cx, args[0]));
         if (!obj)
             return false;
         args.rval().setString(&*obj);
         return true;
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Unhandled Reference type");
+    MOZ_CRASH("Unhandled Reference type");
 }
 
 /***************************************************************************
  * X4 type objects
  *
  * Note: these are partially defined in SIMD.cpp
  */
 
@@ -1425,17 +1425,17 @@ JSObject *
 js_InitTypedObjectDummy(JSContext *cx, HandleObject obj)
 {
     /*
      * This function is entered into the jsprototypes.h table
      * as the initializer for `TypedObject`. It should not
      * be executed via the `standard_class_atoms` mechanism.
      */
 
-    MOZ_ASSUME_UNREACHABLE("shouldn't be initializing TypedObject via the JSProtoKey initializer mechanism");
+    MOZ_CRASH("shouldn't be initializing TypedObject via the JSProtoKey initializer mechanism");
 }
 
 /******************************************************************************
  * Typed objects
  */
 
 /*static*/ TypedObject *
 TypedObject::createUnattached(JSContext *cx,
@@ -1519,19 +1519,19 @@ TypedObjLengthFromType(TypeDescr &descr)
       case type::Struct:
       case type::X4:
         return 0;
 
       case type::SizedArray:
         return descr.as<SizedArrayTypeDescr>().length();
 
       case type::UnsizedArray:
-        MOZ_ASSUME_UNREACHABLE("TypedObjLengthFromType() invoked on unsized type");
+        MOZ_CRASH("TypedObjLengthFromType() invoked on unsized type");
     }
-    MOZ_ASSUME_UNREACHABLE("Invalid kind");
+    MOZ_CRASH("Invalid kind");
 }
 
 /*static*/ TypedObject *
 TypedObject::createDerived(JSContext *cx, HandleSizedTypeDescr type,
                            HandleTypedObject typedObj, int32_t offset)
 {
     JS_ASSERT(!typedObj->owner().isNeutered());
     JS_ASSERT(typedObj->typedMem() != NULL);
@@ -1598,17 +1598,17 @@ TypedObject::createZeroed(JSContext *cx,
 
         if (length)
             elementTypeRepr->initInstances(cx->runtime(), buffer->dataPointer(), length);
         obj->attach(*buffer, 0);
         return obj;
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Bad TypeRepresentation Kind");
+    MOZ_CRASH("Bad TypeRepresentation Kind");
 }
 
 static bool
 ReportTypedObjTypeError(JSContext *cx,
                         const unsigned errorNumber,
                         HandleTypedObject obj)
 {
     // Serialize type string of obj
@@ -2271,17 +2271,17 @@ LengthForType(TypeDescr &descr)
 
       case type::SizedArray:
         return descr.as<SizedArrayTypeDescr>().length();
 
       case type::UnsizedArray:
         return 0;
     }
 
-    MOZ_ASSUME_UNREACHABLE("Invalid kind");
+    MOZ_CRASH("Invalid kind");
 }
 
 static bool
 CheckOffset(int32_t offset,
             int32_t size,
             int32_t alignment,
             int32_t bufferLength)
 {
@@ -3097,32 +3097,32 @@ visitReferences(SizedTypeDescr &descr,
             visitReferences(elementDescr, mem, visitor);
             mem += elementDescr.size();
         }
         return;
       }
 
       case type::UnsizedArray:
       {
-        MOZ_ASSUME_UNREACHABLE("Only Sized Type representations");
+        MOZ_CRASH("Only Sized Type representations");
       }
 
       case type::Struct:
       {
         StructTypeDescr &structDescr = descr.as<StructTypeDescr>();
         for (size_t i = 0; i < structDescr.fieldCount(); i++) {
             SizedTypeDescr &descr = structDescr.fieldDescr(i);
             size_t offset = structDescr.fieldOffset(i);
             visitReferences(descr, mem + offset, visitor);
         }
         return;
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Invalid type repr kind");
+    MOZ_CRASH("Invalid type repr kind");
 }
 
 ///////////////////////////////////////////////////////////////////////////
 // Initializing instances
 
 namespace js {
 class MemoryInitVisitor {
     const JSRuntime *rt_;
@@ -3159,17 +3159,17 @@ js::MemoryInitVisitor::visitReference(Re
       {
         js::HeapPtrString *stringPtr =
             reinterpret_cast<js::HeapPtrString *>(mem);
         stringPtr->init(rt_->emptyString);
         return;
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Invalid kind");
+    MOZ_CRASH("Invalid kind");
 }
 
 void
 SizedTypeDescr::initInstances(const JSRuntime *rt, uint8_t *mem, size_t length)
 {
     JS_ASSERT(length >= 1);
 
     MemoryInitVisitor visitor(rt);
@@ -3229,17 +3229,17 @@ js::MemoryTracingVisitor::visitReference
         js::HeapPtrString *stringPtr =
             reinterpret_cast<js::HeapPtrString *>(mem);
         if (*stringPtr)
             gc::MarkString(trace_, stringPtr, "reference-str");
         return;
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Invalid kind");
+    MOZ_CRASH("Invalid kind");
 }
 
 void
 SizedTypeDescr::traceInstances(JSTracer *trace, uint8_t *mem, size_t length)
 {
     MemoryTracingVisitor visitor(trace);
 
     for (size_t i = 0; i < length; i++) {
--- a/js/src/builtin/TypedObject.h
+++ b/js/src/builtin/TypedObject.h
@@ -699,17 +699,17 @@ class TypedObject : public ArrayBufferVi
           case type::SizedArray:
             return typeDescr().as<SizedTypeDescr>().size();
 
           case type::UnsizedArray: {
             SizedTypeDescr &elementType = typeDescr().as<UnsizedArrayTypeDescr>().elementType();
             return elementType.size() * length();
           }
         }
-        MOZ_ASSUME_UNREACHABLE("unhandled typerepresentation kind");
+        MOZ_CRASH("unhandled typerepresentation kind");
     }
 
     uint8_t *typedMem(size_t offset) const {
         // It seems a bit surprising that one might request an offset
         // == size(), but it can happen when taking the "address of" a
         // 0-sized value. (In other words, we maintain the invariant
         // that `offset + size <= size()` -- this is always checked in
         // the caller's side.)
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -2203,17 +2203,17 @@ ConvertToJS(JSContext* cx,
     JSObject* obj = CData::Create(cx, typeObj, parentObj, data, ownResult);
     if (!obj)
       return false;
 
     *result = OBJECT_TO_JSVAL(obj);
     break;
   }
   case TYPE_function:
-    MOZ_ASSUME_UNREACHABLE("cannot return a FunctionType");
+    MOZ_CRASH("cannot return a FunctionType");
   }
 
   return true;
 }
 
 // Determine if the contents of a typed array can be converted without
 // ambiguity to a C type. Elements of a Int8Array are converted to
 // ctypes.int8_t, UInt8Array to ctypes.uint8_t, etc.
@@ -2656,17 +2656,17 @@ ImplicitConvert(JSContext* cx,
       memcpy(buffer, intermediate.get(), structSize);
       break;
     }
 
     return TypeError(cx, "struct", val);
   }
   case TYPE_void_t:
   case TYPE_function:
-    MOZ_ASSUME_UNREACHABLE("invalid type");
+    MOZ_CRASH("invalid type");
   }
 
   return true;
 }
 
 // Convert jsval 'val' to a C binary representation of CType 'targetType',
 // storing the result in 'buffer'. This function is more forceful than
 // ImplicitConvert.
@@ -2725,17 +2725,17 @@ ExplicitConvert(JSContext* cx, HandleVal
   case TYPE_double:
   case TYPE_array:
   case TYPE_struct:
     // ImplicitConvert is sufficient. Re-throw the exception it generated.
     JS_SetPendingException(cx, ex);
     return false;
   case TYPE_void_t:
   case TYPE_function:
-    MOZ_ASSUME_UNREACHABLE("invalid type");
+    MOZ_CRASH("invalid type");
   }
   return true;
 }
 
 // Given a CType 'typeObj', generate a string describing the C type declaration
 // corresponding to 'typeObj'. For instance, the CType constructed from
 // 'ctypes.int32_t.ptr.array(4).ptr.ptr' will result in the type string
 // 'int32_t*(**)[4]'.
@@ -2897,17 +2897,17 @@ BuildTypeSource(JSContext* cx,
       break;
     case ABI_STDCALL:
       AppendString(result, "ctypes.stdcall_abi, ");
       break;
     case ABI_WINAPI:
       AppendString(result, "ctypes.winapi_abi, ");
       break;
     case INVALID_ABI:
-      MOZ_ASSUME_UNREACHABLE("invalid abi");
+      MOZ_CRASH("invalid abi");
     }
 
     // Recursively build the source string describing the function return and
     // argument types.
     BuildTypeSource(cx, fninfo->mReturnType, true, result);
 
     if (fninfo->mArgTypes.length() > 0) {
       AppendString(result, ", [");
@@ -3142,17 +3142,17 @@ BuildDataSource(JSContext* cx,
     }
 
     if (isImplicit)
       AppendString(result, "}");
 
     break;
   }
   case TYPE_void_t:
-    MOZ_ASSUME_UNREACHABLE("invalid type");
+    MOZ_CRASH("invalid type");
   }
 
   return true;
 }
 
 /*******************************************************************************
 ** JSAPI callback function implementations
 *******************************************************************************/
@@ -3599,17 +3599,17 @@ CType::GetFFIType(JSContext* cx, JSObjec
     result = ArrayType::BuildFFIType(cx, obj);
     break;
 
   case TYPE_struct:
     result = StructType::BuildFFIType(cx, obj);
     break;
 
   default:
-    MOZ_ASSUME_UNREACHABLE("simple types must have an ffi_type");
+    MOZ_CRASH("simple types must have an ffi_type");
   }
 
   if (!result)
     return nullptr;
   JS_SetReservedSlot(obj, SLOT_FFITYPE, PRIVATE_TO_JSVAL(result.get()));
   return result.forget();
 }
 
@@ -5550,17 +5550,17 @@ FunctionType::BuildSymbolName(JSString* 
     // On Win64, stdcall is an alias to the default ABI for compatibility, so no
     // mangling is done.
     AppendString(result, name);
 #endif
     break;
   }
 
   case INVALID_ABI:
-    MOZ_ASSUME_UNREACHABLE("invalid abi");
+    MOZ_CRASH("invalid abi");
   }
 }
 
 static FunctionInfo*
 NewFunctionInfo(JSContext* cx,
                 jsval abiType,
                 jsval returnType,
                 jsval* argTypes,
@@ -6833,17 +6833,17 @@ CDataFinalizer::Methods::ToString(JSCont
   if (!JS_GetPrivate(objThis)) {
     // Pre-check whether CDataFinalizer::GetValue can fail
     // to avoid reporting an error when not appropriate.
     strMessage = JS_NewStringCopyZ(cx, "[CDataFinalizer - empty]");
     if (!strMessage) {
       return false;
     }
   } else if (!CDataFinalizer::GetValue(cx, objThis, value.address())) {
-    MOZ_ASSUME_UNREACHABLE("Could not convert an empty CDataFinalizer");
+    MOZ_CRASH("Could not convert an empty CDataFinalizer");
   } else {
     strMessage = ToString(cx, value);
     if (!strMessage) {
       return false;
     }
   }
   args.rval().setString(strMessage);
   return true;
@@ -7044,17 +7044,17 @@ CDataFinalizer::Construct(JSContext* cx,
   // of the function, which may be less precise.
   JSObject *objBestArgType = objArgType;
   if (valData.isObject()) {
     JSObject *objData = &valData.toObject();
     if (CData::IsCData(objData)) {
       objBestArgType = CData::GetCType(objData);
       size_t sizeBestArg;
       if (!CType::GetSafeSize(objBestArgType, &sizeBestArg)) {
-        MOZ_ASSUME_UNREACHABLE("object with unknown size");
+        MOZ_CRASH("object with unknown size");
       }
       if (sizeBestArg != sizeArg) {
         return TypeError(cx, "(an object with the same size as that expected by the C finalization function)", valData);
       }
     }
   }
 
   // Used by GetCType
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -888,17 +888,17 @@ EnterNestedScope(ExclusiveContext *cx, B
         break;
       }
       case STMT_WITH:
         JS_ASSERT(scopeObj->is<StaticWithObject>());
         if (!EmitInternedObjectOp(cx, scopeObjectIndex, JSOP_ENTERWITH, bce))
             return false;
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE();
+        MOZ_CRASH("Unexpected scope statement");
     }
 
     uint32_t parent = BlockScopeNote::NoBlockScopeIndex;
     if (StmtInfoBCE *stmt = bce->topScopeStmt) {
         for (; stmt->staticScope != bce->staticScope; stmt = stmt->down) {}
         parent = stmt->blockScopeIndex;
     }
 
@@ -1248,17 +1248,17 @@ EmitVarOp(ExclusiveContext *cx, ParseNod
         JS_ASSERT_IF(pn->isUsed(), pn->pn_cookie.level() == 0);
         JS_ASSERT_IF(pn->isDefn(), pn->pn_cookie.level() == bce->script->staticLevel());
         return EmitUnaliasedVarOp(cx, op, pn->pn_cookie.slot(), bce);
     }
 
     switch (op) {
       case JSOP_GETARG: case JSOP_GETLOCAL: op = JSOP_GETALIASEDVAR; break;
       case JSOP_SETARG: case JSOP_SETLOCAL: op = JSOP_SETALIASEDVAR; break;
-      default: MOZ_ASSUME_UNREACHABLE("unexpected var op");
+      default: MOZ_CRASH("unexpected var op");
     }
 
     return EmitAliasedVarOp(cx, op, pn, bce);
 }
 
 static JSOp
 GetIncDecInfo(ParseNodeKind kind, bool *post)
 {
@@ -1348,17 +1348,17 @@ BytecodeEmitter::isAliasedName(ParseNode
         return script->formalIsAliased(pn->pn_cookie.slot());
       case Definition::VAR:
       case Definition::CONST:
         JS_ASSERT_IF(sc->allLocalsAliased(), script->varIsAliased(pn->pn_cookie.slot()));
         return script->varIsAliased(pn->pn_cookie.slot());
       case Definition::PLACEHOLDER:
       case Definition::NAMED_LAMBDA:
       case Definition::MISSING:
-        MOZ_ASSUME_UNREACHABLE("unexpected dn->kind");
+        MOZ_CRASH("unexpected dn->kind");
     }
     return false;
 }
 
 /*
  * Try to convert a *NAME op with a free name to a more specialized GNAME,
  * INTRINSIC or ALIASEDVAR op, which optimize accesses on that name.
  * Return true if a conversion was made.
@@ -1373,17 +1373,17 @@ TryConvertFreeName(BytecodeEmitter *bce,
      * cloned lazily upon first access.
      */
     if (bce->emitterMode == BytecodeEmitter::SelfHosting) {
         JSOp op;
         switch (pn->getOp()) {
           case JSOP_NAME:     op = JSOP_GETINTRINSIC; break;
           case JSOP_SETNAME:  op = JSOP_SETINTRINSIC; break;
           /* Other *NAME ops aren't (yet) supported in self-hosted code. */
-          default: MOZ_ASSUME_UNREACHABLE("intrinsic");
+          default: MOZ_CRASH("intrinsic");
         }
         pn->setOp(op);
         return true;
     }
 
     /*
      * When parsing inner functions lazily, parse nodes for outer functions no
      * longer exist and only the function's scope chain is available for
@@ -1481,17 +1481,17 @@ TryConvertFreeName(BytecodeEmitter *bce,
 
     JSOp op;
     switch (pn->getOp()) {
       case JSOP_NAME:     op = JSOP_GETGNAME; break;
       case JSOP_SETNAME:  op = JSOP_SETGNAME; break;
       case JSOP_SETCONST:
         // Not supported.
         return false;
-      default: MOZ_ASSUME_UNREACHABLE("gname");
+      default: MOZ_CRASH("gname");
     }
     pn->setOp(op);
     return true;
 }
 
 /*
  * BindNameToSlotHelper attempts to optimize name gets and sets to stack slot
  * loads and stores, given the compile-time information in bce and a PNK_NAME
@@ -1627,29 +1627,29 @@ BindNameToSlotHelper(ExclusiveContext *c
      * to stack slot. Look for an argument or variable in the function and
      * rewrite pn_op and update pn accordingly.
      */
     switch (dn->kind()) {
       case Definition::ARG:
         switch (op) {
           case JSOP_NAME:     op = JSOP_GETARG; break;
           case JSOP_SETNAME:  op = JSOP_SETARG; break;
-          default: MOZ_ASSUME_UNREACHABLE("arg");
+          default: MOZ_CRASH("arg");
         }
         JS_ASSERT(!pn->isConst());
         break;
 
       case Definition::VAR:
       case Definition::CONST:
       case Definition::LET:
         switch (op) {
           case JSOP_NAME:     op = JSOP_GETLOCAL; break;
           case JSOP_SETNAME:  op = JSOP_SETLOCAL; break;
           case JSOP_SETCONST: op = JSOP_SETLOCAL; break;
-          default: MOZ_ASSUME_UNREACHABLE("local");
+          default: MOZ_CRASH("local");
         }
         break;
 
       case Definition::NAMED_LAMBDA: {
         JS_ASSERT(dn->isOp(JSOP_CALLEE));
         JS_ASSERT(op != JSOP_CALLEE);
 
         /*
@@ -1696,17 +1696,17 @@ BindNameToSlotHelper(ExclusiveContext *c
         pn->pn_dflags |= PND_BOUND;
         return true;
       }
 
       case Definition::PLACEHOLDER:
         return true;
 
       case Definition::MISSING:
-        MOZ_ASSUME_UNREACHABLE("missing");
+        MOZ_CRASH("missing");
     }
 
     /*
      * The difference between the current static level and the static level of
      * the definition is the number of function scopes between the current
      * scope and dn's scope.
      */
     unsigned skip = bce->script->staticLevel() - dn->pn_cookie.level();
@@ -1889,17 +1889,17 @@ CheckSideEffects(ExclusiveContext *cx, B
               case PNK_CALL:
               case PNK_ELEM:
                 /* All these delete addressing modes have effects too. */
                 *answer = true;
                 return true;
               default:
                 return CheckSideEffects(cx, bce, pn2, answer);
             }
-            MOZ_ASSUME_UNREACHABLE("We have a returning default case");
+            MOZ_CRASH("We have a returning default case");
           }
 
           case PNK_TYPEOF:
           case PNK_VOID:
           case PNK_NOT:
           case PNK_BITNOT:
             if (pn->isOp(JSOP_NOT)) {
                 /* ! does not convert its operand via toString or valueOf. */
@@ -1912,17 +1912,17 @@ CheckSideEffects(ExclusiveContext *cx, B
              * All of PNK_INC, PNK_DEC, PNK_THROW, PNK_YIELD, and PNK_YIELD_STAR
              * have direct effects. Of the remaining unary-arity node types, we
              * can't easily prove that the operand never denotes an object with
              * a toString or valueOf method.
              */
             *answer = true;
             return true;
         }
-        MOZ_ASSUME_UNREACHABLE("We have a returning default case");
+        MOZ_CRASH("We have a returning default case");
 
       case PN_NAME:
         /*
          * Take care to avoid trying to bind a label name (labels, both for
          * statements and property values in object initialisers, have pn_op
          * defaulted to JSOP_NOP).
          */
         if (pn->isKind(PNK_NAME) && !pn->isOp(JSOP_NOP)) {
@@ -3120,17 +3120,17 @@ EmitDestructuringLHS(ExclusiveContext *c
 
               case JSOP_SETLOCAL:
               case JSOP_SETARG:
                 if (!EmitVarOp(cx, pn, pn->getOp(), bce))
                     return false;
                 break;
 
               default:
-                MOZ_ASSUME_UNREACHABLE("EmitDestructuringLHS: bad name op");
+                MOZ_CRASH("EmitDestructuringLHS: bad name op");
             }
             break;
 
           case PNK_DOT:
             // See the (PNK_NAME, JSOP_SETNAME) case above.
             //
             // In `a.x = b`, `a` is evaluated first, then `b`, then a
             // JSOP_SETPROP instruction.
@@ -3164,17 +3164,17 @@ EmitDestructuringLHS(ExclusiveContext *c
             // analysis. (The interpreter will never reach these instructions
             // since we just emitted JSOP_SETCALL, which always throws. It's
             // possible no analyses actually depend on this either.)
             if (Emit1(cx, bce, JSOP_POP) < 0)
                 return false;
             break;
 
           default:
-            MOZ_ASSUME_UNREACHABLE("EmitDestructuringLHS: bad lhs kind");
+            MOZ_CRASH("EmitDestructuringLHS: bad lhs kind");
         }
 
         // Pop the assigned value.
         if (Emit1(cx, bce, JSOP_POP) < 0)
             return false;
     }
 
     return true;
@@ -3735,17 +3735,17 @@ EmitAssignment(ExclusiveContext *cx, Byt
                 if (!EmitAtomOp(cx, lhs, JSOP_GETINTRINSIC, bce))
                     return false;
             } else {
                 JSOp op;
                 switch (lhs->getOp()) {
                   case JSOP_SETARG: op = JSOP_GETARG; break;
                   case JSOP_SETLOCAL: op = JSOP_GETLOCAL; break;
                   case JSOP_SETALIASEDVAR: op = JSOP_GETALIASEDVAR; break;
-                  default: MOZ_ASSUME_UNREACHABLE("Bad op");
+                  default: MOZ_CRASH("Bad op");
                 }
                 if (!EmitVarOp(cx, lhs, op, bce))
                     return false;
             }
             break;
           case PNK_DOT: {
             if (Emit1(cx, bce, JSOP_DUP) < 0)
                 return false;
@@ -3942,17 +3942,17 @@ ParseNode::getConstantValue(ExclusiveCon
             }
         }
 
         types::FixObjectType(cx, obj);
         vp.setObject(*obj);
         return true;
       }
       default:
-        MOZ_ASSUME_UNREACHABLE("Unexpected node");
+        MOZ_CRASH("Unexpected node");
     }
     return false;
 }
 
 static bool
 EmitSingletonInitialiser(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
 {
     RootedValue value(cx);
@@ -6039,17 +6039,17 @@ EmitObject(ExclusiveContext *cx, Bytecod
             obj = nullptr;
 
         if (isIndex) {
             obj = nullptr;
             switch (op) {
               case JSOP_INITPROP:        op = JSOP_INITELEM;        break;
               case JSOP_INITPROP_GETTER: op = JSOP_INITELEM_GETTER; break;
               case JSOP_INITPROP_SETTER: op = JSOP_INITELEM_SETTER; break;
-              default: MOZ_ASSUME_UNREACHABLE("Invalid op");
+              default: MOZ_CRASH("Invalid op");
             }
             if (Emit1(cx, bce, op) < 0)
                 return false;
         } else {
             JS_ASSERT(pn3->isKind(PNK_NAME) || pn3->isKind(PNK_STRING));
 
             // If we have { __proto__: expr }, implement prototype mutation.
             if (op == JSOP_INITPROP && pn3->pn_atom == cx->names().proto) {
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -188,17 +188,17 @@ ParseContext<FullParseHandler>::define(T
         dn->setOp((js_CodeSpec[dn->getOp()].format & JOF_SET) ? JSOP_SETLOCAL : JSOP_GETLOCAL);
         dn->pn_dflags |= (PND_LET | PND_BOUND);
         JS_ASSERT(dn->pn_cookie.level() == staticLevel); /* see bindLet */
         if (!decls_.addShadow(name, dn))
             return false;
         break;
 
       default:
-        MOZ_ASSUME_UNREACHABLE("unexpected kind");
+        MOZ_CRASH("unexpected kind");
     }
 
     return true;
 }
 
 template <>
 bool
 ParseContext<SyntaxParseHandler>::define(TokenStream &ts, HandlePropertyName name, Node pn,
@@ -284,17 +284,17 @@ AppendPackedBindings(const ParseContext<
             break;
           case Definition::CONST:
             kind = Binding::CONSTANT;
             break;
           case Definition::ARG:
             kind = Binding::ARGUMENT;
             break;
           default:
-            MOZ_ASSUME_UNREACHABLE("unexpected dn->kind");
+            MOZ_CRASH("unexpected dn->kind");
         }
 
         /*
          * Bindings::init does not check for duplicates so we must ensure that
          * only one binding with a given name is marked aliased. pc->decls
          * maintains the canonical definition for each name, so use that.
          */
         JS_ASSERT_IF(dn->isClosed(), pc->decls().lookupFirst(name) == dn);
@@ -4384,17 +4384,17 @@ Parser<FullParseHandler>::forStatement()
 
         switch (pn2->getKind()) {
           case PNK_NAME:
             /* Beware 'for (arguments in ...)' with or without a 'var'. */
             pn2->markAsAssigned();
             break;
 
           case PNK_ASSIGN:
-            MOZ_ASSUME_UNREACHABLE("forStatement TOK_ASSIGN");
+            MOZ_CRASH("forStatement TOK_ASSIGN");
 
           case PNK_ARRAY:
           case PNK_OBJECT:
             if (versionNumber() == JSVERSION_1_7) {
                 /*
                  * Destructuring for-in requires [key, value] enumeration
                  * in JS1.7.
                  */
@@ -4946,17 +4946,17 @@ Parser<ParseHandler>::yieldExpression()
             if (!exprNode)
                 return null();
         }
 
         return handler.newUnary(PNK_YIELD, JSOP_NOP, begin, exprNode);
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("yieldExpr");
+    MOZ_CRASH("yieldExpr");
 }
 
 template <>
 ParseNode *
 Parser<FullParseHandler>::withStatement()
 {
     // test262/ch12/12.10/12.10-0-1.js fails if we try to parse with-statements
     // in syntax-parse mode. See bug 892583.
@@ -5850,17 +5850,16 @@ Parser<ParseHandler>::unaryExpr()
                 return null();
             return handler.newUnary((tt == TOK_INC) ? PNK_POSTINCREMENT : PNK_POSTDECREMENT,
                                     JSOP_NOP,
                                     begin,
                                     pn);
         }
         return pn;
     }
-    MOZ_ASSUME_UNREACHABLE("unaryExpr");
 }
 
 /*
  * A dedicated helper for transplanting the legacy comprehension expression E in
  *
  *   [E for (V in I)]   // legacy array comprehension
  *   (E for (V in I))   // legacy generator expression
  *
@@ -7345,17 +7344,17 @@ Parser<ParseHandler>::objectLiteral()
         AssignmentType assignType;
         if (op == JSOP_INITPROP)
             assignType = VALUE;
         else if (op == JSOP_INITPROP_GETTER)
             assignType = GET;
         else if (op == JSOP_INITPROP_SETTER)
             assignType = SET;
         else
-            MOZ_ASSUME_UNREACHABLE("bad opcode in object initializer");
+            MOZ_CRASH("bad opcode in object initializer");
 
         AtomIndexAddPtr p = seen.lookupForAdd(atom);
         if (p) {
             jsatomid index = p.value();
             AssignmentType oldAssignType = AssignmentType(index);
             if ((oldAssignType & assignType) &&
                 (oldAssignType != VALUE || assignType != VALUE || pc->sc->needStrictChecks()))
             {
--- a/js/src/frontend/TokenStream.cpp
+++ b/js/src/frontend/TokenStream.cpp
@@ -1623,17 +1623,17 @@ TokenStream::getTokenInternal(Modifier m
         goto out;
 
       badchar:
       default:
         reportError(JSMSG_ILLEGAL_CHARACTER);
         goto error;
     }
 
-    MOZ_ASSUME_UNREACHABLE("should have jumped to |out| or |error|");
+    MOZ_CRASH("should have jumped to |out| or |error|");
 
   out:
     flags.isDirtyLine = true;
     tp->pos.end = userbuf.addressOfNextRawChar() - userbuf.base();
     JS_ASSERT(IsTokenSane(tp));
     return tp->type;
 
   error:
--- a/js/src/irregexp/RegExpAST.h
+++ b/js/src/irregexp/RegExpAST.h
@@ -60,17 +60,17 @@ class RegExpTree
     virtual bool IsAnchoredAtStart() { return false; }
     virtual bool IsAnchoredAtEnd() { return false; }
     virtual int min_match() = 0;
     virtual int max_match() = 0;
     // Returns the interval of registers used for captures within this
     // expression.
     virtual Interval CaptureRegisters() { return Interval::Empty(); }
     virtual void AppendToText(RegExpText* text) {
-        MOZ_ASSUME_UNREACHABLE("Bad call");
+        MOZ_CRASH("Bad call");
     }
 #define MAKE_ASTYPE(Name)                                               \
     virtual RegExp##Name* As##Name();                                   \
     virtual bool Is##Name();
     FOR_EACH_REG_EXP_TREE_TYPE(MAKE_ASTYPE)
 #undef MAKE_ASTYPE
 };
 
--- a/js/src/irregexp/RegExpEngine.cpp
+++ b/js/src/irregexp/RegExpEngine.cpp
@@ -155,17 +155,17 @@ CharacterRange::AddClassEscape(LifoAlloc
         ranges->append(CharacterRange::Everything());
         break;
         // This is the set of characters matched by the $ and ^ symbols
         // in multiline mode.
       case 'n':
         AddClass(kLineTerminatorRanges, kLineTerminatorRangeCount, ranges);
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE("Bad character class escape");
+        MOZ_CRASH("Bad character class escape");
     }
 }
 
 // We need to check for the following characters: 0x39c 0x3bc 0x178.
 static inline bool
 RangeContainsLatin1Equivalents(CharacterRange range)
 {
     // TODO(dcarney): this could be a lot more efficient.
@@ -1370,18 +1370,17 @@ int
 TextElement::length() const
 {
     switch (text_type()) {
       case ATOM:
         return atom()->length();
       case CHAR_CLASS:
         return 1;
     }
-    MOZ_ASSUME_UNREACHABLE("Bad text type");
-    return 0;
+    MOZ_CRASH("Bad text type");
 }
 
 class FrequencyCollator
 {
   public:
     FrequencyCollator() : total_samples_(0) {
         for (int i = 0; i < RegExpMacroAssembler::kTableSize; i++) {
             frequencies_[i] = CharacterFrequency(i);
@@ -1978,17 +1977,17 @@ RegExpAssertion::ToNode(RegExpCompiler* 
         // Add the two alternatives to the ChoiceNode.
         GuardedAlternative eol_alternative(end_of_line);
         result->AddAlternative(eol_alternative);
         GuardedAlternative end_alternative(AssertionNode::AtEnd(on_success));
         result->AddAlternative(end_alternative);
         return result;
       }
       default:
-        MOZ_ASSUME_UNREACHABLE("Bad assertion type");
+        MOZ_CRASH("Bad assertion type");
     }
     return on_success;
 }
 
 RegExpNode *
 RegExpBackReference::ToNode(RegExpCompiler* compiler, RegExpNode* on_success)
 {
     return compiler->alloc()->newInfallible<BackReferenceNode>(RegExpCapture::StartRegister(index()),
@@ -2509,18 +2508,17 @@ Trace::PerformDeferredActions(LifoAlloc 
                         clear = true;
                     }
                     undo_action = DEFER_RESTORE;
                     JS_ASSERT(!absolute);
                     JS_ASSERT(value == 0);
                     break;
                   }
                   default:
-                    MOZ_ASSUME_UNREACHABLE("Bad action");
-                    break;
+                    MOZ_CRASH("Bad action");
                 }
             }
         }
         // Prepare for the undo-action (e.g., push if it's going to be popped).
         if (undo_action == DEFER_RESTORE) {
             pushes++;
             RegExpMacroAssembler::StackCheckFlag stack_check =
                 RegExpMacroAssembler::kNoStackLimitCheck;
@@ -2715,19 +2713,19 @@ EndNode::Emit(RegExpCompiler* compiler, 
     case ACCEPT:
         assembler->Succeed();
         return;
     case BACKTRACK:
         assembler->JumpOrBacktrack(trace->backtrack());
         return;
     case NEGATIVE_SUBMATCH_SUCCESS:
         // This case is handled in a different virtual method.
-        MOZ_ASSUME_UNREACHABLE("Bad action");
+        MOZ_CRASH("Bad action: NEGATIVE_SUBMATCH_SUCCESS");
     }
-    MOZ_ASSUME_UNREACHABLE("Bad action");
+    MOZ_CRASH("Bad action");
 }
 
 // Emit the code to check for a ^ in multiline mode (1-character lookbehind
 // that matches newline or the start of input).
 static void
 EmitHat(RegExpCompiler* compiler, RegExpNode* on_success, Trace* trace)
 {
     RegExpMacroAssembler* assembler = compiler->macro_assembler();
@@ -3539,18 +3537,17 @@ EmitAtomLetter(RegExpCompiler* compiler,
         // Fall through!
       case 3:
         macro_assembler->CheckCharacter(chars[0], &ok);
         macro_assembler->CheckCharacter(chars[1], &ok);
         macro_assembler->CheckNotCharacter(chars[2], on_failure);
         macro_assembler->Bind(&ok);
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE("Bad length");
-        break;
+        MOZ_CRASH("Bad length");
     }
     return true;
 }
 
 // We call this repeatedly to generate code for each pass over the text node.
 // The passes are in increasing order of difficulty because we hope one
 // of the first passes will fail in which case we are saved the work of the
 // later passes.  for example for the case independent regexp /%[asdfghjkl]a/
@@ -4351,17 +4348,17 @@ ActionNode::Emit(RegExpCompiler* compile
         int clear_registers_to = clear_registers_from + clear_register_count - 1;
         assembler->ClearRegisters(clear_registers_from, clear_registers_to);
 
         JS_ASSERT(trace->backtrack() == nullptr);
         assembler->Backtrack();
         return;
       }
       default:
-        MOZ_ASSUME_UNREACHABLE("Bad action");
+        MOZ_CRASH("Bad action");
     }
 }
 
 void
 BackReferenceNode::Emit(RegExpCompiler* compiler, Trace* trace)
 {
     RegExpMacroAssembler* assembler = compiler->macro_assembler();
     if (!trace->is_trivial()) {
--- a/js/src/irregexp/RegExpEngine.h
+++ b/js/src/irregexp/RegExpEngine.h
@@ -521,17 +521,17 @@ class RegExpNode
     // we look forward.  This is used for a Boyer-Moore-like string searching
     // implementation.  TODO(erikcorry):  This should share more code with
     // EatsAtLeast, GetQuickCheckDetails.  The budget argument is used to limit
     // the number of nodes we are willing to look at in order to create this data.
     virtual void FillInBMInfo(int offset,
                               int budget,
                               BoyerMooreLookahead* bm,
                               bool not_at_start) {
-        MOZ_ASSUME_UNREACHABLE("Bad call");
+        MOZ_CRASH("Bad call");
     }
 
     // If we know that the input is ASCII then there are some nodes that can
     // never match.  This method returns a node that can be substituted for
     // itself, or nullptr if the node can never match.
     virtual RegExpNode* FilterASCII(int depth, bool ignore_case) { return this; }
 
     // Helper for FilterASCII.
@@ -899,24 +899,24 @@ class EndNode : public RegExpNode
                             int recursion_depth,
                             bool not_at_start) { return 0; }
     virtual void GetQuickCheckDetails(QuickCheckDetails* details,
                                       RegExpCompiler* compiler,
                                       int characters_filled_in,
                                       bool not_at_start)
     {
         // Returning 0 from EatsAtLeast should ensure we never get here.
-        MOZ_ASSUME_UNREACHABLE("Bad call");
+        MOZ_CRASH("Bad call");
     }
     virtual void FillInBMInfo(int offset,
                               int budget,
                               BoyerMooreLookahead* bm,
                               bool not_at_start) {
         // Returning 0 from EatsAtLeast should ensure we never get here.
-        MOZ_ASSUME_UNREACHABLE("Bad call");
+        MOZ_CRASH("Bad call");
     }
 
   private:
     Action action_;
 };
 
 class NegativeSubmatchSuccess : public EndNode
 {
--- a/js/src/irregexp/RegExpInterpreter.cpp
+++ b/js/src/irregexp/RegExpInterpreter.cpp
@@ -123,18 +123,17 @@ irregexp::InterpretCode(JSContext *cx, c
         return RegExpRunStatus_Error;
     for (size_t i = 0; i < matches->length() * 2; i++)
         registers[i] = -1;
 
     while (true) {
         int32_t insn = Load32Aligned(pc);
         switch (insn & BYTECODE_MASK) {
           BYTECODE(BREAK)
-            MOZ_ASSUME_UNREACHABLE("Bad bytecode");
-            return RegExpRunStatus_Error;
+            MOZ_CRASH("Bad bytecode: BREAK");
           BYTECODE(PUSH_CP)
             if (!stack.push(current))
                 return RegExpRunStatus_Error;
             pc += BC_PUSH_CP_LENGTH;
             break;
           BYTECODE(PUSH_BT)
             if (!stack.push(Load32Aligned(pc + 4)))
                 return RegExpRunStatus_Error;
@@ -236,20 +235,19 @@ irregexp::InterpretCode(JSContext *cx, c
           BYTECODE(LOAD_2_CURRENT_CHARS_UNCHECKED) {
             int pos = current + (insn >> BYTECODE_SHIFT);
             jschar next = chars[pos + 1];
             current_char = (chars[pos] | (next << (kBitsPerByte * sizeof(jschar))));
             pc += BC_LOAD_2_CURRENT_CHARS_UNCHECKED_LENGTH;
             break;
           }
           BYTECODE(LOAD_4_CURRENT_CHARS)
-            MOZ_ASSUME_UNREACHABLE("Ascii handling implemented");
-            break;
+            MOZ_CRASH("ASCII handling implemented");
           BYTECODE(LOAD_4_CURRENT_CHARS_UNCHECKED)
-            MOZ_ASSUME_UNREACHABLE("Ascii handling implemented");
+            MOZ_CRASH("ASCII handling implemented");
           BYTECODE(CHECK_4_CHARS) {
             uint32_t c = Load32Aligned(pc + 4);
             if (c == current_char)
                 pc = byteCode + Load32Aligned(pc + 8);
             else
                 pc += BC_CHECK_4_CHARS_LENGTH;
             break;
           }
@@ -447,18 +445,17 @@ irregexp::InterpretCode(JSContext *cx, c
             if (length - current > by) {
                 current = length - by;
                 current_char = chars[current - 1];
             }
             pc += BC_SET_CURRENT_POSITION_FROM_END_LENGTH;
             break;
           }
           default:
-            MOZ_ASSUME_UNREACHABLE("Bad bytecode");
-            break;
+            MOZ_CRASH("Bad bytecode");
         }
     }
 }
 
 template RegExpRunStatus
 irregexp::InterpretCode(JSContext *cx, const uint8_t *byteCode, const Latin1Char *chars, size_t current,
                         size_t length, MatchPairs *matches);
 
--- a/js/src/irregexp/RegExpParser.cpp
+++ b/js/src/irregexp/RegExpParser.cpp
@@ -189,18 +189,17 @@ RegExpBuilder::AddQuantifierToAtom(int m
             last_added_ = ADD_TERM;
             if (min == 0)
                 return;
             terms_.Add(alloc, atom);
             return;
         }
     } else {
         // Only call immediately after adding an atom or character!
-        MOZ_ASSUME_UNREACHABLE("Bad call");
-        return;
+        MOZ_CRASH("Bad call");
     }
     terms_.Add(alloc, alloc->newInfallible<RegExpQuantifier>(min, max, quantifier_type, atom));
     last_added_ = ADD_TERM;
 }
 
 // ----------------------------------------------------------------------------
 // RegExpParser
 
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4588,17 +4588,17 @@ JS::FinishOffThreadScript(JSContext *may
             AutoLastFrameCheck lfc(maybecx);
             script = HelperThreadState().finishParseTask(maybecx, rt, token);
         }
         return script;
     } else {
         return HelperThreadState().finishParseTask(maybecx, rt, token);
     }
 #else
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation is not available.");
+    MOZ_CRASH("Off thread compilation is not available.");
 #endif
 }
 
 JS_PUBLIC_API(bool)
 JS_CompileScript(JSContext *cx, JS::HandleObject obj, const char *ascii,
                  size_t length, const JS::CompileOptions &options, MutableHandleScript script)
 {
     return Compile(cx, obj, options, ascii, length, script);
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -1295,17 +1295,17 @@ byteSize(Type atype)
         return 2;
       case Int32:
       case Uint32:
       case Float32:
         return 4;
       case Float64:
         return 8;
       default:
-        MOZ_ASSUME_UNREACHABLE("invalid type");
+        MOZ_CRASH("invalid scalar type");
     }
 }
 
 } /* namespace Scalar */
 } /* namespace js */
 
 /*
  * Create a new typed array with nelements elements.
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -141,21 +141,19 @@ fun_getProperty(JSContext *cx, HandleObj
                                              JSMSG_CALLER_IS_STRICT);
                 return false;
             }
         }
 
         return true;
     }
 
-    MOZ_ASSUME_UNREACHABLE("fun_getProperty");
+    MOZ_CRASH("fun_getProperty");
 }
 
-
-
 /* NB: no sentinels at ends -- use ArrayLength to bound loops.
  * Properties censored into [[ThrowTypeError]] in strict mode. */
 static const uint16_t poisonPillProps[] = {
     NAME_OFFSET(arguments),
     NAME_OFFSET(caller),
 };
 
 static bool
@@ -2011,18 +2009,16 @@ JSObject::hasIdempotentProtoChain() cons
 
         if (obj->getOps()->lookupProperty || obj->getOps()->lookupGeneric || obj->getOps()->lookupElement)
             return false;
 
         obj = obj->getProto();
         if (!obj)
             return true;
     }
-
-    MOZ_ASSUME_UNREACHABLE("Should not get here");
 }
 
 namespace JS {
 namespace detail {
 
 JS_PUBLIC_API(void)
 CheckIsValidConstructible(Value calleev)
 {
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -165,17 +165,17 @@ ExecutionModeString(ExecutionMode mode)
         return "SequentialExecution";
       case ParallelExecution:
         return "ParallelExecution";
       case DefinitePropertiesAnalysis:
         return "DefinitePropertiesAnalysis";
       case ArgumentsUsageAnalysis:
         return "ArgumentsUsageAnalysis";
       default:
-        MOZ_ASSUME_UNREACHABLE("Invalid ExecutionMode");
+        MOZ_CRASH("Invalid ExecutionMode");
     }
 }
 
 /*
  * Not as part of the enum so we don't get warnings about unhandled enum
  * values.
  */
 static const unsigned NumExecutionModes = ParallelExecution + 1;
--- a/js/src/jsinferinlines.h
+++ b/js/src/jsinferinlines.h
@@ -38,18 +38,19 @@ CompilerOutput::ion() const
 #ifdef JS_ION
     // Note: If type constraints are generated before compilation has finished
     // (i.e. after IonBuilder but before CodeGenerator::link) then a valid
     // CompilerOutput may not yet have an associated IonScript.
     JS_ASSERT(isValid());
     jit::IonScript *ion = jit::GetIonScript(script(), mode());
     JS_ASSERT(ion != ION_COMPILING_SCRIPT);
     return ion;
+#else
+    MOZ_CRASH("Invalid kind of CompilerOutput");
 #endif
-    MOZ_ASSUME_UNREACHABLE("Invalid kind of CompilerOutput");
 }
 
 inline CompilerOutput*
 RecompileInfo::compilerOutput(TypeZone &types) const
 {
     if (!types.compilerOutputs || outputIndex >= types.compilerOutputs->length())
         return nullptr;
     return &(*types.compilerOutputs)[outputIndex];
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -2159,17 +2159,17 @@ js::XDRObjectLiteral(XDRState<mode> *xdr
         for (unsigned i = 0; i < nslot; i++) {
             if (mode == XDR_ENCODE) {
                 id = ids[i];
                 if (JSID_IS_INT(id))
                     idType = JSID_TYPE_INT;
                 else if (JSID_IS_ATOM(id))
                     idType = JSID_TYPE_STRING;
                 else
-                    MOZ_ASSUME_UNREACHABLE("Object property is not yet supported by XDR.");
+                    MOZ_CRASH("Object property is not yet supported by XDR.");
 
                 tmpValue = obj->getSlot(i);
             }
 
             if (!xdr->codeUint32(&idType))
                 return false;
 
             if (idType == JSID_TYPE_STRING) {
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -1015,17 +1015,17 @@ ObjectClassIs(HandleObject obj, ESClassV
       case ESClass_Number: return obj->is<NumberObject>();
       case ESClass_String: return obj->is<StringObject>();
       case ESClass_Boolean: return obj->is<BooleanObject>();
       case ESClass_RegExp: return obj->is<RegExpObject>();
       case ESClass_ArrayBuffer:
         return obj->is<ArrayBufferObject>() || obj->is<SharedArrayBufferObject>();
       case ESClass_Date: return obj->is<DateObject>();
     }
-    MOZ_ASSUME_UNREACHABLE("bad classValue");
+    MOZ_CRASH("bad classValue");
 }
 
 inline bool
 IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx)
 {
     if (!v.isObject())
         return false;
     RootedObject obj(cx, &v.toObject());
--- a/js/src/jsonparser.cpp
+++ b/js/src/jsonparser.cpp
@@ -204,17 +204,17 @@ JSONParser<CharT>::readString()
                     ; // already at correct location
                 else if (current + 1 == end || !JS7_ISHEX(current[1]))
                     current += 1;
                 else if (current + 2 == end || !JS7_ISHEX(current[2]))
                     current += 2;
                 else if (current + 3 == end || !JS7_ISHEX(current[3]))
                     current += 3;
                 else
-                    MOZ_ASSUME_UNREACHABLE("logic error determining first erroneous character");
+                    MOZ_CRASH("logic error determining first erroneous character");
 
                 error("bad Unicode escape");
                 return token(Error);
             }
             c = (JS7_UNHEX(current[0]) << 12)
               | (JS7_UNHEX(current[1]) << 8)
               | (JS7_UNHEX(current[2]) << 4)
               | (JS7_UNHEX(current[3]));
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -97,17 +97,17 @@ js_GetVariableBytecodeLength(jsbytecode 
         pc += JUMP_OFFSET_LEN;
         int32_t low = GET_JUMP_OFFSET(pc);
         pc += JUMP_OFFSET_LEN;
         int32_t high = GET_JUMP_OFFSET(pc);
         unsigned ncases = unsigned(high - low + 1);
         return 1 + 3 * JUMP_OFFSET_LEN + ncases * JUMP_OFFSET_LEN;
       }
       default:
-        MOZ_ASSUME_UNREACHABLE("Unexpected op");
+        MOZ_CRASH("Unexpected op");
     }
 }
 
 unsigned
 js::StackUses(JSScript *script, jsbytecode *pc)
 {
     JSOp op = (JSOp) *pc;
     const JSCodeSpec &cs = js_CodeSpec[op];
@@ -204,23 +204,23 @@ PCCounts::countName(JSOp op, size_t whic
 
     if (accessOp(op)) {
         if (which < ACCESS_LIMIT)
             return countAccessNames[which - BASE_LIMIT];
         if (elementOp(op))
             return countElementNames[which - ACCESS_LIMIT];
         if (propertyOp(op))
             return countPropertyNames[which - ACCESS_LIMIT];
-        MOZ_ASSUME_UNREACHABLE("bad op");
+        MOZ_CRASH("bad op");
     }
 
     if (arithOp(op))
         return countArithNames[which - BASE_LIMIT];
 
-    MOZ_ASSUME_UNREACHABLE("bad op");
+    MOZ_CRASH("bad op");
 }
 
 #ifdef JS_ION
 void
 js::DumpIonScriptCounts(Sprinter *sp, jit::IonScriptCounts *ionCounts)
 {
     Sprint(sp, "IonScript [%lu blocks]:\n", ionCounts->numBlocks());
     for (size_t i = 0; i < ionCounts->numBlocks(); i++) {
@@ -2133,21 +2133,21 @@ js::GetPCCountScriptSummary(JSContext *c
             } else if (PCCounts::accessOp(op)) {
                 if (j < PCCounts::ACCESS_LIMIT)
                     accessTotals[j - PCCounts::BASE_LIMIT] += value;
                 else if (PCCounts::elementOp(op))
                     elementTotals[j - PCCounts::ACCESS_LIMIT] += value;
                 else if (PCCounts::propertyOp(op))
                     propertyTotals[j - PCCounts::ACCESS_LIMIT] += value;
                 else
-                    MOZ_ASSUME_UNREACHABLE("Bad opcode");
+                    MOZ_CRASH("Bad opcode");
             } else if (PCCounts::arithOp(op)) {
                 arithTotals[j - PCCounts::BASE_LIMIT] += value;
             } else {
-                MOZ_ASSUME_UNREACHABLE("Bad opcode");
+                MOZ_CRASH("Bad opcode");
             }
         }
     }
 
     AppendJSONProperty(buf, "totals");
     buf.append('{');
 
     MaybeComma comma = NO_COMMA;
--- a/js/src/jsopcode.h
+++ b/js/src/jsopcode.h
@@ -673,17 +673,17 @@ GetBytecodeInteger(jsbytecode *pc)
     switch (JSOp(*pc)) {
       case JSOP_ZERO:   return 0;
       case JSOP_ONE:    return 1;
       case JSOP_UINT16: return GET_UINT16(pc);
       case JSOP_UINT24: return GET_UINT24(pc);
       case JSOP_INT8:   return GET_INT8(pc);
       case JSOP_INT32:  return GET_INT32(pc);
       default:
-        MOZ_ASSUME_UNREACHABLE("Bad op");
+        MOZ_CRASH("Bad op");
     }
 }
 
 /*
  * Counts accumulated for a single opcode in a script. The counts tracked vary
  * between opcodes, and this structure ensures that counts are accessed in a
  * coherent fashion.
  */
--- a/js/src/jsopcodeinlines.h
+++ b/js/src/jsopcodeinlines.h
@@ -64,17 +64,17 @@ ReverseCompareOp(JSOp op)
       case JSOP_LE:
         return JSOP_GE;
       case JSOP_EQ:
       case JSOP_NE:
       case JSOP_STRICTEQ:
       case JSOP_STRICTNE:
         return op;
       default:
-        MOZ_ASSUME_UNREACHABLE("unrecognized op");
+        MOZ_CRASH("unrecognized op");
     }
 }
 
 static inline JSOp
 NegateCompareOp(JSOp op)
 {
     switch (op) {
       case JSOP_GT:
@@ -89,17 +89,17 @@ NegateCompareOp(JSOp op)
         return JSOP_NE;
       case JSOP_NE:
         return JSOP_EQ;
       case JSOP_STRICTNE:
         return JSOP_STRICTEQ;
       case JSOP_STRICTEQ:
         return JSOP_STRICTNE;
       default:
-        MOZ_ASSUME_UNREACHABLE("unrecognized op");
+        MOZ_CRASH("unrecognized op");
     }
 }
 
 class BytecodeRange {
   public:
     BytecodeRange(JSContext *cx, JSScript *script)
       : script(cx, script), pc(script->code()), end(pc + script->length())
     {}
--- a/js/src/jsproxy.cpp
+++ b/js/src/jsproxy.cpp
@@ -273,23 +273,23 @@ BaseProxyHandler::iterate(JSContext *cx,
     }
 
     return EnumeratedIdVectorToIterator(cx, proxy, flags, props, vp);
 }
 
 bool
 BaseProxyHandler::call(JSContext *cx, HandleObject proxy, const CallArgs &args) const
 {
-    MOZ_ASSUME_UNREACHABLE("callable proxies should implement call trap");
+    MOZ_CRASH("callable proxies should implement call trap");
 }
 
 bool
 BaseProxyHandler::construct(JSContext *cx, HandleObject proxy, const CallArgs &args) const
 {
-    MOZ_ASSUME_UNREACHABLE("callable proxies should implement construct trap");
+    MOZ_CRASH("callable proxies should implement construct trap");
 }
 
 const char *
 BaseProxyHandler::className(JSContext *cx, HandleObject proxy) const
 {
     return proxy->isCallable() ? "Function" : "Object";
 }
 
@@ -302,17 +302,17 @@ BaseProxyHandler::fun_toString(JSContext
     ReportIsNotFunction(cx, v);
     return nullptr;
 }
 
 bool
 BaseProxyHandler::regexp_toShared(JSContext *cx, HandleObject proxy,
                                   RegExpGuard *g) const
 {
-    MOZ_ASSUME_UNREACHABLE("This should have been a wrapped regexp");
+    MOZ_CRASH("This should have been a wrapped regexp");
 }
 
 bool
 BaseProxyHandler::defaultValue(JSContext *cx, HandleObject proxy, JSType hint,
                                MutableHandleValue vp) const
 {
     return DefaultValue(cx, proxy, hint, vp);
 }
@@ -351,17 +351,17 @@ JSObject *
 BaseProxyHandler::weakmapKeyDelegate(JSObject *proxy) const
 {
     return nullptr;
 }
 
 bool
 BaseProxyHandler::getPrototypeOf(JSContext *cx, HandleObject proxy, MutableHandleObject protop) const
 {
-    MOZ_ASSUME_UNREACHABLE("Must override getPrototypeOf with lazy prototype.");
+    MOZ_CRASH("Must override getPrototypeOf with lazy prototype.");
 }
 
 bool
 BaseProxyHandler::setPrototypeOf(JSContext *cx, HandleObject, HandleObject, bool *) const
 {
     // Disallow sets of protos on proxies with lazy protos, but no hook.
     // This keeps us away from the footgun of having the first proto set opt
     // you out of having dynamic protos altogether.
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -498,17 +498,17 @@ FindScopeObjectIndex(JSScript *script, N
     ObjectArray *objects = script->objects();
     HeapPtrObject *vector = objects->vector;
     unsigned length = objects->length;
     for (unsigned i = 0; i < length; ++i) {
         if (vector[i] == &scope)
             return i;
     }
 
-    MOZ_ASSUME_UNREACHABLE("Scope not found");
+    MOZ_CRASH("Scope not found");
 }
 
 static bool
 SaveSharedScriptData(ExclusiveContext *, Handle<JSScript *>, SharedScriptData *, uint32_t);
 
 enum XDRClassKind {
     CK_BlockObject = 0,
     CK_WithObject  = 1,
@@ -860,17 +860,17 @@ js::XDRScript(XDRState<mode> *xdr, Handl
                 classk = CK_BlockObject;
             else if (obj->is<StaticWithObject>())
                 classk = CK_WithObject;
             else if (obj->is<JSFunction>())
                 classk = CK_JSFunction;
             else if (obj->is<JSObject>() || obj->is<ArrayObject>())
                 classk = CK_JSObject;
             else
-                MOZ_ASSUME_UNREACHABLE("Cannot encode this class of object.");
+                MOZ_CRASH("Cannot encode this class of object.");
         }
 
         if (!xdr->codeEnum32(&classk))
             return false;
 
         switch (classk) {
           case CK_BlockObject:
           case CK_WithObject: {
--- a/js/src/prmjtime.cpp
+++ b/js/src/prmjtime.cpp
@@ -260,18 +260,16 @@ PRMJ_Now()
         // faulty QueryPerformanceCounter implementation and user
         // changes to the operating system time. Since we must
         // respect user changes to the operating system time, we
         // cannot maintain the invariant that Date.now() never
         // decreases; the old implementation has this behavior as
         // well.
         needsCalibration = true;
     }
-
-    MOZ_ASSUME_UNREACHABLE("Shouldn't get here");
 }
 #endif
 
 #ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
 static void
 PRMJ_InvalidParameterHandler(const wchar_t *expression,
                              const wchar_t *function,
                              const wchar_t *file,
--- a/js/src/shell/jsoptparse.cpp
+++ b/js/src/shell/jsoptparse.cpp
@@ -130,17 +130,17 @@ PrintParagraph(const char *text, unsigne
             /* Could also have line-leading spaces. */
             while (*it == ' ') {
                 putchar(' ');
                 ++colno;
                 ++it;
             }
             break;
           default:
-            MOZ_ASSUME_UNREACHABLE("unhandled token splitting character in text");
+            MOZ_CRASH("unhandled token splitting character in text");
         }
     }
 }
 
 static const char *
 OptionFlagsToFormatInfo(char shortflag, bool isValued, size_t *length)
 {
     static const char * const fmt[4] = { "  -%c --%s ",
@@ -304,17 +304,17 @@ OptionParser::handleOption(Option *opt, 
       {
         char *value = nullptr;
         if (Result r = extractValue(argc, argv, i, &value))
             return r;
         StringArg arg(value, *i);
         return opt->asMultiStringOption()->strings.append(arg) ? Okay : Fail;
       }
       default:
-        MOZ_ASSUME_UNREACHABLE("unhandled option kind");
+        MOZ_CRASH("unhandled option kind");
     }
 }
 
 OptionParser::Result
 OptionParser::handleArg(size_t argc, char **argv, size_t *i, bool *optionsAllowed)
 {
     if (nextArgument >= arguments.length())
         return error("Too many arguments provided");
@@ -331,17 +331,17 @@ OptionParser::handleArg(size_t argc, cha
         return Okay;
       case OptionKindMultiString:
       {
         /* Don't advance the next argument -- there can only be one (final) variadic argument. */
         StringArg value(argv[*i], *i);
         return arg->asMultiStringOption()->strings.append(value) ? Okay : Fail;
       }
       default:
-        MOZ_ASSUME_UNREACHABLE("unhandled argument kind");
+        MOZ_CRASH("unhandled argument kind");
     }
 }
 
 OptionParser::Result
 OptionParser::parseArgs(int inputArgc, char **argv)
 {
     JS_ASSERT(inputArgc >= 0);
     size_t argc = inputArgc;
--- a/js/src/tests/js1_8_1/regress/regress-452498-053.js
+++ b/js/src/tests/js1_8_1/regress/regress-452498-053.js
@@ -28,17 +28,17 @@ function test()
 // at ../jsobj.cpp:5559
 // On the last line of BindLet, we have
 //    JS_SetReservedSlot(cx, blockObj, index, PRIVATE_TO_JSVAL(pn));
 // but this uses reserved slots as though they were unlimited.
 // blockObj only has 2.
   let (a=0, b=1, c=2) {}
 
 // In RecycleTree at ../jsparse.cpp:315, we hit
-//     MOZ_ASSUME_UNREACHABLE("RecycleUseDefKids");
+//     MOZ_CRASH("RecycleUseDefKids");
 // pn->pn_type is TOK_UNARYOP
 // pn->pn_op   is JSOP_XMLNAME
 // pn->pn_defn is 1
 // pn->pn_used is 1
   try
   {
     true; 0;
   }
--- a/js/src/vm/ArgumentsObject-inl.h
+++ b/js/src/vm/ArgumentsObject-inl.h
@@ -38,17 +38,17 @@ ArgumentsObject::setElement(JSContext *c
         uint32_t slot = lhs.magicUint32();
         CallObject &callobj = getFixedSlot(MAYBE_CALL_SLOT).toObject().as<CallObject>();
         for (Shape::Range<NoGC> r(callobj.lastProperty()); !r.empty(); r.popFront()) {
             if (r.front().slot() == slot) {
                 callobj.setAliasedVarFromArguments(cx, lhs, r.front().propid(), v);
                 return;
             }
         }
-        MOZ_ASSUME_UNREACHABLE("Bad Arguments::setElement");
+        MOZ_CRASH("Bad Arguments::setElement");
     }
     lhs = v;
 }
 
 inline bool
 ArgumentsObject::maybeGetElements(uint32_t start, uint32_t count, Value *vp)
 {
     JS_ASSERT(start + count >= start);
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -663,17 +663,17 @@ Debugger::slowPathOnLeaveFrame(JSContext
         cx->setPendingException(value);
         return false;
 
       case JSTRAP_ERROR:
         JS_ASSERT(!cx->isExceptionPending());
         return false;
 
       default:
-        MOZ_ASSUME_UNREACHABLE("bad final trap status");
+        MOZ_CRASH("bad final trap status");
     }
 }
 
 bool
 Debugger::wrapEnvironment(JSContext *cx, Handle<Env*> env, MutableHandleValue rval)
 {
     if (!env) {
         rval.setNull();
@@ -949,17 +949,17 @@ Debugger::newCompletionValue(JSContext *
         key = NameToId(cx->names().throw_);
         break;
 
       case JSTRAP_ERROR:
         result.setNull();
         return true;
 
       default:
-        MOZ_ASSUME_UNREACHABLE("bad status passed to Debugger::newCompletionValue");
+        MOZ_CRASH("bad status passed to Debugger::newCompletionValue");
     }
 
     /* Common tail for JSTRAP_RETURN and JSTRAP_THROW. */
     RootedObject obj(cx, NewBuiltinClassInstance(cx, &JSObject::class_));
     if (!obj ||
         !wrapDebuggeeValue(cx, &value) ||
         !DefineNativeProperty(cx, obj, key, value, JS_PropertyStub, JS_StrictPropertyStub,
                               JSPROP_ENUMERATE))
--- a/js/src/vm/ForkJoin.cpp
+++ b/js/src/vm/ForkJoin.cpp
@@ -84,54 +84,53 @@ bool
 ForkJoinContext::isMainThread() const
 {
     return true;
 }
 
 JSRuntime *
 ForkJoinContext::runtime()
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 bool
 ForkJoinContext::check()
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 void
 ForkJoinContext::requestGC(JS::gcreason::Reason reason)
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 void
 ForkJoinContext::requestZoneGC(JS::Zone *zone, JS::gcreason::Reason reason)
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 bool
 ForkJoinContext::setPendingAbortFatal(ParallelBailoutCause cause)
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
-    return false;
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 void
 ParallelBailoutRecord::rematerializeFrames(ForkJoinContext *cx, JitFrameIterator &frameIter)
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 void
 ParallelBailoutRecord::rematerializeFrames(ForkJoinContext *cx, IonBailoutIterator &frameIter)
 {
-    MOZ_ASSUME_UNREACHABLE("Not THREADSAFE build");
+    MOZ_CRASH("Not THREADSAFE build");
 }
 
 bool
 js::InExclusiveParallelSection()
 {
     return false;
 }
 
@@ -648,17 +647,17 @@ ForkJoinOperation::apply()
         // compiled scripts were collected.
         if (ParallelTestsShouldPass(cx_) && worklist_.length() != 0) {
             JS_ReportError(cx_, "ForkJoin: compilation required in par or bailout mode");
             return SpewEndOp(ExecutionFatal);
         }
         break;
 
       case NumForkJoinModes:
-        MOZ_ASSUME_UNREACHABLE("Invalid mode");
+        MOZ_CRASH("Invalid mode");
     }
 
     while (bailouts < MAX_BAILOUTS) {
         for (uint32_t i = 0; i < numWorkers; i++)
             bailoutRecords_[i].reset();
 
         if (compileForParallelExecution(&status) == RedLight)
             return SpewEndOp(status);
@@ -1055,17 +1054,17 @@ BailoutExplanation(ParallelBailoutCause 
         return "stack limit exceeded";
       case ParallelBailoutOutOfMemory:
         return "out of memory";
       case ParallelBailoutRequestedGC:
         return "requested GC of common heap";
       case ParallelBailoutRequestedZoneGC:
         return "requested zone GC of common heap";
       default:
-        MOZ_ASSUME_UNREACHABLE("Invalid ParallelBailoutCause");
+        MOZ_CRASH("Invalid ParallelBailoutCause");
     }
 }
 
 static const char *
 IonBailoutKindExplanation(ParallelBailoutCause cause, BailoutKind kind)
 {
     if (cause != ParallelBailoutExecution)
         return "";
@@ -1130,17 +1129,17 @@ IonBailoutKindExplanation(ParallelBailou
         return "out of bounds element access";
       case Bailout_Neutered:
         return "neutered typed object access";
       case Bailout_ShapeGuard:
         return "saw unexpected shape";
       case Bailout_IonExceptionDebugMode:
         // Fallthrough. This case cannot occur in parallel execution.
       default:
-        MOZ_ASSUME_UNREACHABLE("Invalid BailoutKind");
+        MOZ_CRASH("Invalid BailoutKind");
     }
 }
 
 bool
 ForkJoinOperation::isInitialScript(HandleScript script)
 {
     return fun_->is<JSFunction>() && (fun_->as<JSFunction>().nonLazyScript() == script);
 }
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -47,17 +47,17 @@ struct ProtoTableEntry {
 #define DECLARE_PROTOTYPE_CLASS_INIT(name,code,init,clasp) \
     extern JSObject *init(JSContext *cx, Handle<JSObject*> obj);
 JS_FOR_EACH_PROTOTYPE(DECLARE_PROTOTYPE_CLASS_INIT)
 #undef DECLARE_PROTOTYPE_CLASS_INIT
 
 JSObject *
 js_InitViaClassSpec(JSContext *cx, Handle<JSObject*> obj)
 {
-    MOZ_ASSUME_UNREACHABLE();
+    MOZ_CRASH("js_InitViaClassSpec() should not be called.");
 }
 
 static const ProtoTableEntry protoTable[JSProto_LIMIT] = {
 #define INIT_FUNC(name,code,init,clasp) { clasp, init },
 #define INIT_FUNC_DUMMY(name,code,init,clasp) { nullptr, nullptr },
     JS_FOR_PROTOTYPES(INIT_FUNC, INIT_FUNC_DUMMY)
 #undef INIT_FUNC_DUMMY
 #undef INIT_FUNC
--- a/js/src/vm/HelperThreads.cpp
+++ b/js/src/vm/HelperThreads.cpp
@@ -566,17 +566,17 @@ IonBuilderHasHigherPriority(jit::IonBuil
 
     // A script without an IonScript has precedence on one with.
     if (first->script()->hasIonScript() != second->script()->hasIonScript())
         return !first->script()->hasIonScript();
 
     // A higher useCount indicates a higher priority.
     return first->script()->getUseCount() > second->script()->getUseCount();
 #else
-    MOZ_ASSUME_UNREACHABLE("Cannot infer priority without Ion");
+    MOZ_CRASH("Cannot infer priority without Ion");
 #endif
 }
 
 bool
 GlobalHelperThreadState::canStartIonCompile()
 {
     return !ionWorklist().empty();
 }
@@ -1266,36 +1266,36 @@ HelperThread::threadLoop()
             handleIonWorkload();
         else if (HelperThreadState().canStartParseTask())
             handleParseWorkload();
         else if (HelperThreadState().canStartCompressionTask())
             handleCompressionWorkload();
         else if (HelperThreadState().canStartGCHelperTask())
             handleGCHelperWorkload();
         else
-            MOZ_ASSUME_UNREACHABLE("No task to perform");
+            MOZ_CRASH("No task to perform");
     }
 }
 
 #else /* JS_THREADSAFE */
 
 using namespace js;
 
 #ifdef JS_ION
 
 bool
 js::StartOffThreadAsmJSCompile(ExclusiveContext *cx, AsmJSParallelTask *asmData)
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation not available in non-THREADSAFE builds");
+    MOZ_CRASH("Off thread compilation not available in non-THREADSAFE builds");
 }
 
 bool
 js::StartOffThreadIonCompile(JSContext *cx, jit::IonBuilder *builder)
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation not available in non-THREADSAFE builds");
+    MOZ_CRASH("Off thread compilation not available in non-THREADSAFE builds");
 }
 
 #endif // JS_ION
 
 void
 js::CancelOffThreadIonCompile(JSCompartment *compartment, JSScript *script)
 {
 }
@@ -1305,43 +1305,43 @@ js::CancelOffThreadParses(JSRuntime *rt)
 {
 }
 
 bool
 js::StartOffThreadParseScript(JSContext *cx, const ReadOnlyCompileOptions &options,
                               const jschar *chars, size_t length,
                               JS::OffThreadCompileCallback callback, void *callbackData)
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation not available in non-THREADSAFE builds");
+    MOZ_CRASH("Off thread compilation not available in non-THREADSAFE builds");
 }
 
 bool
 js::StartOffThreadCompression(ExclusiveContext *cx, SourceCompressionTask *task)
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compression not available");
+    MOZ_CRASH("Off thread compression not available");
 }
 
 bool
 SourceCompressionTask::complete()
 {
     JS_ASSERT(!ss);
     return true;
 }
 
 frontend::CompileError &
 ExclusiveContext::addPendingCompileError()
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation not available.");
+    MOZ_CRASH("Off thread compilation not available.");
 }
 
 void
 ExclusiveContext::addPendingOverRecursed()
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation not available.");
+    MOZ_CRASH("Off thread compilation not available.");
 }
 
 void
 js::PauseCurrentHelperThread()
 {
-    MOZ_ASSUME_UNREACHABLE("Off thread compilation not available.");
+    MOZ_CRASH("Off thread compilation not available.");
 }
 
 #endif /* JS_THREADSAFE */
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -978,17 +978,17 @@ HandleError(JSContext *cx, InterpreterRe
               case JSTRAP_THROW:
                 break;
 
               case JSTRAP_RETURN:
                 ForcedReturn(cx, si, regs);
                 return SuccessfulReturnContinuation;
 
               default:
-                MOZ_ASSUME_UNREACHABLE("Invalid trap status");
+                MOZ_CRASH("Invalid trap status");
             }
         }
 
         RootedValue exception(cx);
         for (TryNoteIter tni(cx, regs); !tni.done(); ++tni) {
             JSTryNote *tn = *tni;
 
             UnwindScope(cx, si, regs.fp()->script()->main() + tn->start);
@@ -1491,17 +1491,17 @@ Interpret(JSContext *cx, RunState &state
             break;
           case JSTRAP_RETURN:
             ForcedReturn(cx, REGS);
             goto successful_return_continuation;
           case JSTRAP_THROW:
           case JSTRAP_ERROR:
             goto error;
           default:
-            MOZ_ASSUME_UNREACHABLE("bad ScriptDebugPrologue status");
+            MOZ_CRASH("bad ScriptDebugPrologue status");
         }
     }
 
     if (cx->runtime()->profilingScripts || cx->runtime()->debugHooks.interruptHook)
         activation.enableInterruptsUnconditionally();
 
     // Enter the interpreter loop starting at the current pc.
     ADVANCE_AND_DISPATCH(0);
@@ -2624,17 +2624,17 @@ CASE(JSOP_FUNCALL)
             break;
           case JSTRAP_RETURN:
             ForcedReturn(cx, REGS);
             goto successful_return_continuation;
           case JSTRAP_THROW:
           case JSTRAP_ERROR:
             goto error;
           default:
-            MOZ_ASSUME_UNREACHABLE("bad ScriptDebugPrologue status");
+            MOZ_CRASH("bad ScriptDebugPrologue status");
         }
     }
 
     /* Load first op and dispatch it (safe since JSOP_RETRVAL). */
     ADVANCE_AND_DISPATCH(0);
 }
 
 CASE(JSOP_SETCALL)
@@ -3374,17 +3374,17 @@ DEFAULT()
     JS_snprintf(numBuf, sizeof numBuf, "%d", *REGS.pc);
     JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
                          JSMSG_BAD_BYTECODE, numBuf);
     goto error;
 }
 
 } /* interpreter loop */
 
-    MOZ_ASSUME_UNREACHABLE("Interpreter loop exited via fallthrough");
+    MOZ_CRASH("Interpreter loop exited via fallthrough");
 
   error:
     switch (HandleError(cx, REGS)) {
       case SuccessfulReturnContinuation:
         goto successful_return_continuation;
 
       case ErrorReturnContinuation:
         interpReturnOK = false;
@@ -3403,17 +3403,18 @@ DEFAULT()
             interpReturnOK = false;
             goto return_continuation;
         }
         PUSH_BOOLEAN(true);
         PUSH_COPY(exception);
         cx->clearPendingException();
         ADVANCE_AND_DISPATCH(0);
     }
-    MOZ_ASSUME_UNREACHABLE("Invalid HandleError continuation");
+
+    MOZ_CRASH("Invalid HandleError continuation");
 
   exit:
     if (MOZ_UNLIKELY(cx->compartment()->debugMode()))
         interpReturnOK = ScriptDebugEpilogue(cx, REGS.fp(), REGS.pc, interpReturnOK);
     if (!REGS.fp()->isYielding())
         REGS.fp()->epilogue(cx);
     else
         probes::ExitScript(cx, script, script->functionNonDelazifying(),
@@ -3932,15 +3933,15 @@ js::SpreadCallOperation(JSContext *cx, H
             if (!DirectEval(cx, args))
                 return false;
         } else {
             if (!Invoke(cx, args))
                 return false;
         }
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE("bad spread opcode");
+        MOZ_CRASH("bad spread opcode");
     }
 
     res.set(args.rval());
     TypeScript::Monitor(cx, script, pc, res);
     return true;
 }
--- a/js/src/vm/MemoryMetrics.cpp
+++ b/js/src/vm/MemoryMetrics.cpp
@@ -495,17 +495,17 @@ StatsCellCallback(JSRuntime *rt, void *d
       case JSTRACE_TYPE_OBJECT: {
         types::TypeObject *obj = static_cast<types::TypeObject *>(thing);
         zStats->typeObjectsGCHeap += thingSize;
         zStats->typeObjectsMallocHeap += obj->sizeOfExcludingThis(rtStats->mallocSizeOf_);
         break;
       }
 
       default:
-        MOZ_ASSUME_UNREACHABLE("invalid traceKind");
+        MOZ_CRASH("invalid traceKind");
     }
 
     // Yes, this is a subtraction:  see StatsArenaCallback() for details.
     zStats->unusedGCThings -= thingSize;
 }
 
 static bool
 FindNotableStrings(ZoneStats &zStats)
--- a/js/src/vm/OldDebugAPI.cpp
+++ b/js/src/vm/OldDebugAPI.cpp
@@ -95,17 +95,17 @@ js::ScriptDebugPrologue(JSContext *cx, A
         break;
       case JSTRAP_ERROR:
         cx->clearPendingException();
         break;
       case JSTRAP_RETURN:
         frame.setReturnValue(rval);
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE("bad Debugger::onEnterFrame JSTrapStatus value");
+        MOZ_CRASH("bad Debugger::onEnterFrame JSTrapStatus value");
     }
     return status;
 }
 
 bool
 js::ScriptDebugEpilogue(JSContext *cx, AbstractFramePtr frame, jsbytecode *pc, bool okArg)
 {
     JS_ASSERT_IF(frame.isInterpreterFrame(), frame.asInterpreterFrame() == cx->interpreterFrame());
@@ -158,17 +158,17 @@ js::DebugExceptionUnwind(JSContext *cx, 
       case JSTRAP_THROW:
         cx->setPendingException(rval);
         break;
 
       case JSTRAP_CONTINUE:
         break;
 
       default:
-        MOZ_ASSUME_UNREACHABLE("Invalid trap status");
+        MOZ_CRASH("Invalid trap status");
     }
 
     return status;
 }
 
 JS_FRIEND_API(bool)
 JS_SetDebugModeForAllCompartments(JSContext *cx, bool debug)
 {
--- a/js/src/vm/PosixNSPR.cpp
+++ b/js/src/vm/PosixNSPR.cpp
@@ -205,23 +205,23 @@ PR_GetThreadPrivate(unsigned index)
     if (index >= gTLSKeyCount)
         return nullptr;
     return pthread_getspecific(gTLSKeys[index]);
 }
 
 PRStatus
 PR_CallOnce(PRCallOnceType *once, PRCallOnceFN func)
 {
-    MOZ_ASSUME_UNREACHABLE("PR_CallOnce unimplemented");
+    MOZ_CRASH("PR_CallOnce unimplemented");
 }
 
 PRStatus
 PR_CallOnceWithArg(PRCallOnceType *once, PRCallOnceWithArgFN func, void *arg)
 {
-    MOZ_ASSUME_UNREACHABLE("PR_CallOnceWithArg unimplemented");
+    MOZ_CRASH("PR_CallOnceWithArg unimplemented");
 }
 
 class nspr::Lock
 {
     pthread_mutex_t mutex_;
 
   public:
     Lock() {}
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -1378,17 +1378,17 @@ class DebugScopeProxy : public BaseProxy
             desc.setSetter(nullptr);
             return true;
           case ACCESS_GENERIC:
             return JS_GetOwnPropertyDescriptorById(cx, scope, id, desc);
           case ACCESS_LOST:
             JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_DEBUG_OPTIMIZED_OUT);
             return false;
           default:
-            MOZ_ASSUME_UNREACHABLE("bad AccessResult");
+            MOZ_CRASH("bad AccessResult");
         }
     }
 
     bool get(JSContext *cx, HandleObject proxy, HandleObject receiver, HandleId id,
              MutableHandleValue vp) const MOZ_OVERRIDE
     {
         Rooted<DebugScopeObject*> debugScope(cx, &proxy->as<DebugScopeObject>());
         Rooted<ScopeObject*> scope(cx, &proxy->as<DebugScopeObject>().scope());
@@ -1416,17 +1416,17 @@ class DebugScopeProxy : public BaseProxy
           case ACCESS_UNALIASED:
             return true;
           case ACCESS_GENERIC:
             return JSObject::getGeneric(cx, scope, scope, id, vp);
           case ACCESS_LOST:
             JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_DEBUG_OPTIMIZED_OUT);
             return false;
           default:
-            MOZ_ASSUME_UNREACHABLE("bad AccessResult");
+            MOZ_CRASH("bad AccessResult");
         }
     }
 
     /*
      * Like 'get', but returns sentinel values instead of throwing on
      * exceptional cases.
      */
     bool getMaybeSentinelValue(JSContext *cx, Handle<DebugScopeObject *> debugScope, HandleId id,
@@ -1450,17 +1450,17 @@ class DebugScopeProxy : public BaseProxy
           case ACCESS_UNALIASED:
             return true;
           case ACCESS_GENERIC:
             return JSObject::getGeneric(cx, scope, scope, id, vp);
           case ACCESS_LOST:
             vp.setMagic(JS_OPTIMIZED_OUT);
             return true;
           default:
-            MOZ_ASSUME_UNREACHABLE("bad AccessResult");
+            MOZ_CRASH("bad AccessResult");
         }
     }
 
     bool set(JSContext *cx, HandleObject proxy, HandleObject receiver, HandleId id, bool strict,
              MutableHandleValue vp) const MOZ_OVERRIDE
     {
         Rooted<DebugScopeObject*> debugScope(cx, &proxy->as<DebugScopeObject>());
         Rooted<ScopeObject*> scope(cx, &proxy->as<DebugScopeObject>().scope());
@@ -1470,17 +1470,17 @@ class DebugScopeProxy : public BaseProxy
             return false;
 
         switch (access) {
           case ACCESS_UNALIASED:
             return true;
           case ACCESS_GENERIC:
             return JSObject::setGeneric(cx, scope, scope, id, vp, strict);
           default:
-            MOZ_ASSUME_UNREACHABLE("bad AccessResult");
+            MOZ_CRASH("bad AccessResult");
         }
     }
 
     bool defineProperty(JSContext *cx, HandleObject proxy, HandleId id,
                         MutableHandle<PropertyDescriptor> desc) const MOZ_OVERRIDE
     {
         Rooted<ScopeObject*> scope(cx, &proxy->as<DebugScopeObject>().scope());
 
@@ -2233,17 +2233,17 @@ GetDebugScopeForMissing(JSContext *cx, c
         if (!block)
             return nullptr;
 
         debugScope = DebugScopeObject::create(cx, *block, enclosingDebug);
         break;
       }
       case ScopeIter::With:
       case ScopeIter::StrictEvalScope:
-        MOZ_ASSUME_UNREACHABLE("should already have a scope");
+        MOZ_CRASH("should already have a scope");
     }
     if (!debugScope)
         return nullptr;
 
     if (!DebugScopes::addDebugScope(cx, si, *debugScope))
         return nullptr;
 
     return debugScope;
--- a/js/src/vm/Stack-inl.h
+++ b/js/src/vm/Stack-inl.h
@@ -345,122 +345,122 @@ FrameIter::unaliasedForEachActual(JSCont
             JS_ASSERT(data_.jitFrames_.isBaselineJS());
             data_.jitFrames_.unaliasedForEachActual(op, jit::ReadFrame_Actuals);
         }
         return;
 #else
         break;
 #endif
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 inline void *
 AbstractFramePtr::maybeHookData() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->maybeHookData();
 #ifdef JS_ION
     return asBaselineFrame()->maybeHookData();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::setHookData(void *data) const
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->setHookData(data);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->setHookData(data);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline HandleValue
 AbstractFramePtr::returnValue() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->returnValue();
 #ifdef JS_ION
     return asBaselineFrame()->returnValue();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::setReturnValue(const Value &rval) const
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->setReturnValue(rval);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->setReturnValue(rval);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline JSObject *
 AbstractFramePtr::scopeChain() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->scopeChain();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->scopeChain();
     return asRematerializedFrame()->scopeChain();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::pushOnScopeChain(ScopeObject &scope)
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->pushOnScopeChain(scope);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->pushOnScopeChain(scope);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline CallObject &
 AbstractFramePtr::callObj() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->callObj();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->callObj();
     return asRematerializedFrame()->callObj();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::initFunctionScopeObjects(JSContext *cx)
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->initFunctionScopeObjects(cx);
 #ifdef JS_ION
     return asBaselineFrame()->initFunctionScopeObjects(cx);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline JSCompartment *
 AbstractFramePtr::compartment() const
 {
     return scopeChain()->compartment();
 }
@@ -470,428 +470,450 @@ AbstractFramePtr::numActualArgs() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->numActualArgs();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->numActualArgs();
     return asRematerializedFrame()->numActualArgs();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline unsigned
 AbstractFramePtr::numFormalArgs() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->numFormalArgs();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->numFormalArgs();
     return asRematerializedFrame()->numActualArgs();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedVar(uint32_t i, MaybeCheckAliasing checkAliasing)
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->unaliasedVar(i, checkAliasing);
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->unaliasedVar(i, checkAliasing);
     return asRematerializedFrame()->unaliasedVar(i, checkAliasing);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedLocal(uint32_t i, MaybeCheckAliasing checkAliasing)
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->unaliasedLocal(i, checkAliasing);
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->unaliasedLocal(i, checkAliasing);
     return asRematerializedFrame()->unaliasedLocal(i, checkAliasing);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing)
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->unaliasedFormal(i, checkAliasing);
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->unaliasedFormal(i, checkAliasing);
     return asRematerializedFrame()->unaliasedFormal(i, checkAliasing);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing)
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->unaliasedActual(i, checkAliasing);
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->unaliasedActual(i, checkAliasing);
     return asRematerializedFrame()->unaliasedActual(i, checkAliasing);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::hasCallObj() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->hasCallObj();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->hasCallObj();
     return asRematerializedFrame()->hasCallObj();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::useNewType() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->useNewType();
     return false;
 }
+
 inline bool
 AbstractFramePtr::isGeneratorFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isGeneratorFrame();
     return false;
 }
+
 inline bool
 AbstractFramePtr::isYielding() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isYielding();
     return false;
 }
+
 inline bool
 AbstractFramePtr::isFunctionFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isFunctionFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isFunctionFrame();
     return asRematerializedFrame()->isFunctionFrame();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::isGlobalFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isGlobalFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isGlobalFrame();
     return asRematerializedFrame()->isGlobalFrame();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::isEvalFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isEvalFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isEvalFrame();
     MOZ_ASSERT(isRematerializedFrame());
     return false;
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::isFramePushedByExecute() const
 {
     return isGlobalFrame() || isEvalFrame();
 }
+
 inline bool
 AbstractFramePtr::isDebuggerFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isDebuggerFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isDebuggerFrame();
     MOZ_ASSERT(isRematerializedFrame());
     return false;
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::hasArgs() const {
     return isNonEvalFunctionFrame();
 }
+
 inline JSScript *
 AbstractFramePtr::script() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->script();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->script();
     return asRematerializedFrame()->script();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline JSFunction *
 AbstractFramePtr::fun() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->fun();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->fun();
     return asRematerializedFrame()->fun();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline JSFunction *
 AbstractFramePtr::maybeFun() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->maybeFun();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->maybeFun();
     return asRematerializedFrame()->maybeFun();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline JSFunction *
 AbstractFramePtr::callee() const
 {
     if (isInterpreterFrame())
         return &asInterpreterFrame()->callee();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->callee();
     return asRematerializedFrame()->callee();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline Value
 AbstractFramePtr::calleev() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->calleev();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->calleev();
     return asRematerializedFrame()->calleev();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::isNonEvalFunctionFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isNonEvalFunctionFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isNonEvalFunctionFrame();
     return asRematerializedFrame()->isNonEvalFunctionFrame();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::isNonStrictDirectEvalFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isNonStrictDirectEvalFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isNonStrictDirectEvalFrame();
     MOZ_ASSERT(isRematerializedFrame());
     return false;
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::isStrictEvalFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->isStrictEvalFrame();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->isStrictEvalFrame();
     MOZ_ASSERT(isRematerializedFrame());
     return false;
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline Value *
 AbstractFramePtr::argv() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->argv();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->argv();
     return asRematerializedFrame()->argv();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::hasArgsObj() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->hasArgsObj();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->hasArgsObj();
     return asRematerializedFrame()->hasArgsObj();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline ArgumentsObject &
 AbstractFramePtr::argsObj() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->argsObj();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->argsObj();
     return asRematerializedFrame()->argsObj();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline void
 AbstractFramePtr::initArgsObj(ArgumentsObject &argsobj) const
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->initArgsObj(argsobj);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->initArgsObj(argsobj);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline bool
 AbstractFramePtr::copyRawFrameSlots(AutoValueVector *vec) const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->copyRawFrameSlots(vec);
 #ifdef JS_ION
     return asBaselineFrame()->copyRawFrameSlots(vec);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline bool
 AbstractFramePtr::prevUpToDate() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->prevUpToDate();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->prevUpToDate();
     return asRematerializedFrame()->prevUpToDate();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
+
 inline void
 AbstractFramePtr::setPrevUpToDate() const
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->setPrevUpToDate();
         return;
     }
 #ifdef JS_ION
     if (isBaselineFrame()) {
         asBaselineFrame()->setPrevUpToDate();
         return;
     }
     asRematerializedFrame()->setPrevUpToDate();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline Value &
 AbstractFramePtr::thisValue() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->thisValue();
 #ifdef JS_ION
     if (isBaselineFrame())
         return asBaselineFrame()->thisValue();
     return asRematerializedFrame()->thisValue();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::popBlock(JSContext *cx) const
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->popBlock(cx);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->popBlock(cx);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 inline void
 AbstractFramePtr::popWith(JSContext *cx) const
 {
     if (isInterpreterFrame()) {
         asInterpreterFrame()->popWith(cx);
         return;
     }
 #ifdef JS_ION
     asBaselineFrame()->popWith(cx);
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 Activation::Activation(ThreadSafeContext *cx, Kind kind)
   : cx_(cx),
     compartment_(cx->compartment_),
     prev_(cx->perThreadData->activation_),
     savedFrameChain_(0),
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -766,17 +766,17 @@ FrameIter::popAsmJSFrame()
 }
 #endif
 
 FrameIter &
 FrameIter::operator++()
 {
     switch (data_.state_) {
       case DONE:
-        MOZ_ASSUME_UNREACHABLE("Unexpected state");
+        MOZ_CRASH("Unexpected state");
       case INTERP:
         if (interpFrame()->isDebuggerFrame() && interpFrame()->evalInFramePrev()) {
             AbstractFramePtr eifPrev = interpFrame()->evalInFramePrev();
             MOZ_ASSERT(!eifPrev.isRematerializedFrame());
 
             // Eval-in-frame can cross contexts and works across saved frame
             // chains.
             ContextOption prevContextOption = data_.contextOption_;
@@ -786,17 +786,17 @@ FrameIter::operator++()
 
             popInterpreterFrame();
 
             while (isIon() || abstractFramePtr() != eifPrev) {
                 if (data_.state_ == JIT) {
 #ifdef JS_ION
                     popJitFrame();
 #else
-                    MOZ_ASSUME_UNREACHABLE("Invalid state");
+                    MOZ_CRASH("Invalid state");
 #endif
                 } else {
                     popInterpreterFrame();
                 }
             }
 
             data_.contextOption_ = prevContextOption;
             data_.savedOption_ = prevSavedOption;
@@ -809,17 +809,17 @@ FrameIter::operator++()
       case JIT:
         popJitFrame();
         break;
       case ASMJS:
         popAsmJSFrame();
         break;
 #else
     default:
-        MOZ_ASSUME_UNREACHABLE("Unexpected state");
+        MOZ_CRASH("Unexpected state");
 #endif
     }
     return *this;
 }
 
 FrameIter::Data *
 FrameIter::copyData() const
 {
@@ -847,17 +847,17 @@ FrameIter::compartment() const
     switch (data_.state_) {
       case DONE:
         break;
       case INTERP:
       case JIT:
       case ASMJS:
         return data_.activations_->compartment();
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::isFunctionFrame() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -870,17 +870,17 @@ FrameIter::isFunctionFrame() const
             return data_.jitFrames_.isFunctionFrame();
         return ionInlineFrames_.isFunctionFrame();
 #else
         break;
 #endif
       case ASMJS:
         return true;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::isGlobalFrame() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -893,17 +893,17 @@ FrameIter::isGlobalFrame() const
         JS_ASSERT(!script()->isForEval());
         return !script()->functionNonDelazifying();
 #else
         break;
 #endif
       case ASMJS:
         return false;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::isEvalFrame() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -916,50 +916,50 @@ FrameIter::isEvalFrame() const
         JS_ASSERT(!script()->isForEval());
         return false;
 #else
         break;
 #endif
       case ASMJS:
         return false;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::isNonEvalFunctionFrame() const
 {
     JS_ASSERT(!done());
     switch (data_.state_) {
       case DONE:
         break;
       case INTERP:
         return interpFrame()->isNonEvalFunctionFrame();
       case JIT:
         return !isEvalFrame() && isFunctionFrame();
       case ASMJS:
         return true;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::isGeneratorFrame() const
 {
     switch (data_.state_) {
       case DONE:
         break;
       case INTERP:
         return interpFrame()->isGeneratorFrame();
       case JIT:
         return false;
       case ASMJS:
         return false;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 JSAtom *
 FrameIter::functionDisplayAtom() const
 {
     JS_ASSERT(isNonEvalFunctionFrame());
 
     switch (data_.state_) {
@@ -972,17 +972,17 @@ FrameIter::functionDisplayAtom() const
 #ifdef JS_ION
         return data_.asmJSFrames_.functionDisplayAtom();
 #else
         break;
 #endif
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 ScriptSource *
 FrameIter::scriptSource() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -992,17 +992,17 @@ FrameIter::scriptSource() const
       case ASMJS:
 #ifdef JS_ION
         return data_.activations_->asAsmJS()->module().scriptSource();
 #else
         break;
 #endif
     }
 
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 const char *
 FrameIter::scriptFilename() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -1012,17 +1012,17 @@ FrameIter::scriptFilename() const
       case ASMJS:
 #ifdef JS_ION
         return data_.activations_->asAsmJS()->module().scriptSource()->filename();
 #else
         break;
 #endif
     }
 
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 unsigned
 FrameIter::computeLine(uint32_t *column) const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -1032,17 +1032,17 @@ FrameIter::computeLine(uint32_t *column)
       case ASMJS:
 #ifdef JS_ION
         return data_.asmJSFrames_.computeLine(column);
 #else
         break;
 #endif
     }
 
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 JSPrincipals *
 FrameIter::originPrincipals() const
 {
     switch (data_.state_) {
       case DONE:
         break;
@@ -1053,17 +1053,17 @@ FrameIter::originPrincipals() const
 #ifdef JS_ION
         return data_.activations_->asAsmJS()->module().scriptSource()->originPrincipals();
 #else
         break;
 #endif
       }
     }
 
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::isConstructing() const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1075,17 +1075,18 @@ FrameIter::isConstructing() const
         JS_ASSERT(data_.jitFrames_.isBaselineJS());
         return data_.jitFrames_.isConstructing();
 #else
         break;
 #endif
       case INTERP:
         return interpFrame()->isConstructing();
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+
+    MOZ_CRASH("Unexpected state");
 }
 
 bool
 FrameIter::ensureHasRematerializedFrame(ThreadSafeContext *cx)
 {
 #ifdef JS_ION
     MOZ_ASSERT(isIon());
     return !!activation()->asJit()->getRematerializedFrame(cx, data_.jitFrames_);
@@ -1109,17 +1110,17 @@ FrameIter::hasUsableAbstractFramePtr() c
         MOZ_ASSERT(data_.jitFrames_.isIonJS());
         return !!activation()->asJit()->lookupRematerializedFrame(data_.jitFrames_.fp(),
                                                                   ionInlineFrames_.frameNo());
 #endif
         break;
       case INTERP:
         return true;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 AbstractFramePtr
 FrameIter::abstractFramePtr() const
 {
     MOZ_ASSERT(hasUsableAbstractFramePtr());
     switch (data_.state_) {
       case DONE:
@@ -1135,17 +1136,17 @@ FrameIter::abstractFramePtr() const
                                                                 ionInlineFrames_.frameNo());
 #endif
         break;
       }
       case INTERP:
         JS_ASSERT(interpFrame());
         return AbstractFramePtr(interpFrame());
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 void
 FrameIter::updatePcQuadratic()
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1184,17 +1185,17 @@ FrameIter::updatePcQuadratic()
             // Update the pc.
             JS_ASSERT(data_.jitFrames_.baselineFrame() == frame);
             data_.jitFrames_.baselineScriptAndPc(nullptr, &data_.pc_);
             return;
         }
 #endif
         break;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 JSFunction *
 FrameIter::callee() const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1207,17 +1208,17 @@ FrameIter::callee() const
         if (data_.jitFrames_.isBaselineJS())
             return data_.jitFrames_.callee();
         JS_ASSERT(data_.jitFrames_.isIonJS());
         return ionInlineFrames_.callee();
 #else
         break;
 #endif
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 Value
 FrameIter::calleev() const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1227,17 +1228,17 @@ FrameIter::calleev() const
         return interpFrame()->calleev();
       case JIT:
 #ifdef JS_ION
         return ObjectValue(*callee());
 #else
         break;
 #endif
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 unsigned
 FrameIter::numActualArgs() const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1251,17 +1252,17 @@ FrameIter::numActualArgs() const
             return ionInlineFrames_.numActualArgs();
 
         JS_ASSERT(data_.jitFrames_.isBaselineJS());
         return data_.jitFrames_.numActualArgs();
 #else
         break;
 #endif
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 unsigned
 FrameIter::numFormalArgs() const
 {
     return script()->functionNonDelazifying()->nargs();
 }
 
@@ -1284,17 +1285,17 @@ FrameIter::scopeChain() const
             return ionInlineFrames_.scopeChain();
         return data_.jitFrames_.baselineFrame()->scopeChain();
 #else
         break;
 #endif
       case INTERP:
         return interpFrame()->scopeChain();
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 CallObject &
 FrameIter::callObj() const
 {
     JS_ASSERT(callee()->isHeavyweight());
 
     JSObject *pobj = scopeChain();
@@ -1343,17 +1344,17 @@ FrameIter::thisv() const
             return ionInlineFrames_.thisValue();
         return data_.jitFrames_.baselineFrame()->thisValue();
 #else
         break;
 #endif
       case INTERP:
         return interpFrame()->thisValue();
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 Value
 FrameIter::returnValue() const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1362,17 +1363,17 @@ FrameIter::returnValue() const
 #ifdef JS_ION
         if (data_.jitFrames_.isBaselineJS())
             return data_.jitFrames_.baselineFrame()->returnValue();
 #endif
         break;
       case INTERP:
         return interpFrame()->returnValue();
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 void
 FrameIter::setReturnValue(const Value &v)
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1384,17 +1385,17 @@ FrameIter::setReturnValue(const Value &v
             return;
         }
 #endif
         break;
       case INTERP:
         interpFrame()->setReturnValue(v);
         return;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 size_t
 FrameIter::numFrameSlots() const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1410,17 +1411,17 @@ FrameIter::numFrameSlots() const
 #else
         break;
 #endif
       }
       case INTERP:
         JS_ASSERT(data_.interpFrames_.sp() >= interpFrame()->base());
         return data_.interpFrames_.sp() - interpFrame()->base();
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 Value
 FrameIter::frameSlotValue(size_t index) const
 {
     switch (data_.state_) {
       case DONE:
       case ASMJS:
@@ -1436,17 +1437,17 @@ FrameIter::frameSlotValue(size_t index) 
         index += data_.jitFrames_.script()->nfixed();
         return *data_.jitFrames_.baselineFrame()->valueSlot(index);
 #else
         break;
 #endif
       case INTERP:
           return interpFrame()->base()[index];
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected state");
+    MOZ_CRASH("Unexpected state");
 }
 
 #if defined(_MSC_VER)
 # pragma optimize("", on)
 #endif
 
 #ifdef DEBUG
 bool
@@ -1497,17 +1498,17 @@ AbstractFramePtr::evalPrevScopeChain(JSC
 bool
 AbstractFramePtr::hasPushedSPSFrame() const
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->hasPushedSPSFrame();
 #ifdef JS_ION
     return asBaselineFrame()->hasPushedSPSFrame();
 #else
-    MOZ_ASSUME_UNREACHABLE("Invalid frame");
+    MOZ_CRASH("Invalid frame");
 #endif
 }
 
 #ifdef DEBUG
 void
 js::CheckLocalUnaliased(MaybeCheckAliasing checkAliasing, JSScript *script, uint32_t i)
 {
     if (!checkAliasing)
--- a/js/src/vm/StructuredClone.cpp
+++ b/js/src/vm/StructuredClone.cpp
@@ -1487,17 +1487,16 @@ JSStructuredCloneReader::startRead(Value
         break;
 
       case SCTAG_TYPED_ARRAY_OBJECT:
         // readTypedArray adds the array to allObjs
         uint64_t arrayType;
         if (!in.read(&arrayType))
             return false;
         return readTypedArray(arrayType, data, vp);
-        break;
 
       default: {
         if (tag <= SCTAG_FLOAT_MAX) {
             double d = ReinterpretPairAsDouble(tag, data);
             if (!checkDouble(d))
                 return false;
             vp->setNumber(d);
             break;
--- a/js/src/vm/TraceLogging.cpp
+++ b/js/src/vm/TraceLogging.cpp
@@ -933,17 +933,17 @@ TraceLogging::forMainThread(PerThreadDat
 
 TraceLogger *
 js::TraceLoggerForCurrentThread()
 {
 #ifdef JS_THREADSAFE
     PRThread *thread = PR_GetCurrentThread();
     return traceLoggers.forThread(thread);
 #else
-    MOZ_ASSUME_UNREACHABLE("No threads supported. Use TraceLoggerForMainThread for the main thread.");
+    MOZ_CRASH("No threads supported. Use TraceLoggerForMainThread for the main thread.");
 #endif // JS_THREADSAFE
 }
 
 #ifdef JS_THREADSAFE
 TraceLogger *
 TraceLogging::forThread(PRThread *thread)
 {
     AutoTraceLoggingLock lock(this);
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -1037,17 +1037,17 @@ class TypedArrayObjectTemplate : public 
           }
           case Scalar::Float64: {
             double *src = static_cast<double*>(tarray->viewData());
             for (unsigned i = 0; i < srclen; ++i)
                 *dest++ = NativeType(*src++);
             break;
           }
           default:
-            MOZ_ASSUME_UNREACHABLE("copyFrom with a TypedArrayObject of unknown type");
+            MOZ_CRASH("copyFrom with a TypedArrayObject of unknown type");
         }
 
         return true;
     }
 
     static bool
     copyFromWithOverlap(JSContext *cx, JSObject *selfObj, JSObject *tarrayObj, uint32_t offset)
     {
@@ -1118,17 +1118,17 @@ class TypedArrayObjectTemplate : public 
           }
           case Scalar::Float64: {
             double *src = (double*) srcbuf;
             for (unsigned i = 0; i < len; ++i)
                 *dest++ = NativeType(*src++);
             break;
           }
           default:
-            MOZ_ASSUME_UNREACHABLE("copyFromWithOverlap with a TypedArrayObject of unknown type");
+            MOZ_CRASH("copyFromWithOverlap with a TypedArrayObject of unknown type");
         }
 
         js_free(srcbuf);
         return true;
     }
 };
 
 class Int8ArrayObject : public TypedArrayObjectTemplate<int8_t> {
@@ -1980,18 +1980,17 @@ TypedArrayObject::getElement(uint32_t in
         break;
       case Scalar::Float32:
         return TypedArrayObjectTemplate<float>::getIndexValue(this, index);
         break;
       case Scalar::Float64:
         return TypedArrayObjectTemplate<double>::getIndexValue(this, index);
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE("Unknown TypedArray type");
-        break;
+        MOZ_CRASH("Unknown TypedArray type");
     }
 }
 
 void
 TypedArrayObject::setElement(TypedArrayObject &obj, uint32_t index, double d)
 {
     MOZ_ASSERT(index < obj.length());
 
@@ -2019,18 +2018,17 @@ TypedArrayObject::setElement(TypedArrayO
         break;
       case Scalar::Float32:
         TypedArrayObjectTemplate<float>::setIndexValue(obj, index, d);
         break;
       case Scalar::Float64:
         TypedArrayObjectTemplate<double>::setIndexValue(obj, index, d);
         break;
       default:
-        MOZ_ASSUME_UNREACHABLE("Unknown TypedArray type");
-        break;
+        MOZ_CRASH("Unknown TypedArray type");
     }
 }
 
 /***
  *** JS impl
  ***/
 
 /*
@@ -2336,18 +2334,17 @@ TypedArrayObject::isOriginalLengthGetter
         return native == Int32Array_lengthGetter;
       case Scalar::Uint32:
         return native == Uint32Array_lengthGetter;
       case Scalar::Float32:
         return native == Float32Array_lengthGetter;
       case Scalar::Float64:
         return native == Float64Array_lengthGetter;
       default:
-        MOZ_ASSUME_UNREACHABLE("Unknown TypedArray type");
-        return false;
+        MOZ_CRASH("Unknown TypedArray type");
     }
 }
 
 const Class DataViewObject::protoClass = {
     "DataViewPrototype",
     JSCLASS_HAS_PRIVATE |
     JSCLASS_HAS_RESERVED_SLOTS(DataViewObject::RESERVED_SLOTS) |
     JSCLASS_HAS_CACHED_PROTO(JSProto_DataView),
@@ -2516,17 +2513,17 @@ js::IsTypedArrayConstructor(HandleValue 
         return IsNativeFunction(v, Uint32ArrayObject::class_constructor);
       case Scalar::Float32:
         return IsNativeFunction(v, Float32ArrayObject::class_constructor);
       case Scalar::Float64:
         return IsNativeFunction(v, Float64ArrayObject::class_constructor);
       case Scalar::Uint8Clamped:
         return IsNativeFunction(v, Uint8ClampedArrayObject::class_constructor);
     }
-    MOZ_ASSUME_UNREACHABLE("unexpected typed array type");
+    MOZ_CRASH("unexpected typed array type");
 }
 
 bool
 js::IsTypedArrayBuffer(HandleValue v)
 {
     return v.isObject() &&
            (v.toObject().is<ArrayBufferObject>() ||
             v.toObject().is<SharedArrayBufferObject>());
@@ -2637,17 +2634,17 @@ JS_GetArrayBufferViewType(JSObject *obj)
     obj = CheckedUnwrap(obj);
     if (!obj)
         return Scalar::TypeMax;
 
     if (obj->is<TypedArrayObject>())
         return obj->as<TypedArrayObject>().type();
     else if (obj->is<DataViewObject>())
         return Scalar::TypeMax;
-    MOZ_ASSUME_UNREACHABLE("invalid ArrayBufferView type");
+    MOZ_CRASH("invalid ArrayBufferView type");
 }
 
 JS_FRIEND_API(int8_t *)
 JS_GetInt8ArrayData(JSObject *obj)
 {
     obj = CheckedUnwrap(obj);
     if (!obj)
         return nullptr;
--- a/js/src/vm/TypedArrayObject.h
+++ b/js/src/vm/TypedArrayObject.h
@@ -198,17 +198,17 @@ TypedArrayShift(Scalar::Type viewType)
       case Scalar::Int32:
       case Scalar::Uint32:
       case Scalar::Float32:
         return 2;
       case Scalar::Float64:
         return 3;
       default:;
     }
-    MOZ_ASSUME_UNREACHABLE("Unexpected array type");
+    MOZ_CRASH("Unexpected array type");
 }
 
 class DataViewObject : public ArrayBufferViewObject
 {
     static const size_t RESERVED_SLOTS = JS_DATAVIEW_SLOTS;
     static const size_t DATA_SLOT      = JS_DATAVIEW_SLOT_DATA;
 
   private:
--- a/js/src/vm/UbiNode.cpp
+++ b/js/src/vm/UbiNode.cpp
@@ -22,40 +22,38 @@
 
 using JS::Value;
 using JS::ubi::Concrete;
 using JS::ubi::Edge;
 using JS::ubi::EdgeRange;
 using JS::ubi::Node;
 using JS::ubi::TracerConcrete;
 
-// All operations on null ubi::Nodes assert.
-const jschar *Concrete<void>::typeName() const      { MOZ_ASSUME_UNREACHABLE("null ubi::Node"); }
-size_t Concrete<void>::size() const                 { MOZ_ASSUME_UNREACHABLE("null ubi::Node"); }
-EdgeRange *Concrete<void>::edges(JSContext *) const { MOZ_ASSUME_UNREACHABLE("null ubi::Node"); }
-
+// All operations on null ubi::Nodes crash.
+const jschar *Concrete<void>::typeName() const      { MOZ_CRASH("null ubi::Node"); }
+size_t Concrete<void>::size() const                 { MOZ_CRASH("null ubi::Node"); }
+EdgeRange *Concrete<void>::edges(JSContext *) const { MOZ_CRASH("null ubi::Node"); }
 
 Node::Node(JSGCTraceKind kind, void *ptr)
 {
     switch (kind) {
       case JSTRACE_OBJECT:      construct(static_cast<JSObject *>(ptr));              break;
       case JSTRACE_STRING:      construct(static_cast<JSString *>(ptr));              break;
       case JSTRACE_SCRIPT:      construct(static_cast<JSScript *>(ptr));              break;
       case JSTRACE_LAZY_SCRIPT: construct(static_cast<js::LazyScript *>(ptr));        break;
       case JSTRACE_JITCODE:     construct(static_cast<js::jit::JitCode *>(ptr));      break;
       case JSTRACE_SHAPE:       construct(static_cast<js::Shape *>(ptr));             break;
       case JSTRACE_BASE_SHAPE:  construct(static_cast<js::BaseShape *>(ptr));         break;
       case JSTRACE_TYPE_OBJECT: construct(static_cast<js::types::TypeObject *>(ptr)); break;
 
       default:
-        MOZ_ASSUME_UNREACHABLE("bad JSGCTraceKind passed to JS::ubi::Node::Node");
+        MOZ_CRASH("bad JSGCTraceKind passed to JS::ubi::Node::Node");
     }
 }
 
-
 Node::Node(Value value)
 {
     if (value.isObject())
         construct(&value.toObject());
     else if (value.isString())
         construct(value.toString());
     else
         construct<void>(nullptr);