Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below)
authorJustin Lebar <justin.lebar@gmail.com>
Fri, 28 Jun 2013 18:38:30 -0700
changeset 136864 55c1f447549d5ad6245f8f78fbea89ebd5350b04
parent 136863 02d4ae55e1c3429bb95230496b21f1dabbda51e7
child 136865 1735d098ea863982696383cd25fbb6857e0d2f6f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs802686
milestone25.0a1
Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below) r=tbsaunde for accessible r=jmuizelaar for gfx r=roc for layout r=glandium for mozglue r=jduell for netwerk r=khuey for everything else This is a mechanical change made with sed. Later patches in this queue clean up the whitespace errors and so on.
accessible/src/atk/AccessibleWrap.cpp
accessible/src/base/nsTextEquivUtils.cpp
accessible/src/windows/msaa/AccessibleWrap.cpp
caps/src/nsPrincipal.cpp
content/base/src/Element.cpp
content/base/src/nsAttrValue.cpp
content/base/src/nsContentIterator.cpp
content/base/src/nsDocument.cpp
content/base/src/nsObjectLoadingContent.cpp
content/canvas/src/CanvasRenderingContext2D.cpp
content/canvas/src/WebGLContextGL.cpp
content/canvas/src/WebGLFramebuffer.cpp
content/events/src/TextComposition.cpp
content/events/src/nsDOMMouseEvent.cpp
content/events/src/nsDOMUIEvent.cpp
content/events/src/nsEventStateManager.cpp
content/events/src/nsIMEStateManager.cpp
content/html/document/src/nsHTMLContentSink.cpp
content/media/DOMMediaStream.cpp
content/media/MediaStreamGraph.cpp
content/media/encoder/MediaEncoder.cpp
content/media/encoder/OpusTrackEncoder.cpp
content/media/webaudio/MediaBufferDecoder.cpp
content/media/webspeech/recognition/SpeechRecognition.cpp
content/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp
content/smil/nsSMILTimedElement.cpp
dom/audiochannel/AudioChannelService.cpp
dom/base/DOMRequest.cpp
dom/base/nsDOMClassInfo.cpp
dom/base/nsScreen.cpp
dom/bindings/Codegen.py
dom/bindings/PrimitiveConversions.h
dom/bluetooth/BluetoothService.cpp
dom/bluetooth/BluetoothUnixSocketConnector.cpp
dom/bluetooth/ipc/BluetoothChild.cpp
dom/bluetooth/ipc/BluetoothParent.cpp
dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp
dom/fm/FMRadio.cpp
dom/indexedDB/AsyncConnectionHelper.cpp
dom/indexedDB/IDBDatabase.cpp
dom/indexedDB/OpenDatabaseHelper.cpp
dom/indexedDB/ProfilerHelpers.h
dom/indexedDB/ipc/IndexedDBChild.cpp
dom/indexedDB/ipc/IndexedDBParent.cpp
dom/ipc/Blob.cpp
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/ipc/StructuredCloneUtils.cpp
dom/mobilemessage/src/MmsMessage.cpp
dom/mobilemessage/src/MobileMessageCallback.cpp
dom/mobilemessage/src/MobileMessageCursorCallback.cpp
dom/mobilemessage/src/MobileMessageThread.cpp
dom/mobilemessage/src/SmsMessage.cpp
dom/mobilemessage/src/ipc/SmsChild.cpp
dom/mobilemessage/src/ipc/SmsParent.cpp
dom/network/src/TCPSocketChild.cpp
dom/network/src/TCPSocketParent.cpp
dom/power/PowerManagerService.cpp
dom/src/notification/Notification.cpp
dom/workers/RuntimeService.cpp
dom/workers/XMLHttpRequest.cpp
editor/libeditor/base/nsEditorCommands.cpp
extensions/cookie/nsPermissionManager.cpp
gfx/gl/GLContext.cpp
gfx/gl/GLContext.h
gfx/gl/GLContextProviderGLX.cpp
gfx/gl/GLScreenBuffer.cpp
gfx/gl/SharedSurface.h
gfx/gl/SharedSurfaceGL.cpp
gfx/gl/SurfaceStream.cpp
gfx/layers/Effects.h
gfx/layers/Layers.h
gfx/layers/client/CompositableClient.h
gfx/layers/client/ContentClient.h
gfx/layers/client/ImageClient.cpp
gfx/layers/composite/CompositableHost.cpp
gfx/layers/composite/TextureHost.cpp
gfx/layers/composite/TiledContentHost.h
gfx/layers/d3d10/CanvasLayerD3D10.cpp
gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
gfx/layers/opengl/CanvasLayerOGL.cpp
gfx/layers/opengl/GLManager.cpp
gfx/layers/opengl/TextureHostOGL.cpp
gfx/layers/opengl/TextureHostOGL.h
gfx/thebes/gfx2DGlue.h
gfx/thebes/gfxPlatform.h
gfx/thebes/gfxRect.h
hal/gonk/GonkDiskSpaceWatcher.cpp
hal/gonk/UeventPoller.cpp
hal/linux/LinuxPower.cpp
ipc/glue/FileDescriptor.cpp
ipc/glue/InputStreamUtils.cpp
ipc/glue/URIUtils.cpp
ipc/nfc/Nfc.cpp
ipc/ril/Ril.cpp
ipc/unixsocket/UnixSocket.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/generic/nsFlexContainerFrame.cpp
mfbt/Assertions.h
mfbt/LinkedList.h
mfbt/decimal/moz-decimal-utils.h
mfbt/decimal/to-moz-dependencies.patch
modules/libjar/nsJARProtocolHandler.cpp
modules/libpref/src/prefapi.cpp
mozglue/linker/ElfLoader.h
mozglue/linker/Mappable.cpp
netwerk/base/src/BackgroundFileSaver.cpp
netwerk/ipc/RemoteOpenFileChild.cpp
netwerk/ipc/RemoteOpenFileParent.cpp
netwerk/protocol/http/nsHttpChannel.cpp
security/manager/ssl/src/ScopedNSSTypes.h
security/manager/ssl/src/nsUsageArrayHelper.cpp
toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
toolkit/components/telemetry/Telemetry.cpp
toolkit/identity/IdentityCryptoService.cpp
widget/cocoa/nsChildView.mm
widget/gonk/nsWindow.cpp
widget/gtk2/nsGtkKeyUtils.cpp
widget/os2/nsWindow.cpp
widget/windows/KeyboardLayout.cpp
widget/windows/KeyboardLayout.h
widget/windows/nsTextStore.cpp
widget/xpwidgets/WidgetUtils.cpp
xpcom/ds/nsAtomTable.cpp
xpcom/glue/nsISupportsImpl.h
xpcom/glue/nsTArray.h
--- a/accessible/src/atk/AccessibleWrap.cpp
+++ b/accessible/src/atk/AccessibleWrap.cpp
@@ -675,17 +675,17 @@ getRoleCB(AtkObject *aAtkObj)
              msaaRole, ia2Role, nameRule) \
   case roles::geckoRole: \
     aAtkObj->role = atkRole; \
     break;
 
   switch (accWrap->Role()) {
 #include "RoleMap.h"
     default:
-      MOZ_NOT_REACHED("Unknown role.");
+      MOZ_CRASH("Unknown role.");
       aAtkObj->role = ATK_ROLE_UNKNOWN;
   };
 
 #undef ROLE
 
   return aAtkObj->role;
 }
 
--- a/accessible/src/base/nsTextEquivUtils.cpp
+++ b/accessible/src/base/nsTextEquivUtils.cpp
@@ -389,14 +389,14 @@ nsTextEquivUtils::GetRoleRule(role aRole
 #define ROLE(geckoRole, stringRole, atkRole, \
              macRole, msaaRole, ia2Role, nameRule) \
   case roles::geckoRole: \
     return nameRule;
 
   switch (aRole) {
 #include "RoleMap.h"
     default:
-      MOZ_NOT_REACHED("Unknown role.");
+      MOZ_CRASH("Unknown role.");
   }
 
 #undef ROLE
 }
 
--- a/accessible/src/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/src/windows/msaa/AccessibleWrap.cpp
@@ -373,17 +373,17 @@ AccessibleWrap::get_accRole(
              _msaaRole, ia2Role, nameRule) \
   case roles::_geckoRole: \
     msaaRole = _msaaRole; \
     break;
 
   switch (geckoRole) {
 #include "RoleMap.h"
     default:
-      MOZ_NOT_REACHED("Unknown role.");
+      MOZ_CRASH("Unknown role.");
   };
 
 #undef ROLE
 
   // Special case, if there is a ROLE_ROW inside of a ROLE_TREE_TABLE, then call the MSAA role
   // a ROLE_OUTLINEITEM for consistency and compatibility.
   // We need this because ARIA has a role of "row" for both grid and treegrid
   if (geckoRole == roles::ROW) {
@@ -1176,17 +1176,17 @@ AccessibleWrap::role(long *aRole)
   case roles::_geckoRole: \
     *aRole = ia2Role; \
     break;
 
   a11y::role geckoRole = Role();
   switch (geckoRole) {
 #include "RoleMap.h"
     default:
-      MOZ_NOT_REACHED("Unknown role.");
+      MOZ_CRASH("Unknown role.");
   };
 
 #undef ROLE
 
   // Special case, if there is a ROLE_ROW inside of a ROLE_TREE_TABLE, then call
   // the IA2 role a ROLE_OUTLINEITEM.
   if (geckoRole == roles::ROW) {
     Accessible* xpParent = Parent();
--- a/caps/src/nsPrincipal.cpp
+++ b/caps/src/nsPrincipal.cpp
@@ -835,17 +835,17 @@ nsExpandedPrincipal::CheckMayLoad(nsIURI
   }
 
   return NS_ERROR_DOM_BAD_URI;
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetHashValue(uint32_t* result)
 {
-  MOZ_NOT_REACHED("extended principal should never be used as key in a hash map");
+  MOZ_CRASH("extended principal should never be used as key in a hash map");
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 nsExpandedPrincipal::GetURI(nsIURI** aURI)
 {
   *aURI = nullptr;
   return NS_OK;
--- a/content/base/src/Element.cpp
+++ b/content/base/src/Element.cpp
@@ -2703,17 +2703,17 @@ public:
             break;
           case Unit::eTextFragment:
             u.mTextFragment->AppendTo(aOut);
             break;
           case Unit::eTextFragmentWithEncode:
             EncodeTextFragment(u.mTextFragment, aOut);
             break;
           default:
-            MOZ_NOT_REACHED("Unknown unit type?");
+            MOZ_CRASH("Unknown unit type?");
         }
       }
     }
     return true;
   }
 private:
   Unit* AddUnit()
   {
--- a/content/base/src/nsAttrValue.cpp
+++ b/content/base/src/nsAttrValue.cpp
@@ -303,17 +303,17 @@ nsAttrValue::SetTo(const nsAttrValue& aO
     }
     case eColor:
     {
       cont->mValue.mColor = otherCont->mValue.mColor;
       break;
     }
     case eCSSStyleRule:
     {
-      MOZ_NOT_REACHED("These should be refcounted!");
+      MOZ_CRASH("These should be refcounted!");
       break;
     }
     case eURL:
     {
       NS_ADDREF(cont->mValue.mURL = otherCont->mValue.mURL);
       break;
     }
     case eImage:
--- a/content/base/src/nsContentIterator.cpp
+++ b/content/base/src/nsContentIterator.cpp
@@ -1447,10 +1447,10 @@ nsContentSubtreeIterator::GetTopAncestor
       nsRange::CompareNodeToRange(parent, mRange, &nodeBefore, &nodeAfter)));
 
     if (nodeBefore || nodeAfter) {
       return content;
     }
     content = parent;
   }
 
-  MOZ_NOT_REACHED("This should only be possible if aNode was null");
+  MOZ_CRASH("This should only be possible if aNode was null");
 }
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -8470,17 +8470,17 @@ nsDocument::MaybePreLoadImage(nsIURI* ur
   case CORS_ANONYMOUS:
     loadFlags |= imgILoader::LOAD_CORS_ANONYMOUS;
     break;
   case CORS_USE_CREDENTIALS:
     loadFlags |= imgILoader::LOAD_CORS_USE_CREDENTIALS;
     break;
   default:
     /* should never happen */
-    MOZ_NOT_REACHED("Unknown CORS mode!");
+    MOZ_CRASH("Unknown CORS mode!");
   }
 
   // Image not in cache - trigger preload
   nsRefPtr<imgRequestProxy> request;
   nsresult rv =
     nsContentUtils::LoadImage(uri,
                               this,
                               NodePrincipal(),
@@ -11143,17 +11143,17 @@ SizeOfStyleSheetsElementIncludingThis(ns
 
 size_t
 nsDocument::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
 {
   // This SizeOfExcludingThis() overrides the one from nsINode.  But
   // nsDocuments can only appear at the top of the DOM tree, and we use the
   // specialized DocSizeOfExcludingThis() in that case.  So this should never
   // be called.
-  MOZ_NOT_REACHED("nsDocument::SizeOfExcludingThis");
+  MOZ_CRASH("nsDocument::SizeOfExcludingThis");
   return 0;
 }
 
 void
 nsDocument::DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
 {
   nsIDocument::DocSizeOfExcludingThis(aWindowSizes);
 
--- a/content/base/src/nsObjectLoadingContent.cpp
+++ b/content/base/src/nsObjectLoadingContent.cpp
@@ -2988,17 +2988,17 @@ nsObjectLoadingContent::ShouldPlay(Fallb
   }
 
   switch (enabledState) {
   case nsIPluginTag::STATE_ENABLED:
     return true;
   case nsIPluginTag::STATE_CLICKTOPLAY:
     return false;
   }
-  MOZ_NOT_REACHED("Unexpected enabledState");
+  MOZ_CRASH("Unexpected enabledState");
   return false;
 }
 
 nsIDocument*
 nsObjectLoadingContent::GetContentDocument()
 {
   nsCOMPtr<nsIContent> thisContent =
     do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
--- a/content/canvas/src/CanvasRenderingContext2D.cpp
+++ b/content/canvas/src/CanvasRenderingContext2D.cpp
@@ -1313,17 +1313,17 @@ WrapStyle(JSContext* cx, JSObject* objAr
     case CanvasRenderingContext2D::CMG_STYLE_PATTERN:
     case CanvasRenderingContext2D::CMG_STYLE_GRADIENT:
     {
       JS::Rooted<JSObject*> obj(cx, objArg);
       ok = dom::WrapObject(cx, obj, supports, &v);
       break;
     }
     default:
-      MOZ_NOT_REACHED("unexpected CanvasMultiGetterType");
+      MOZ_CRASH("unexpected CanvasMultiGetterType");
   }
   if (!ok) {
     error.Throw(NS_ERROR_FAILURE);
   }
   return v;
 }
 
 
@@ -2633,17 +2633,17 @@ CanvasRenderingContext2D::DrawOrMeasureT
     // fall through; best we can do with the information available
   case TEXT_BASELINE_ALPHABETIC:
     anchorY = 0;
     break;
   case TEXT_BASELINE_BOTTOM:
     anchorY = -fontMetrics.emDescent;
     break;
   default:
-      MOZ_NOT_REACHED("unexpected TextBaseline");
+      MOZ_CRASH("unexpected TextBaseline");
   }
 
   processor.mPt.y += anchorY;
 
   // correct bounding box to get it to be the correct size/position
   processor.mBoundingBox.width = totalWidth;
   processor.mBoundingBox.MoveBy(processor.mPt);
 
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -5504,25 +5504,25 @@ WebGLTexelFormat mozilla::GetWebGLTexelF
     // WEBGL_depth_texture
     if (format == LOCAL_GL_DEPTH_COMPONENT) {
         switch (type) {
             case LOCAL_GL_UNSIGNED_SHORT:
                 return WebGLTexelConversions::D16;
             case LOCAL_GL_UNSIGNED_INT:
                 return WebGLTexelConversions::D32;
             default:
-                MOZ_NOT_REACHED("Invalid WebGL texture format/type?");
+                MOZ_CRASH("Invalid WebGL texture format/type?");
                 return WebGLTexelConversions::BadFormat;
         }
     } else if (format == LOCAL_GL_DEPTH_STENCIL) {
         switch (type) {
             case LOCAL_GL_UNSIGNED_INT_24_8_EXT:
                 return WebGLTexelConversions::D24S8;
             default:
-                MOZ_NOT_REACHED("Invalid WebGL texture format/type?");
+                MOZ_CRASH("Invalid WebGL texture format/type?");
                 NS_ABORT_IF_FALSE(false, "Coding mistake?! Should never reach this point.");
                 return WebGLTexelConversions::BadFormat;
         }
     }
 
 
     if (type == LOCAL_GL_UNSIGNED_BYTE) {
         switch (format) {
--- a/content/canvas/src/WebGLFramebuffer.cpp
+++ b/content/canvas/src/WebGLFramebuffer.cpp
@@ -113,17 +113,17 @@ WebGLFramebuffer::Attachment::IsComplete
         else if (mAttachmentPoint >= LOCAL_GL_COLOR_ATTACHMENT0 &&
                  mAttachmentPoint < WebGLenum(LOCAL_GL_COLOR_ATTACHMENT0 + WebGLContext::sMaxColorAttachments)) {
             return (format == LOCAL_GL_ALPHA ||
                     format == LOCAL_GL_LUMINANCE ||
                     format == LOCAL_GL_LUMINANCE_ALPHA ||
                     format == LOCAL_GL_RGB ||
                     format == LOCAL_GL_RGBA);
         }
-        MOZ_NOT_REACHED("Invalid WebGL attachment poin?");
+        MOZ_CRASH("Invalid WebGL attachment poin?");
     }
 
     if (mRenderbufferPtr) {
         WebGLenum format = mRenderbufferPtr->InternalFormat();
 
         if (mAttachmentPoint == LOCAL_GL_DEPTH_ATTACHMENT) {
             return format == LOCAL_GL_DEPTH_COMPONENT16;
         }
@@ -134,17 +134,17 @@ WebGLFramebuffer::Attachment::IsComplete
             return format == LOCAL_GL_DEPTH_STENCIL;
         }
         else if (mAttachmentPoint >= LOCAL_GL_COLOR_ATTACHMENT0 &&
                  mAttachmentPoint < WebGLenum(LOCAL_GL_COLOR_ATTACHMENT0 + WebGLContext::sMaxColorAttachments)) {
             return (format == LOCAL_GL_RGB565 ||
                     format == LOCAL_GL_RGB5_A1 ||
                     format == LOCAL_GL_RGBA4);
         }
-        MOZ_NOT_REACHED("Invalid WebGL attachment poin?");
+        MOZ_CRASH("Invalid WebGL attachment poin?");
     }
 
     NS_ABORT(); // should never get there
     return false;
 }
 
 void
 WebGLFramebuffer::Delete() {
--- a/content/events/src/TextComposition.cpp
+++ b/content/events/src/TextComposition.cpp
@@ -135,17 +135,17 @@ TextComposition::CompositionEventDispatc
     case NS_TEXT_TEXT: {
       nsTextEvent textEvent(true, NS_TEXT_TEXT, mWidget);
       textEvent.theText = mData;
       nsIMEStateManager::DispatchCompositionEvent(mEventTarget, mPresContext,
                                                   &textEvent, &status, nullptr);
       break;
     }
     default:
-      MOZ_NOT_REACHED("Unsupported event");
+      MOZ_CRASH("Unsupported event");
       break;
   }
   return NS_OK;
 }
 
 /******************************************************************************
  * TextCompositionArray
  ******************************************************************************/
--- a/content/events/src/nsDOMMouseEvent.cpp
+++ b/content/events/src/nsDOMMouseEvent.cpp
@@ -136,17 +136,17 @@ nsDOMMouseEvent::InitMouseEvent(const ns
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       static_cast<nsInputEvent*>(mEvent)->modifiers = modifiers;
       return NS_OK;
     default:
-      MOZ_NOT_REACHED("There is no space to store the modifiers");
+      MOZ_CRASH("There is no space to store the modifiers");
       return NS_ERROR_FAILURE;
   }
 }
 
 already_AddRefed<nsDOMMouseEvent>
 nsDOMMouseEvent::Constructor(const mozilla::dom::GlobalObject& aGlobal,
                              const nsAString& aType,
                              const mozilla::dom::MouseEventInit& aParam,
@@ -237,17 +237,17 @@ nsDOMMouseEvent::Buttons()
   {
     case NS_MOUSE_EVENT:
     case NS_MOUSE_SCROLL_EVENT:
     case NS_WHEEL_EVENT:
     case NS_DRAG_EVENT:
     case NS_SIMPLE_GESTURE_EVENT:
       return static_cast<nsMouseEvent_base*>(mEvent)->buttons;
     default:
-      MOZ_NOT_REACHED("Tried to get mouse buttons for non-mouse event!");
+      MOZ_CRASH("Tried to get mouse buttons for non-mouse event!");
       return 0;
   }
 }
 
 NS_IMETHODIMP
 nsDOMMouseEvent::GetRelatedTarget(nsIDOMEventTarget** aRelatedTarget)
 {
   NS_ENSURE_ARG_POINTER(aRelatedTarget);
--- a/content/events/src/nsDOMUIEvent.cpp
+++ b/content/events/src/nsDOMUIEvent.cpp
@@ -357,17 +357,17 @@ nsDOMUIEvent::IsChar() const
   {
     case NS_KEY_EVENT:
       return static_cast<nsKeyEvent*>(mEvent)->isChar;
     case NS_TEXT_EVENT:
       return static_cast<nsKeyEvent*>(mEvent)->isChar;
     default:
       return false;
   }
-  MOZ_NOT_REACHED("Switch handles all cases.");
+  MOZ_CRASH("Switch handles all cases.");
 }
 
 NS_IMETHODIMP
 nsDOMUIEvent::DuplicatePrivateData()
 {
   mClientPoint = nsDOMEvent::GetClientCoords(mPresContext,
                                              mEvent,
                                              mEvent->refPoint,
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -1490,17 +1490,17 @@ nsEventStateManager::DispatchCrossProces
   case NS_TOUCH_EVENT: {
     // Let the child process synthesize a mouse event if needed, and
     // ensure we don't synthesize one in this process.
     *aStatus = nsEventStatus_eConsumeNoDefault;
     nsTouchEvent* touchEvent = static_cast<nsTouchEvent*>(aEvent);
     return remote->SendRealTouchEvent(*touchEvent);
   }
   default: {
-    MOZ_NOT_REACHED("Attempt to send non-whitelisted event?");
+    MOZ_CRASH("Attempt to send non-whitelisted event?");
     return false;
   }
   }
 }
 
 bool
 nsEventStateManager::IsRemoteTarget(nsIContent* target) {
   if (!target) {
@@ -2515,17 +2515,17 @@ nsEventStateManager::DispatchLegacyMouse
     case nsIDOMWheelEvent::DOM_DELTA_PIXEL:
       scrollDeltaX = aEvent->lineOrPageDeltaX;
       scrollDeltaY = aEvent->lineOrPageDeltaY;
       pixelDeltaX = RoundDown(aEvent->deltaX);
       pixelDeltaY = RoundDown(aEvent->deltaY);
       break;
 
     default:
-      MOZ_NOT_REACHED("Invalid deltaMode value comes");
+      MOZ_CRASH("Invalid deltaMode value comes");
       return;
   }
 
   // Send the legacy events in following order:
   // 1. Vertical scroll
   // 2. Vertical pixel scroll (even if #1 isn't consumed)
   // 3. Horizontal scroll (even if #1 and/or #2 are consumed)
   // 4. Horizontal pixel scroll (even if #3 isn't consumed)
@@ -2842,17 +2842,17 @@ nsEventStateManager::DoScrollText(nsIScr
       break;
     case nsIDOMWheelEvent::DOM_DELTA_PAGE:
       origin = nsGkAtoms::pages;
       break;
     case nsIDOMWheelEvent::DOM_DELTA_PIXEL:
       origin = nsGkAtoms::pixels;
       break;
     default:
-      MOZ_NOT_REACHED("Invalid deltaMode value comes");
+      MOZ_CRASH("Invalid deltaMode value comes");
       return;
   }
 
   // We shouldn't scroll more one page at once except when over one page scroll
   // is allowed for the event.
   nsSize pageSize = aScrollableFrame->GetPageScrollAmount();
   nsIntSize devPixelPageSize(pc->AppUnitsToDevPixels(pageSize.width),
                              pc->AppUnitsToDevPixels(pageSize.height));
@@ -2887,17 +2887,17 @@ nsEventStateManager::DoScrollText(nsIScr
       break;
     case widget::WheelEvent::SCROLL_ASYNCHRONOUSELY:
       mode = nsIScrollableFrame::NORMAL;
       break;
     case widget::WheelEvent::SCROLL_SMOOTHLY:
       mode = nsIScrollableFrame::SMOOTH;
       break;
     default:
-      MOZ_NOT_REACHED("Invalid scrollType value comes");
+      MOZ_CRASH("Invalid scrollType value comes");
       return;
   }
 
   nsIntPoint overflow;
   aScrollableFrame->ScrollBy(actualDevPixelScrollAmount,
                              nsIScrollableFrame::DEVICE_PIXELS,
                              mode, &overflow, origin);
 
--- a/content/events/src/nsIMEStateManager.cpp
+++ b/content/events/src/nsIMEStateManager.cpp
@@ -582,20 +582,20 @@ nsIMEStateManager::NotifyIME(Notificatio
   if (!composition || !composition->IsSynthesizedForTests()) {
     switch (aNotification) {
       case NOTIFY_IME_OF_CURSOR_POS_CHANGED:
         return aWidget->NotifyIME(aNotification);
       case REQUEST_TO_COMMIT_COMPOSITION:
       case REQUEST_TO_CANCEL_COMPOSITION:
         return composition ? aWidget->NotifyIME(aNotification) : NS_OK;
       default:
-        MOZ_NOT_REACHED("Unsupported notification");
+        MOZ_CRASH("Unsupported notification");
         return NS_ERROR_INVALID_ARG;
     }
-    MOZ_NOT_REACHED(
+    MOZ_CRASH(
       "Failed to handle the notification for non-synthesized composition");
   }
 
   // If the composition is synthesized events for automated tests, we should
   // dispatch composition events for emulating the native composition behavior.
   // NOTE: The dispatched events are discarded if it's not safe to run script.
   switch (aNotification) {
     case REQUEST_TO_COMMIT_COMPOSITION: {
@@ -1044,17 +1044,17 @@ nsIMEStateManager::IsEditableIMEState(ns
   switch (aWidget->GetInputContext().mIMEState.mEnabled) {
     case widget::IMEState::ENABLED:
     case widget::IMEState::PASSWORD:
       return true;
     case widget::IMEState::PLUGIN:
     case widget::IMEState::DISABLED:
       return false;
     default:
-      MOZ_NOT_REACHED("Unknown IME enable state");
+      MOZ_CRASH("Unknown IME enable state");
       return false;
   }
 }
 
 void
 nsIMEStateManager::DestroyTextStateManager()
 {
   if (!sTextStateObserver) {
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -657,31 +657,31 @@ SinkContext::OpenContainer(const nsIPars
 
   if (mSink->IsMonolithicContainer(nodeType)) {
     mSink->mInMonolithicContainer++;
   }
 
   // Special handling for certain tags
   switch (nodeType) {
     case eHTMLTag_form:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for forms.");
+      MOZ_CRASH("Must not use HTMLContentSink for forms.");
       break;
 
     case eHTMLTag_frameset:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for frames.");
+      MOZ_CRASH("Must not use HTMLContentSink for frames.");
       break;
 
     case eHTMLTag_noembed:
     case eHTMLTag_noframes:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for noembed/noframes.");
+      MOZ_CRASH("Must not use HTMLContentSink for noembed/noframes.");
       break;
 
     case eHTMLTag_script:
     case eHTMLTag_style:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for styles and scripts.");
+      MOZ_CRASH("Must not use HTMLContentSink for styles and scripts.");
       break;
 
     case eHTMLTag_button:
     case eHTMLTag_audio:
     case eHTMLTag_video:
       content->DoneCreatingElement();
       break;
 
@@ -778,40 +778,40 @@ SinkContext::CloseContainer(const nsHTML
   }
 
   DidAddContent(content);
 
   // Special handling for certain tags
   switch (nodeType) {
   case eHTMLTag_noembed:
   case eHTMLTag_noframes:
-    MOZ_NOT_REACHED("Must not use HTMLContentSink for noembed/noframes.");
+    MOZ_CRASH("Must not use HTMLContentSink for noembed/noframes.");
     break;
 
   case eHTMLTag_form:
-    MOZ_NOT_REACHED("Must not use HTMLContentSink for forms.");
+    MOZ_CRASH("Must not use HTMLContentSink for forms.");
     break;
 
   case eHTMLTag_video:
   case eHTMLTag_audio:
   case eHTMLTag_select:
   case eHTMLTag_textarea:
   case eHTMLTag_object:
   case eHTMLTag_applet:
   case eHTMLTag_title:
     content->DoneAddingChildren(HaveNotifiedForCurrentContent());
     break;
 
   case eHTMLTag_script:
-    MOZ_NOT_REACHED("Must not use HTMLContentSink to run scripts.");
+    MOZ_CRASH("Must not use HTMLContentSink to run scripts.");
     result = NS_ERROR_NOT_IMPLEMENTED;
     break;
 
   case eHTMLTag_style:
-    MOZ_NOT_REACHED("Must not use HTMLContentSink for styles.");
+    MOZ_CRASH("Must not use HTMLContentSink for styles.");
     result = NS_ERROR_NOT_IMPLEMENTED;
     break;
 
   default:
     break;
   }
 
   NS_IF_RELEASE(content);
@@ -850,17 +850,17 @@ SinkContext::AddLeaf(const nsIParserNode
       NS_ENSURE_SUCCESS(rv, rv);
 
       // Add new leaf to its parent
       AddLeaf(content);
 
       // Additional processing needed once the element is in the tree
       switch (nodeType) {
       case eHTMLTag_meta:
-        MOZ_NOT_REACHED("Must not use HTMLContentSink for metas.");
+        MOZ_CRASH("Must not use HTMLContentSink for metas.");
         rv = NS_ERROR_NOT_IMPLEMENTED;
         break;
 
       case eHTMLTag_input:
         content->DoneCreatingElement();
         break;
 
       case eHTMLTag_menuitem:
@@ -1746,17 +1746,17 @@ HTMLContentSink::IsEnabled(int32_t aTag,
 
 NS_IMETHODIMP
 HTMLContentSink::OpenContainer(const nsIParserNode& aNode)
 {
   nsresult rv = NS_OK;
 
   switch (aNode.GetNodeType()) {
     case eHTMLTag_frameset:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for frames.");
+      MOZ_CRASH("Must not use HTMLContentSink for frames.");
       rv = NS_ERROR_NOT_IMPLEMENTED;
       break;
     case eHTMLTag_head:
       rv = OpenHeadContext();
       if (NS_SUCCEEDED(rv)) {
         rv = AddAttributes(aNode, mHead, true, mHaveSeenHead);
         mHaveSeenHead = true;
       }
@@ -1771,17 +1771,17 @@ HTMLContentSink::OpenContainer(const nsI
         AddAttributes(aNode, mRoot, true, mNotifiedRootInsertion);
         if (!mNotifiedRootInsertion) {
           NotifyRootInsertion();
         }
         ProcessOfflineManifest(mRoot);
       }
       break;
     case eHTMLTag_form:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for forms.");
+      MOZ_CRASH("Must not use HTMLContentSink for forms.");
       rv = NS_ERROR_NOT_IMPLEMENTED;
       break;
     default:
       rv = mCurrentContext->OpenContainer(aNode);
       break;
   }
 
   return rv;
@@ -1789,30 +1789,30 @@ HTMLContentSink::OpenContainer(const nsI
 
 NS_IMETHODIMP
 HTMLContentSink::CloseContainer(const eHTMLTags aTag)
 {
   nsresult rv = NS_OK;
 
   switch (aTag) {
     case eHTMLTag_frameset:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for frames.");
+      MOZ_CRASH("Must not use HTMLContentSink for frames.");
       rv = NS_ERROR_NOT_IMPLEMENTED;
       break;
     case eHTMLTag_head:
       CloseHeadContext();
       break;
     case eHTMLTag_body:
       rv = CloseBody();
       break;
     case eHTMLTag_html:
       rv = CloseHTML();
       break;
     case eHTMLTag_form:
-      MOZ_NOT_REACHED("Must not use HTMLContentSink for forms.");
+      MOZ_CRASH("Must not use HTMLContentSink for forms.");
       rv = NS_ERROR_NOT_IMPLEMENTED;
       break;
     default:
       rv = mCurrentContext->CloseContainer(aTag);
       break;
   }
 
   return rv;
@@ -1828,17 +1828,17 @@ NS_IMETHODIMP
 HTMLContentSink::AddLeaf(const nsIParserNode& aNode)
 {
   nsresult rv;
 
   nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());
   switch (nodeType) {
   case eHTMLTag_link:
     rv = NS_ERROR_NOT_IMPLEMENTED;
-    MOZ_NOT_REACHED("Must not use HTMLContentSink for links.");
+    MOZ_CRASH("Must not use HTMLContentSink for links.");
 
     break;
   default:
     rv = mCurrentContext->AddLeaf(aNode);
 
     break;
   }
 
--- a/content/media/DOMMediaStream.cpp
+++ b/content/media/DOMMediaStream.cpp
@@ -250,17 +250,17 @@ DOMMediaStream::CreateDOMTrack(TrackID a
     track = new AudioStreamTrack(this, aTrackID);
     mTrackTypesAvailable |= HINT_CONTENTS_AUDIO;
     break;
   case MediaSegment::VIDEO:
     track = new VideoStreamTrack(this, aTrackID);
     mTrackTypesAvailable |= HINT_CONTENTS_VIDEO;
     break;
   default:
-    MOZ_NOT_REACHED("Unhandled track type");
+    MOZ_CRASH("Unhandled track type");
     return nullptr;
   }
   mTracks.AppendElement(track);
 
   CheckTracksAvailable();
 
   return track;
 }
--- a/content/media/MediaStreamGraph.cpp
+++ b/content/media/MediaStreamGraph.cpp
@@ -1832,17 +1832,17 @@ MediaStream::ApplyTrackDisabling(TrackID
     for (VideoSegment::ChunkIterator i(*static_cast<VideoSegment*>(aSegment));
          !i.IsEnded(); i.Next()) {
       VideoChunk& chunk = *i;
       chunk.SetForceBlack(true);
     }
     break;
   }
   default:
-    MOZ_NOT_REACHED("Unknown track type");
+    MOZ_CRASH("Unknown track type");
     break;
   }
 }
 
 void
 SourceMediaStream::DestroyImpl()
 {
   {
--- a/content/media/encoder/MediaEncoder.cpp
+++ b/content/media/encoder/MediaEncoder.cpp
@@ -228,15 +228,15 @@ MediaEncoder::GetEncodedData(nsTArray<ns
 
     case ENCODE_DONE:
       LOG("MediaEncoder has been shutdown.");
       mShutdown = true;
       reloop = false;
       break;
 
     default:
-      MOZ_NOT_REACHED("Invalid encode state");
+      MOZ_CRASH("Invalid encode state");
       break;
     }
   }
 }
 
 }
--- a/content/media/encoder/OpusTrackEncoder.cpp
+++ b/content/media/encoder/OpusTrackEncoder.cpp
@@ -215,17 +215,17 @@ OpusTrackEncoder::GetHeader(nsTArray<uin
 
     mEncoderState = DATA;
     break;
   }
   case DATA:
     // No more headers.
     break;
   default:
-    MOZ_NOT_REACHED("Invalid state");
+    MOZ_CRASH("Invalid state");
     break;
   }
   return NS_OK;
 }
 
 nsresult
 OpusTrackEncoder::GetEncodedTrack(nsTArray<uint8_t>* aOutput,
                                   int &aOutputDuration)
--- a/content/media/webaudio/MediaBufferDecoder.cpp
+++ b/content/media/webaudio/MediaBufferDecoder.cpp
@@ -434,17 +434,17 @@ MediaDecodeTask::RunNextPhase()
 
   switch (mPhase) {
   case PhaseEnum::AllocateBuffer:
     MOZ_ASSERT(!NS_IsMainThread());
     NS_DispatchToMainThread(this);
     break;
   case PhaseEnum::Decode:
   case PhaseEnum::Done:
-    MOZ_NOT_REACHED("Invalid phase Decode");
+    MOZ_CRASH("Invalid phase Decode");
     break;
   }
 }
 
 class AutoResampler {
 public:
   AutoResampler()
     : mResampler(nullptr)
--- a/content/media/webspeech/recognition/SpeechRecognition.cpp
+++ b/content/media/webspeech/recognition/SpeechRecognition.cpp
@@ -166,17 +166,17 @@ SpeechRecognition::Transition(SpeechEven
         case EVENT_RECOGNITIONSERVICE_FINAL_RESULT:
           DoNothing(aEvent);
           break;
         case EVENT_AUDIO_ERROR:
         case EVENT_RECOGNITIONSERVICE_ERROR:
           AbortError(aEvent);
           break;
         case EVENT_COUNT:
-          MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
+          MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_STARTING:
       switch (aEvent->mType) {
         case EVENT_AUDIO_DATA:
           StartedAudioCapture(aEvent);
           break;
         case EVENT_AUDIO_ERROR:
@@ -190,19 +190,19 @@ SpeechRecognition::Transition(SpeechEven
           Reset();
           break;
         case EVENT_RECOGNITIONSERVICE_INTERMEDIATE_RESULT:
         case EVENT_RECOGNITIONSERVICE_FINAL_RESULT:
           DoNothing(aEvent);
           break;
         case EVENT_START:
           SR_LOG("STATE_STARTING: Unhandled event %s", GetName(aEvent));
-          MOZ_NOT_REACHED("");
+          MOZ_CRASH("");
         case EVENT_COUNT:
-          MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
+          MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_ESTIMATING:
       switch (aEvent->mType) {
         case EVENT_AUDIO_DATA:
           WaitForEstimation(aEvent);
           break;
         case EVENT_STOP:
@@ -216,19 +216,19 @@ SpeechRecognition::Transition(SpeechEven
         case EVENT_RECOGNITIONSERVICE_ERROR:
           DoNothing(aEvent);
           break;
         case EVENT_AUDIO_ERROR:
           AbortError(aEvent);
           break;
         case EVENT_START:
           SR_LOG("STATE_ESTIMATING: Unhandled event %d", aEvent->mType);
-          MOZ_NOT_REACHED("");
+          MOZ_CRASH("");
         case EVENT_COUNT:
-          MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
+          MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_WAITING_FOR_SPEECH:
       switch (aEvent->mType) {
         case EVENT_AUDIO_DATA:
           DetectSpeech(aEvent);
           break;
         case EVENT_STOP:
@@ -242,19 +242,19 @@ SpeechRecognition::Transition(SpeechEven
           break;
         case EVENT_RECOGNITIONSERVICE_INTERMEDIATE_RESULT:
         case EVENT_RECOGNITIONSERVICE_FINAL_RESULT:
         case EVENT_RECOGNITIONSERVICE_ERROR:
           DoNothing(aEvent);
           break;
         case EVENT_START:
           SR_LOG("STATE_STARTING: Unhandled event %s", GetName(aEvent));
-          MOZ_NOT_REACHED("");
+          MOZ_CRASH("");
         case EVENT_COUNT:
-          MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
+          MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_RECOGNIZING:
       switch (aEvent->mType) {
         case EVENT_AUDIO_DATA:
           WaitForSpeechEnd(aEvent);
           break;
         case EVENT_STOP:
@@ -268,19 +268,19 @@ SpeechRecognition::Transition(SpeechEven
           AbortSilently(aEvent);
           break;
         case EVENT_RECOGNITIONSERVICE_FINAL_RESULT:
         case EVENT_RECOGNITIONSERVICE_INTERMEDIATE_RESULT:
           DoNothing(aEvent);
           break;
         case EVENT_START:
           SR_LOG("STATE_RECOGNIZING: Unhandled aEvent %s", GetName(aEvent));
-          MOZ_NOT_REACHED("");
+          MOZ_CRASH("");
         case EVENT_COUNT:
-          MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
+          MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_WAITING_FOR_RESULT:
       switch (aEvent->mType) {
         case EVENT_STOP:
           DoNothing(aEvent);
           break;
         case EVENT_AUDIO_ERROR:
@@ -294,26 +294,26 @@ SpeechRecognition::Transition(SpeechEven
           DoNothing(aEvent);
           break;
         case EVENT_ABORT:
           AbortSilently(aEvent);
           break;
         case EVENT_START:
         case EVENT_RECOGNITIONSERVICE_INTERMEDIATE_RESULT:
           SR_LOG("STATE_WAITING_FOR_RESULT: Unhandled aEvent %s", GetName(aEvent));
-          MOZ_NOT_REACHED("");
+          MOZ_CRASH("");
         case EVENT_COUNT:
-          MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
+          MOZ_CRASH("Invalid event EVENT_COUNT");
       }
       break;
     case STATE_ABORTING:
       DoNothing(aEvent);
       break;
     case STATE_COUNT:
-      MOZ_NOT_REACHED("Invalid state STATE_COUNT");
+      MOZ_CRASH("Invalid state STATE_COUNT");
   }
 
   return;
 }
 
 /*
  * Handle a segment of recorded audio data.
  * Returns the number of samples that were processed.
--- a/content/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp
+++ b/content/media/webspeech/synth/ipc/SpeechSynthesisChild.cpp
@@ -43,17 +43,17 @@ SpeechSynthesisChild::RecvSetDefaultVoic
 PSpeechSynthesisRequestChild*
 SpeechSynthesisChild::AllocPSpeechSynthesisRequest(const nsString& aText,
                                                    const nsString& aLang,
                                                    const nsString& aUri,
                                                    const float& aVolume,
                                                    const float& aRate,
                                                    const float& aPitch)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return nullptr;
 }
 
 bool
 SpeechSynthesisChild::DeallocPSpeechSynthesisRequest(PSpeechSynthesisRequestChild* aActor)
 {
   delete aActor;
   return true;
@@ -144,25 +144,25 @@ SpeechTaskChild::SpeechTaskChild(SpeechS
   : nsSpeechTask(aUtterance)
 {
 }
 
 NS_IMETHODIMP
 SpeechTaskChild::Setup(nsISpeechTaskCallback* aCallback,
                        uint32_t aChannels, uint32_t aRate, uint8_t argc)
 {
-  MOZ_NOT_REACHED("Should never be called from child");
+  MOZ_CRASH("Should never be called from child");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 SpeechTaskChild::SendAudio(const JS::Value& aData, const JS::Value& aLandmarks,
                            JSContext* aCx)
 {
-  MOZ_NOT_REACHED("Should never be called from child");
+  MOZ_CRASH("Should never be called from child");
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 void
 SpeechTaskChild::Pause()
 {
   MOZ_ASSERT(mActor);
   mActor->SendPause();
--- a/content/smil/nsSMILTimedElement.cpp
+++ b/content/smil/nsSMILTimedElement.cpp
@@ -2215,17 +2215,17 @@ nsSMILTimedElement::GetNextMilestone(nsS
       }
 
       return false;
     }
 
   case STATE_POSTACTIVE:
     return false;
   }
-  MOZ_NOT_REACHED("Invalid element state");
+  MOZ_CRASH("Invalid element state");
 }
 
 void
 nsSMILTimedElement::NotifyNewInterval()
 {
   NS_ABORT_IF_FALSE(mCurrentInterval,
       "Attempting to notify dependents of a new interval but the interval "
       "is not set");
@@ -2287,17 +2287,17 @@ nsSMILTimedElement::GetEffectiveBeginIns
 
   case STATE_WAITING:
   case STATE_POSTACTIVE:
     {
       const nsSMILInterval* prevInterval = GetPreviousInterval();
       return prevInterval ? prevInterval->Begin() : nullptr;
     }
   }
-  MOZ_NOT_REACHED("Invalid element state");
+  MOZ_CRASH("Invalid element state");
 }
 
 const nsSMILInterval*
 nsSMILTimedElement::GetPreviousInterval() const
 {
   return mOldIntervals.IsEmpty()
     ? nullptr
     : mOldIntervals[mOldIntervals.Length()-1].get();
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -563,11 +563,11 @@ AudioChannelService::GetInternalType(Aud
                ? AUDIO_CHANNEL_INT_PUBLICNOTIFICATION_HIDDEN
                : AUDIO_CHANNEL_INT_PUBLICNOTIFICATION;
 
     case AUDIO_CHANNEL_LAST:
     default:
       break;
   }
 
-  MOZ_NOT_REACHED("unexpected audio channel type");
+  MOZ_CRASH("unexpected audio channel type");
   return AUDIO_CHANNEL_INT_LAST;
 }
--- a/dom/base/DOMRequest.cpp
+++ b/dom/base/DOMRequest.cpp
@@ -90,17 +90,17 @@ DOMRequest::GetReadyState(nsAString& aRe
   switch (readyState) {
     case DOMRequestReadyState::Pending:
       aReadyState.AssignLiteral("pending");
       break;
     case DOMRequestReadyState::Done:
       aReadyState.AssignLiteral("done");
       break;
     default:
-      MOZ_NOT_REACHED("Unrecognized readyState.");
+      MOZ_CRASH("Unrecognized readyState.");
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 DOMRequest::GetResult(JS::Value* aResult)
 {
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -1811,26 +1811,26 @@ nsDOMClassInfo::Init()
   MOZ_STATIC_ASSERT(MOZ_ARRAY_LENGTH(sClassInfoData) == eDOMClassInfoIDCount,
                     "The number of items in sClassInfoData doesn't match the "
                     "number of nsIDOMClassInfo ID's, this is bad! Fix it!");
 
 #ifdef DEBUG
   for (size_t i = 0; i < eDOMClassInfoIDCount; i++) {
     if (!sClassInfoData[i].u.mConstructorFptr ||
         sClassInfoData[i].mDebugID != i) {
-      MOZ_NOT_REACHED("Class info data out of sync, you forgot to update "
+      MOZ_CRASH("Class info data out of sync, you forgot to update "
                       "nsDOMClassInfo.h and nsDOMClassInfo.cpp! Fix this, "
                       "mozilla will not work without this fixed!");
       return NS_ERROR_NOT_INITIALIZED;
     }
   }
 
   for (size_t i = 0; i < eDOMClassInfoIDCount; i++) {
     if (!sClassInfoData[i].mInterfaces) {
-      MOZ_NOT_REACHED("Class info data without an interface list! Fix this, "
+      MOZ_CRASH("Class info data without an interface list! Fix this, "
                       "mozilla will not work without this fixed!");
 
       return NS_ERROR_NOT_INITIALIZED;
      }
    }
 #endif
 
   // Initialize static JSString's
@@ -2022,17 +2022,17 @@ nsDOMClassInfo::PostCreate(nsIXPConnectW
 
   return NS_ERROR_UNEXPECTED;
 }
 
 NS_IMETHODIMP
 nsDOMClassInfo::PostTransplant(nsIXPConnectWrappedNative *wrapper,
                                JSContext *cx, JSObject *obj)
 {
-  MOZ_NOT_REACHED("nsDOMClassInfo::PostTransplant Don't call me!");
+  MOZ_CRASH("nsDOMClassInfo::PostTransplant Don't call me!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDOMClassInfo::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                             JSObject *obj, jsid id, jsval *vp,
                             bool *_retval)
 {
@@ -3142,17 +3142,17 @@ DefineIDBInterfaceConstants(JSContext *c
   }
   else if (aIID->Equals(NS_GET_IID(nsIIDBRequest))) {
     interface = IDBConstant::IDBRequest;
   }
   else if (aIID->Equals(NS_GET_IID(nsIIDBTransaction))) {
     interface = IDBConstant::IDBTransaction;
   }
   else {
-    MOZ_NOT_REACHED("unexpected IID");
+    MOZ_CRASH("unexpected IID");
   }
 
   for (int8_t i = 0; i < (int8_t)mozilla::ArrayLength(sIDBConstants); ++i) {
     const IDBConstant& c = sIDBConstants[i];
     if (c.interface != interface) {
       continue;
     }
 
--- a/dom/base/nsScreen.cpp
+++ b/dom/base/nsScreen.cpp
@@ -193,17 +193,17 @@ nsScreen::GetMozOrientation(nsString& aO
   case eScreenOrientation_LandscapePrimary:
     aOrientation.AssignLiteral("landscape-primary");
     break;
   case eScreenOrientation_LandscapeSecondary:
     aOrientation.AssignLiteral("landscape-secondary");
     break;
   case eScreenOrientation_None:
   default:
-    MOZ_NOT_REACHED("Unacceptable mOrientation value");
+    MOZ_CRASH("Unacceptable mOrientation value");
   }
 }
 
 NS_IMETHODIMP
 nsScreen::GetSlowMozOrientation(nsAString& aOrientation)
 {
   nsString orientation;
   GetMozOrientation(orientation);
@@ -366,17 +366,17 @@ nsScreen::MozLockOrientation(const Seque
       aRv = target->AddSystemEventListener(NS_LITERAL_STRING("mozfullscreenchange"),
                                            mEventListener, /* useCapture = */ true);
       return true;
     }
   }
 
   // This is only for compilers that don't understand that the previous switch
   // will always return.
-  MOZ_NOT_REACHED("unexpected lock orientation permission value");
+  MOZ_CRASH("unexpected lock orientation permission value");
   return false;
 }
 
 void
 nsScreen::MozUnlockOrientation()
 {
   hal::UnlockScreenOrientation();
 }
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -5052,17 +5052,17 @@ class CGMethodCall(CGThing):
         overloadCGThings.append(
             CGGeneric("unsigned argcount = std::min(args.length(), %du);" %
                       maxArgCount))
         overloadCGThings.append(
             CGSwitch("argcount",
                      argCountCases,
                      CGGeneric('return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "%s");\n' % methodName)))
         overloadCGThings.append(
-            CGGeneric('MOZ_NOT_REACHED("We have an always-returning default case");\n'
+            CGGeneric('MOZ_CRASH("We have an always-returning default case");\n'
                       'return false;'))
         self.cgRoot = CGWrapper(CGIndenter(CGList(overloadCGThings, "\n")),
                                 pre="\n")
 
     def define(self):
         return self.cgRoot.define()
 
 class CGGetterCall(CGPerSignatureCall):
--- a/dom/bindings/PrimitiveConversions.h
+++ b/dom/bindings/PrimitiveConversions.h
@@ -88,17 +88,17 @@ struct PrimitiveConversionTraits {
 template<typename T>
 struct DisallowedConversion {
   typedef int jstype;
   typedef int intermediateType;
 
 private:
   static inline bool converter(JSContext* cx, JS::Handle<JS::Value> v,
                                jstype* retval) {
-    MOZ_NOT_REACHED("This should never be instantiated!");
+    MOZ_CRASH("This should never be instantiated!");
     return false;
   }
 };
 
 struct PrimitiveConversionTraits_smallInt {
   // The output of JS::ToInt32 is determined as follows:
   //   1) The value is converted to a double
   //   2) Anything that's not a finite double returns 0
--- a/dom/bluetooth/BluetoothService.cpp
+++ b/dom/bluetooth/BluetoothService.cpp
@@ -676,17 +676,17 @@ BluetoothService::HandleShutdown()
           if (!NS_ProcessNextEvent(currentThread)) {
             MOZ_ASSERT(false, "Something horribly wrong here!");
             break;
           }
           GetAllBluetoothActors(childActors);
         }
 
         if (NS_FAILED(timer->Cancel())) {
-          MOZ_NOT_REACHED("Failed to cancel shutdown timer, this will crash!");
+          MOZ_CRASH("Failed to cancel shutdown timer, this will crash!");
         }
       }
       else {
         MOZ_ASSERT(false, "Failed to initialize shutdown timer!");
       }
     }
   }
 
--- a/dom/bluetooth/BluetoothUnixSocketConnector.cpp
+++ b/dom/bluetooth/BluetoothUnixSocketConnector.cpp
@@ -88,17 +88,17 @@ BluetoothUnixSocketConnector::SetUp(int 
   case BluetoothSocketType::L2CAP:
   case BluetoothSocketType::EL2CAP:
     lm |= mAuth ? L2CAP_LM_AUTH : 0;
     lm |= mEncrypt ? L2CAP_LM_ENCRYPT : 0;
     break;
   case BluetoothSocketType::SCO:
     break;
   default:
-    MOZ_NOT_REACHED("Unknown socket type!");
+    MOZ_CRASH("Unknown socket type!");
   }
 
   if (lm) {
     if (mType == BluetoothSocketType::RFCOMM) {
       if (setsockopt(aFd, SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm))) {
         NS_WARNING("setsockopt(RFCOMM_LM) failed, throwing");
         return false;
       }
@@ -176,17 +176,17 @@ BluetoothUnixSocketConnector::Create()
     break;
   case BluetoothSocketType::L2CAP:
     fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
     break;
   case BluetoothSocketType::EL2CAP:
     fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_L2CAP);
     break;
   default:
-    MOZ_NOT_REACHED();
+    MOZ_CRASH();
   }
 
   if (fd < 0) {
     NS_WARNING("Could not open bluetooth socket!");
     return -1;
   }
 
   if (!SetUp(fd)) {
@@ -257,12 +257,12 @@ BluetoothUnixSocketConnector::GetSocketA
   case BluetoothSocketType::SCO:
     get_bdaddr_as_string((bdaddr_t*)(&aAddr.sco.sco_bdaddr), addr);
     break;
   case BluetoothSocketType::L2CAP:
   case BluetoothSocketType::EL2CAP:
     get_bdaddr_as_string((bdaddr_t*)(&aAddr.l2.l2_bdaddr), addr);
     break;
   default:
-    MOZ_NOT_REACHED("Socket should be either RFCOMM or SCO!");
+    MOZ_CRASH("Socket should be either RFCOMM or SCO!");
   }
   aAddrStr.AssignASCII(addr);
 }
--- a/dom/bluetooth/ipc/BluetoothChild.cpp
+++ b/dom/bluetooth/ipc/BluetoothChild.cpp
@@ -112,17 +112,17 @@ BluetoothChild::RecvNotificationsStopped
 
   Send__delete__(this);
   return true;
 }
 
 PBluetoothRequestChild*
 BluetoothChild::AllocPBluetoothRequest(const Request& aRequest)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return nullptr;
 }
 
 bool
 BluetoothChild::DeallocPBluetoothRequest(PBluetoothRequestChild* aActor)
 {
   delete aActor;
   return true;
--- a/dom/bluetooth/ipc/BluetoothParent.cpp
+++ b/dom/bluetooth/ipc/BluetoothParent.cpp
@@ -62,17 +62,17 @@ public:
   {
     MOZ_ASSERT(NS_IsMainThread());
     mRequest = nullptr;
   }
 
   virtual bool
   ParseSuccessfulReply(JS::Value* aValue) MOZ_OVERRIDE
   {
-    MOZ_NOT_REACHED("This should never be called!");
+    MOZ_CRASH("This should never be called!");
     return false;
   }
 };
 
 /*******************************************************************************
  * BluetoothParent
  ******************************************************************************/
 
@@ -227,21 +227,21 @@ BluetoothParent::RecvPBluetoothRequestCo
       return actor->DoRequest(aRequest.get_DenyReceivingFileRequest());
     case Request::TConnectScoRequest:
       return actor->DoRequest(aRequest.get_ConnectScoRequest());
     case Request::TDisconnectScoRequest:
       return actor->DoRequest(aRequest.get_DisconnectScoRequest());
     case Request::TIsScoConnectedRequest:
       return actor->DoRequest(aRequest.get_IsScoConnectedRequest());
     default:
-      MOZ_NOT_REACHED("Unknown type!");
+      MOZ_CRASH("Unknown type!");
       return false;
   }
 
-  MOZ_NOT_REACHED("Should never get here!");
+  MOZ_CRASH("Should never get here!");
   return false;
 }
 
 PBluetoothRequestParent*
 BluetoothParent::AllocPBluetoothRequest(const Request& aRequest)
 {
   MOZ_ASSERT(mService);
   return new BluetoothRequestParent(mService);
--- a/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp
+++ b/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp
@@ -189,34 +189,34 @@ BluetoothServiceChildProcess::RemoveDevi
 
 nsresult
 BluetoothServiceChildProcess::GetScoSocket(
                                     const nsAString& aObjectPath,
                                     bool aAuth,
                                     bool aEncrypt,
                                     mozilla::ipc::UnixSocketConsumer* aConsumer)
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return NS_ERROR_FAILURE;
 }
 
 nsresult
 BluetoothServiceChildProcess::GetServiceChannel(const nsAString& aDeviceAddress,
                                                 const nsAString& aServiceUuid,
                                                 BluetoothProfileManagerBase* aManager)
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return NS_ERROR_FAILURE;
 }
 
 bool
 BluetoothServiceChildProcess::UpdateSdpRecords(const nsAString& aDeviceAddress,
                                                BluetoothProfileManagerBase* aManager)
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return false;
 }
 
 bool
 BluetoothServiceChildProcess::SetPinCodeInternal(
                                                 const nsAString& aDeviceAddress,
                                                 const nsAString& aPinCode,
                                                 BluetoothReplyRunnable* aRunnable)
@@ -359,40 +359,40 @@ BluetoothServiceChildProcess::HandleShut
     gBluetoothChild->BeginShutdown();
   }
   return NS_OK;
 }
 
 nsresult
 BluetoothServiceChildProcess::StartInternal()
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return NS_ERROR_FAILURE;
 }
 
 nsresult
 BluetoothServiceChildProcess::StopInternal()
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return NS_ERROR_FAILURE;
 }
 
 bool
 BluetoothServiceChildProcess::IsEnabledInternal()
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return false;
 }
 
 bool
 BluetoothServiceChildProcess::IsConnected(uint16_t aProfileId)
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return false;
 }
 
 nsresult
 BluetoothServiceChildProcess::SendSinkMessage(const nsAString& aDeviceAddresses,
                                               const nsAString& aMessage)
 {
-  MOZ_NOT_REACHED("This should never be called!");
+  MOZ_CRASH("This should never be called!");
   return NS_ERROR_FAILURE;
 }
--- a/dom/fm/FMRadio.cpp
+++ b/dom/fm/FMRadio.cpp
@@ -235,17 +235,17 @@ void FMRadio::Notify(const FMRadioOperat
       break;
     case FM_RADIO_OPERATION_DISABLE:
       DispatchTrustedEvent(RADIO_DIABLED_EVENT_NAME);
       break;
     case FM_RADIO_OPERATION_SEEK:
       DispatchTrustedEvent(RADIO_SEEK_COMPLETE_EVENT_NAME);
       break;
     default:
-      MOZ_NOT_REACHED();
+      MOZ_CRASH();
       return;
   }
 }
 
 /* void canPlayChanged (in boolean canPlay); */
 NS_IMETHODIMP FMRadio::CanPlayChanged(bool canPlay)
 {
   nsCOMPtr<nsIAudioManager> audioManager =
--- a/dom/indexedDB/AsyncConnectionHelper.cpp
+++ b/dom/indexedDB/AsyncConnectionHelper.cpp
@@ -249,17 +249,17 @@ AsyncConnectionHelper::Run()
         mResultCode = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
         if (mRequest) {
           mRequest->NotifyHelperSentResultsToChildProcess(mResultCode);
         }
         break;
       }
 
       default:
-        MOZ_NOT_REACHED("Unknown value for ChildProcessSendResult!");
+        MOZ_CRASH("Unknown value for ChildProcessSendResult!");
     }
 
     NS_ASSERTION(gCurrentTransaction == mTransaction, "Should be unchanged!");
     gCurrentTransaction = oldTransaction;
 
     if (mDispatched && mTransaction) {
       mTransaction->OnRequestFinished();
     }
--- a/dom/indexedDB/IDBDatabase.cpp
+++ b/dom/indexedDB/IDBDatabase.cpp
@@ -131,17 +131,17 @@ public:
   {
     return Success_NotSent;
   }
 
   virtual nsresult UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
                                             MOZ_OVERRIDE
   {
-    MOZ_NOT_REACHED("Should never get here!");
+    MOZ_CRASH("Should never get here!");
     return NS_ERROR_UNEXPECTED;
   }
 
 private:
   // In-params.
   nsString mName;
   nsString mType;
 
@@ -864,17 +864,17 @@ NoRequestDatabaseHelper::SendResponseToC
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
   return Success_NotSent;
 }
 
 nsresult
 NoRequestDatabaseHelper::UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
 {
-  MOZ_NOT_REACHED("Should never get here!");
+  MOZ_CRASH("Should never get here!");
   return NS_ERROR_UNEXPECTED;
 }
 
 nsresult
 NoRequestDatabaseHelper::OnSuccess()
 {
   NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!");
   return NS_OK;
--- a/dom/indexedDB/OpenDatabaseHelper.cpp
+++ b/dom/indexedDB/OpenDatabaseHelper.cpp
@@ -1474,17 +1474,17 @@ protected:
   {
     return Success_NotSent;
   }
 
   virtual nsresult UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
                                             MOZ_OVERRIDE
   {
-    MOZ_NOT_REACHED("Should never get here!");
+    MOZ_CRASH("Should never get here!");
     return NS_ERROR_UNEXPECTED;
   }
 
   uint64_t RequestedVersion() const
   {
     return mRequestedVersion;
   }
 
@@ -1554,17 +1554,17 @@ protected:
   {
     return Success_NotSent;
   }
 
   virtual nsresult UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
                                             MOZ_OVERRIDE
   {
-    MOZ_NOT_REACHED("Should never get here!");
+    MOZ_CRASH("Should never get here!");
     return NS_ERROR_UNEXPECTED;
   }
 
 private:
   // In-params
   nsRefPtr<OpenDatabaseHelper> mOpenHelper;
   nsRefPtr<IDBOpenDBRequest> mOpenRequest;
   uint64_t mCurrentVersion;
--- a/dom/indexedDB/ProfilerHelpers.h
+++ b/dom/indexedDB/ProfilerHelpers.h
@@ -68,17 +68,17 @@ public:
         break;
       case IDBTransaction::READ_WRITE:
         AppendLiteral("\"readwrite\"");
         break;
       case IDBTransaction::VERSION_CHANGE:
         AppendLiteral("\"versionchange\"");
         break;
       default:
-        MOZ_NOT_REACHED("Unknown mode!");
+        MOZ_CRASH("Unknown mode!");
     };
   }
 
   explicit
   ProfilerString(IDBObjectStore* aObjectStore)
   {
     MOZ_ASSERT(aObjectStore);
 
@@ -149,17 +149,17 @@ public:
         break;
       case IDBCursor::PREV:
         AppendLiteral("\"prev\"");
         break;
       case IDBCursor::PREV_UNIQUE:
         AppendLiteral("\"prevunique\"");
         break;
       default:
-        MOZ_NOT_REACHED("Unknown direction!");
+        MOZ_CRASH("Unknown direction!");
     };
   }
 };
 
 END_INDEXEDDB_NAMESPACE
 
 #define IDB_PROFILER_MARK(_detailedFmt, _conciseFmt, ...)                      \
   do {                                                                         \
--- a/dom/indexedDB/ipc/IndexedDBChild.cpp
+++ b/dom/indexedDB/ipc/IndexedDBChild.cpp
@@ -221,17 +221,17 @@ IndexedDBChild::DeallocPIndexedDBDatabas
 {
   delete aActor;
   return true;
 }
 
 PIndexedDBDeleteDatabaseRequestChild*
 IndexedDBChild::AllocPIndexedDBDeleteDatabaseRequest(const nsString& aName)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return NULL;
 }
 
 bool
 IndexedDBChild::DeallocPIndexedDBDeleteDatabaseRequest(
                                    PIndexedDBDeleteDatabaseRequestChild* aActor)
 {
   delete aActor;
@@ -644,29 +644,29 @@ IndexedDBTransactionChild::RecvComplete(
     case CompleteParams::TAbortResult:
       resultCode = aParams.get_AbortResult().errorCode();
       if (NS_SUCCEEDED(resultCode)) {
         resultCode = NS_ERROR_DOM_INDEXEDDB_ABORT_ERR;
       }
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown union type!");
+      MOZ_CRASH("Unknown union type!");
       return false;
   }
 
   FireCompleteEvent(resultCode);
   return true;
 }
 
 PIndexedDBObjectStoreChild*
 IndexedDBTransactionChild::AllocPIndexedDBObjectStore(
                                     const ObjectStoreConstructorParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct an object store!");
+  MOZ_CRASH("Caller is supposed to manually construct an object store!");
   return NULL;
 }
 
 bool
 IndexedDBTransactionChild::DeallocPIndexedDBObjectStore(
                                              PIndexedDBObjectStoreChild* aActor)
 {
   delete aActor;
@@ -755,33 +755,33 @@ IndexedDBObjectStoreChild::RecvPIndexedD
   actor->SetCursor(cursor);
   return true;
 }
 
 PIndexedDBRequestChild*
 IndexedDBObjectStoreChild::AllocPIndexedDBRequest(
                                         const ObjectStoreRequestParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return NULL;
 }
 
 bool
 IndexedDBObjectStoreChild::DeallocPIndexedDBRequest(
                                                  PIndexedDBRequestChild* aActor)
 {
   delete aActor;
   return false;
 }
 
 PIndexedDBIndexChild*
 IndexedDBObjectStoreChild::AllocPIndexedDBIndex(
                                           const IndexConstructorParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct an index!");
+  MOZ_CRASH("Caller is supposed to manually construct an index!");
   return NULL;
 }
 
 bool
 IndexedDBObjectStoreChild::DeallocPIndexedDBIndex(PIndexedDBIndexChild* aActor)
 {
   delete aActor;
   return true;
@@ -887,28 +887,28 @@ IndexedDBIndexChild::RecvPIndexedDBCurso
 
       rv = mIndex->OpenCursorFromChildProcess(request, direction, aParams.key(),
                                               aParams.objectKey(),
                                               getter_AddRefs(cursor));
       NS_ENSURE_SUCCESS(rv, false);
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown union type!");
+      MOZ_CRASH("Unknown union type!");
       return false;
   }
 
   actor->SetCursor(cursor);
   return true;
 }
 
 PIndexedDBRequestChild*
 IndexedDBIndexChild::AllocPIndexedDBRequest(const IndexRequestParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return NULL;
 }
 
 bool
 IndexedDBIndexChild::DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor)
 {
   delete aActor;
   return true;
@@ -976,17 +976,17 @@ IndexedDBCursorChild::ActorDestroy(Actor
     mCursor = NULL;
 #endif
   }
 }
 
 PIndexedDBRequestChild*
 IndexedDBCursorChild::AllocPIndexedDBRequest(const CursorRequestParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return NULL;
 }
 
 bool
 IndexedDBCursorChild::DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor)
 {
   delete aActor;
   return true;
@@ -1029,17 +1029,17 @@ IndexedDBRequestChildBase::Disconnect()
       }
     }
   }
 }
 
 bool
 IndexedDBRequestChildBase::Recv__delete__(const ResponseValue& aResponse)
 {
-  MOZ_NOT_REACHED("This should be overridden!");
+  MOZ_CRASH("This should be overridden!");
   return false;
 }
 
 /*******************************************************************************
  * IndexedDBObjectStoreRequestChild
  ******************************************************************************/
 
 IndexedDBObjectStoreRequestChild::IndexedDBObjectStoreRequestChild(
@@ -1088,17 +1088,17 @@ IndexedDBObjectStoreRequestChild::Recv__
     case ResponseValue::TCountResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TCountParams);
       break;
     case ResponseValue::TOpenCursorResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TOpenCursorParams);
       break;
 
     default:
-      MOZ_NOT_REACHED("Received invalid response parameters!");
+      MOZ_CRASH("Received invalid response parameters!");
       return false;
   }
 
   nsresult rv = mHelper->OnParentProcessRequestComplete(aResponse);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
@@ -1147,17 +1147,17 @@ IndexedDBIndexRequestChild::Recv__delete
       MOZ_ASSERT(mRequestType == ParamsUnionType::TCountParams);
       break;
     case ResponseValue::TOpenCursorResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TOpenCursorParams ||
                  mRequestType == ParamsUnionType::TOpenKeyCursorParams);
       break;
 
     default:
-      MOZ_NOT_REACHED("Received invalid response parameters!");
+      MOZ_CRASH("Received invalid response parameters!");
       return false;
   }
 
   nsresult rv = mHelper->OnParentProcessRequestComplete(aResponse);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
@@ -1191,17 +1191,17 @@ IndexedDBCursorRequestChild::Recv__delet
   switch (aResponse.type()) {
     case ResponseValue::Tnsresult:
       break;
     case ResponseValue::TContinueResponse:
       MOZ_ASSERT(mRequestType == ParamsUnionType::TContinueParams);
       break;
 
     default:
-      MOZ_NOT_REACHED("Received invalid response parameters!");
+      MOZ_CRASH("Received invalid response parameters!");
       return false;
   }
 
   nsresult rv = mHelper->OnParentProcessRequestComplete(aResponse);
   NS_ENSURE_SUCCESS(rv, false);
 
   return true;
 }
@@ -1277,24 +1277,24 @@ IPCOpenDatabaseHelper::UnpackResponseFro
 {
   NS_NOTREACHED("Should never get here!");
   return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
 }
 
 AsyncConnectionHelper::ChildProcessSendResult
 IPCOpenDatabaseHelper::SendResponseToChildProcess(nsresult aResultCode)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return Error;
 }
 
 nsresult
 IPCOpenDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return NS_ERROR_FAILURE;
 }
 
 nsresult
 IPCOpenDatabaseHelper::GetSuccessResult(JSContext* aCx, JS::MutableHandle<JS::Value> aVal)
 {
   return WrapNative(aCx, NS_ISUPPORTS_CAST(EventTarget*, mDatabase),
                     aVal);
@@ -1306,24 +1306,24 @@ IPCSetVersionHelper::UnpackResponseFromP
 {
   NS_NOTREACHED("Should never get here!");
   return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
 }
 
 AsyncConnectionHelper::ChildProcessSendResult
 IPCSetVersionHelper::SendResponseToChildProcess(nsresult aResultCode)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return Error;
 }
 
 nsresult
 IPCSetVersionHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return NS_ERROR_FAILURE;
 }
 
 already_AddRefed<nsIDOMEvent>
 IPCSetVersionHelper::CreateSuccessEvent(mozilla::dom::EventTarget* aOwner)
 {
   return IDBVersionChangeEvent::CreateUpgradeNeeded(aOwner,
                                                     mOldVersion,
@@ -1338,32 +1338,32 @@ IPCSetVersionHelper::GetSuccessResult(JS
   return WrapNative(aCx, NS_ISUPPORTS_CAST(EventTarget*, mDatabase),
                     aVal);
 }
 
 nsresult
 IPCDeleteDatabaseHelper::UnpackResponseFromParentProcess(
                                             const ResponseValue& aResponseValue)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return NS_ERROR_FAILURE;
 }
 
 AsyncConnectionHelper::ChildProcessSendResult
 IPCDeleteDatabaseHelper::SendResponseToChildProcess(nsresult aResultCode)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return Error;
 }
 
 nsresult
 IPCDeleteDatabaseHelper::GetSuccessResult(JSContext* aCx, JS::MutableHandle<JS::Value> aVal)
 {
   aVal.setUndefined();
   return NS_OK;
 }
 
 nsresult
 IPCDeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
 {
-  MOZ_NOT_REACHED("Don't call me!");
+  MOZ_CRASH("Don't call me!");
   return NS_ERROR_FAILURE;
 }
--- a/dom/indexedDB/ipc/IndexedDBParent.cpp
+++ b/dom/indexedDB/ipc/IndexedDBParent.cpp
@@ -305,17 +305,17 @@ IndexedDBDatabaseParent::HandleEvent(nsI
       SameCOMIdentity(target, NS_ISUPPORTS_CAST(EventTarget*,
                                                 mOpenRequest))) {
     rv = HandleRequestEvent(aEvent, type);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
-  MOZ_NOT_REACHED("Unexpected message!");
+  MOZ_CRASH("Unexpected message!");
   return NS_ERROR_UNEXPECTED;
 }
 
 void
 IndexedDBDatabaseParent::Disconnect()
 {
   if (mDatabase) {
     mDatabase->DisconnectFromActorParent();
@@ -408,17 +408,17 @@ IndexedDBDatabaseParent::HandleRequestEv
 
   IDBDatabase* databaseConcrete = static_cast<IDBDatabase*>(database.get());
 
   DatabaseInfo* dbInfo = databaseConcrete->Info();
   MOZ_ASSERT(dbInfo);
 
   nsAutoTArray<nsString, 20> objectStoreNames;
   if (!dbInfo->GetObjectStoreNames(objectStoreNames)) {
-    MOZ_NOT_REACHED("This should never fail!");
+    MOZ_CRASH("This should never fail!");
   }
 
   InfallibleTArray<ObjectStoreInfoGuts> objectStoreInfos;
   if (!objectStoreNames.IsEmpty()) {
     uint32_t length = objectStoreNames.Length();
 
     objectStoreInfos.SetCapacity(length);
 
@@ -505,17 +505,17 @@ IndexedDBDatabaseParent::HandleRequestEv
     }
 
     databaseConcrete->SetActor(this);
     mDatabase = databaseConcrete;
 
     return NS_OK;
   }
 
-  MOZ_NOT_REACHED("Unexpected message type!");
+  MOZ_CRASH("Unexpected message type!");
   return NS_ERROR_UNEXPECTED;
 }
 
 nsresult
 IndexedDBDatabaseParent::HandleDatabaseEvent(nsIDOMEvent* aEvent,
                                              const nsAString& aType)
 {
   MOZ_ASSERT(mDatabase);
@@ -551,17 +551,17 @@ IndexedDBDatabaseParent::HandleDatabaseE
 
     if (!SendVersionChange(oldVersion, newVersion)) {
       return NS_ERROR_FAILURE;
     }
 
     return NS_OK;
   }
 
-  MOZ_NOT_REACHED("Unexpected message type!");
+  MOZ_CRASH("Unexpected message type!");
   return NS_ERROR_UNEXPECTED;
 }
 
 void
 IndexedDBDatabaseParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   if (mDatabase) {
     mDatabase->SetActor(static_cast<IndexedDBDatabaseParent*>(NULL));
@@ -775,17 +775,17 @@ IndexedDBTransactionParent::RecvAllReque
   mArtificialRequestCount = false;
 
   return true;
 }
 
 bool
 IndexedDBTransactionParent::RecvDeleteObjectStore(const nsString& aName)
 {
-  MOZ_NOT_REACHED("Should be overridden, don't call me!");
+  MOZ_CRASH("Should be overridden, don't call me!");
   return false;
 }
 
 bool
 IndexedDBTransactionParent::RecvPIndexedDBObjectStoreConstructor(
                                     PIndexedDBObjectStoreParent* aActor,
                                     const ObjectStoreConstructorParams& aParams)
 {
@@ -819,21 +819,21 @@ IndexedDBTransactionParent::RecvPIndexed
     }
 
     objectStore->SetActor(actor);
     return true;
   }
 
   if (aParams.type() ==
       ObjectStoreConstructorParams::TCreateObjectStoreParams) {
-    MOZ_NOT_REACHED("Should be overridden, don't call me!");
+    MOZ_CRASH("Should be overridden, don't call me!");
     return false;
   }
 
-  MOZ_NOT_REACHED("Unknown param type!");
+  MOZ_CRASH("Unknown param type!");
   return false;
 }
 
 PIndexedDBObjectStoreParent*
 IndexedDBTransactionParent::AllocPIndexedDBObjectStore(
                                     const ObjectStoreConstructorParams& aParams)
 {
   return new IndexedDBObjectStoreParent();
@@ -1024,21 +1024,21 @@ IndexedDBCursorParent::RecvPIndexedDBReq
     return actor->Send__delete__(actor, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR);
   }
 
   switch (aParams.type()) {
     case CursorRequestParams::TContinueParams:
       return actor->Continue(aParams.get_ContinueParams());
 
     default:
-      MOZ_NOT_REACHED("Unknown type!");
+      MOZ_CRASH("Unknown type!");
       return false;
   }
 
-  MOZ_NOT_REACHED("Should never get here!");
+  MOZ_CRASH("Should never get here!");
   return false;
 }
 
 PIndexedDBRequestParent*
 IndexedDBCursorParent::AllocPIndexedDBRequest(
                                              const CursorRequestParams& aParams)
 {
   MOZ_ASSERT(mCursor);
@@ -1081,17 +1081,17 @@ IndexedDBObjectStoreParent::ActorDestroy
   if (mObjectStore) {
     mObjectStore->SetActor(static_cast<IndexedDBObjectStoreParent*>(NULL));
   }
 }
 
 bool
 IndexedDBObjectStoreParent::RecvDeleteIndex(const nsString& aName)
 {
-  MOZ_NOT_REACHED("Should be overridden, don't call me!");
+  MOZ_CRASH("Should be overridden, don't call me!");
   return false;
 }
 
 bool
 IndexedDBObjectStoreParent::RecvPIndexedDBRequestConstructor(
                                         PIndexedDBRequestParent* aActor,
                                         const ObjectStoreRequestParams& aParams)
 {
@@ -1134,21 +1134,21 @@ IndexedDBObjectStoreParent::RecvPIndexed
 
     case ObjectStoreRequestParams::TCountParams:
       return actor->Count(aParams.get_CountParams());
 
     case ObjectStoreRequestParams::TOpenCursorParams:
       return actor->OpenCursor(aParams.get_OpenCursorParams());
 
     default:
-      MOZ_NOT_REACHED("Unknown type!");
+      MOZ_CRASH("Unknown type!");
       return false;
   }
 
-  MOZ_NOT_REACHED("Should never get here!");
+  MOZ_CRASH("Should never get here!");
   return false;
 }
 
 bool
 IndexedDBObjectStoreParent::RecvPIndexedDBIndexConstructor(
                                           PIndexedDBIndexParent* aActor,
                                           const IndexConstructorParams& aParams)
 {
@@ -1178,21 +1178,21 @@ IndexedDBObjectStoreParent::RecvPIndexed
       actor->SetIndex(index);
     }
 
     index->SetActor(actor);
     return true;
   }
 
   if (aParams.type() == IndexConstructorParams::TCreateIndexParams) {
-    MOZ_NOT_REACHED("Should be overridden, don't call me!");
+    MOZ_CRASH("Should be overridden, don't call me!");
     return false;
   }
 
-  MOZ_NOT_REACHED("Unknown param type!");
+  MOZ_CRASH("Unknown param type!");
   return false;
 }
 
 PIndexedDBRequestParent*
 IndexedDBObjectStoreParent::AllocPIndexedDBRequest(
                                         const ObjectStoreRequestParams& aParams)
 {
   return new IndexedDBObjectStoreRequestParent(mObjectStore, aParams.type());
@@ -1220,17 +1220,17 @@ IndexedDBObjectStoreParent::DeallocPInde
   delete aActor;
   return true;
 }
 
 PIndexedDBCursorParent*
 IndexedDBObjectStoreParent::AllocPIndexedDBCursor(
                               const ObjectStoreCursorConstructorParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a cursor!");
+  MOZ_CRASH("Caller is supposed to manually construct a cursor!");
   return NULL;
 }
 
 bool
 IndexedDBObjectStoreParent::DeallocPIndexedDBCursor(
                                                  PIndexedDBCursorParent* aActor)
 {
   delete aActor;
@@ -1410,21 +1410,21 @@ IndexedDBIndexParent::RecvPIndexedDBRequ
 
     case IndexRequestParams::TOpenCursorParams:
       return actor->OpenCursor(aParams.get_OpenCursorParams());
 
     case IndexRequestParams::TOpenKeyCursorParams:
       return actor->OpenKeyCursor(aParams.get_OpenKeyCursorParams());
 
     default:
-      MOZ_NOT_REACHED("Unknown type!");
+      MOZ_CRASH("Unknown type!");
       return false;
   }
 
-  MOZ_NOT_REACHED("Should never get here!");
+  MOZ_CRASH("Should never get here!");
   return false;
 }
 
 PIndexedDBRequestParent*
 IndexedDBIndexParent::AllocPIndexedDBRequest(const IndexRequestParams& aParams)
 {
   return new IndexedDBIndexRequestParent(mIndex, aParams.type());
 }
@@ -1435,17 +1435,17 @@ IndexedDBIndexParent::DeallocPIndexedDBR
   delete aActor;
   return true;
 }
 
 PIndexedDBCursorParent*
 IndexedDBIndexParent::AllocPIndexedDBCursor(
                                     const IndexCursorConstructorParams& aParams)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a cursor!");
+  MOZ_CRASH("Caller is supposed to manually construct a cursor!");
   return NULL;
 }
 
 bool
 IndexedDBIndexParent::DeallocPIndexedDBCursor(PIndexedDBCursorParent* aActor)
 {
   delete aActor;
   return true;
@@ -1567,17 +1567,17 @@ IndexedDBObjectStoreRequestParent::GetAl
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_objectstore::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   {
     AutoSetCurrentTransaction asct(mObjectStore->Transaction());
 
     nsresult rv = mObjectStore->GetAllInternal(keyRange, aParams.limit(),
                                                nullptr,
@@ -1707,17 +1707,17 @@ IndexedDBObjectStoreRequestParent::Count
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_objectstore::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   nsRefPtr<IDBRequest> request;
 
   {
     AutoSetCurrentTransaction asct(mObjectStore->Transaction());
 
@@ -1747,17 +1747,17 @@ IndexedDBObjectStoreRequestParent::OpenC
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_objectstore::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   size_t direction = static_cast<size_t>(aParams.direction());
 
   nsRefPtr<IDBRequest> request;
 
   {
@@ -1870,17 +1870,17 @@ IndexedDBIndexRequestParent::GetAll(cons
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_index::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   {
     AutoSetCurrentTransaction asct(mIndex->ObjectStore()->Transaction());
 
     nsresult rv = mIndex->GetAllInternal(keyRange, aParams.limit(), nullptr,
                                          getter_AddRefs(request));
@@ -1910,17 +1910,17 @@ IndexedDBIndexRequestParent::GetAllKeys(
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_index::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   {
     AutoSetCurrentTransaction asct(mIndex->ObjectStore()->Transaction());
 
     nsresult rv = mIndex->GetAllKeysInternal(keyRange, aParams.limit(), nullptr,
                                              getter_AddRefs(request));
@@ -1948,17 +1948,17 @@ IndexedDBIndexRequestParent::Count(const
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_index::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   nsRefPtr<IDBRequest> request;
 
   {
     AutoSetCurrentTransaction asct(mIndex->ObjectStore()->Transaction());
 
@@ -1988,17 +1988,17 @@ IndexedDBIndexRequestParent::OpenCursor(
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_objectstore::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   size_t direction = static_cast<size_t>(aParams.direction());
 
   nsRefPtr<IDBRequest> request;
 
   {
@@ -2030,17 +2030,17 @@ IndexedDBIndexRequestParent::OpenKeyCurs
       keyRange =
         IDBKeyRange::FromSerializedKeyRange(keyRangeUnion.get_KeyRange());
       break;
 
     case ipc::FIXME_Bug_521898_objectstore::OptionalKeyRange::Tvoid_t:
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown param type!");
+      MOZ_CRASH("Unknown param type!");
       return false;
   }
 
   size_t direction = static_cast<size_t>(aParams.direction());
 
   nsRefPtr<IDBRequest> request;
 
   {
@@ -2197,11 +2197,11 @@ IndexedDBDeleteDatabaseRequestParent::Se
  * WeakEventListener
  ******************************************************************************/
 
  NS_IMPL_ISUPPORTS1(WeakEventListenerBase, nsIDOMEventListener)
 
  NS_IMETHODIMP
  WeakEventListenerBase::HandleEvent(nsIDOMEvent* aEvent)
 {
-  MOZ_NOT_REACHED("This must be overridden!");
+  MOZ_CRASH("This must be overridden!");
   return NS_ERROR_FAILURE;
 }
--- a/dom/ipc/Blob.cpp
+++ b/dom/ipc/Blob.cpp
@@ -85,17 +85,17 @@ public:
     }
   }
 
   bool
   Deserialize(const InputStreamParams& aParams)
   {
     // See InputStreamUtils.cpp to see how deserialization of a
     // RemoteInputStream is special-cased.
-    MOZ_NOT_REACHED("RemoteInputStream should never be deserialized");
+    MOZ_CRASH("RemoteInputStream should never be deserialized");
     return false;
   }
 
   void
   SetStream(nsIInputStream* aStream)
   {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(aStream);
@@ -621,17 +621,17 @@ BlobTraits<Parent>::BaseType::NoteRunnab
 
     if (runnable.get() == aRunnable) {
       runnable.Forget();
       mOpenStreamRunnables.RemoveElementAt(index);
       return;
     }
   }
 
-  MOZ_NOT_REACHED("Runnable not in our array!");
+  MOZ_CRASH("Runnable not in our array!");
 }
 
 template <ActorFlavorEnum ActorFlavor>
 struct RemoteBlobBase;
 
 template <>
 struct RemoteBlobBase<Parent>
 {
@@ -1074,17 +1074,17 @@ Blob<ActorFlavor>::Create(const Construc
         source->Slice(params.begin(), params.end(), params.contentType(), 3,
                       getter_AddRefs(slice));
       NS_ENSURE_SUCCESS(rv, nullptr);
 
       return new Blob<ActorFlavor>(slice);
     }
 
     default:
-      MOZ_NOT_REACHED("Unknown params!");
+      MOZ_CRASH("Unknown params!");
   }
 
   return nullptr;
 }
 
 template <ActorFlavorEnum ActorFlavor>
 already_AddRefed<nsIDOMBlob>
 Blob<ActorFlavor>::GetBlob()
@@ -1180,23 +1180,23 @@ Blob<ActorFlavor>::CreateRemoteBlob(cons
     }
 
     case ChildBlobConstructorParams::TMysteryBlobConstructorParams: {
       remoteBlob = new RemoteBlobType();
       break;
     }
 
     default:
-      MOZ_NOT_REACHED("Unknown params!");
+      MOZ_CRASH("Unknown params!");
   }
 
   MOZ_ASSERT(remoteBlob);
 
   if (NS_FAILED(remoteBlob->SetMutable(false))) {
-    MOZ_NOT_REACHED("Failed to make remote blob immutable!");
+    MOZ_CRASH("Failed to make remote blob immutable!");
   }
 
   return remoteBlob.forget();
 }
 
 template <ActorFlavorEnum ActorFlavor>
 void
 Blob<ActorFlavor>::NoteDyingRemoteBlob()
@@ -1273,17 +1273,17 @@ Blob<ActorFlavor>::RecvResolveMystery(co
       const FileBlobConstructorParams& params =
         aParams.get_FileBlobConstructorParams();
       blob->SetLazyData(params.name(), params.contentType(),
                         params.length(), params.modDate());
       break;
     }
 
     default:
-      MOZ_NOT_REACHED("Unknown params!");
+      MOZ_CRASH("Unknown params!");
   }
 
   return true;
 }
 
 template <>
 bool
 Blob<Parent>::RecvPBlobStreamConstructor(StreamType* aActor)
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -841,41 +841,41 @@ ContentChild::DeallocPStorage(PStorageCh
     child->ReleaseIPDLReference();
     return true;
 }
 
 PBluetoothChild*
 ContentChild::AllocPBluetooth()
 {
 #ifdef MOZ_B2G_BT
-    MOZ_NOT_REACHED("No one should be allocating PBluetoothChild actors");
+    MOZ_CRASH("No one should be allocating PBluetoothChild actors");
     return nullptr;
 #else
-    MOZ_NOT_REACHED("No support for bluetooth on this platform!");
+    MOZ_CRASH("No support for bluetooth on this platform!");
     return nullptr;
 #endif
 }
 
 bool
 ContentChild::DeallocPBluetooth(PBluetoothChild* aActor)
 {
 #ifdef MOZ_B2G_BT
     delete aActor;
     return true;
 #else
-    MOZ_NOT_REACHED("No support for bluetooth on this platform!");
+    MOZ_CRASH("No support for bluetooth on this platform!");
     return false;
 #endif
 }
 
 PSpeechSynthesisChild*
 ContentChild::AllocPSpeechSynthesis()
 {
 #ifdef MOZ_WEBSPEECH
-    MOZ_NOT_REACHED("No one should be allocating PSpeechSynthesisChild actors");
+    MOZ_CRASH("No one should be allocating PSpeechSynthesisChild actors");
     return nullptr;
 #else
     return nullptr;
 #endif
 }
 
 bool
 ContentChild::DeallocPSpeechSynthesis(PSpeechSynthesisChild* aActor)
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1987,43 +1987,43 @@ PBluetoothParent*
 ContentParent::AllocPBluetooth()
 {
 #ifdef MOZ_B2G_BT
     if (!AssertAppProcessPermission(this, "bluetooth")) {
         return nullptr;
     }
     return new mozilla::dom::bluetooth::BluetoothParent();
 #else
-    MOZ_NOT_REACHED("No support for bluetooth on this platform!");
+    MOZ_CRASH("No support for bluetooth on this platform!");
     return nullptr;
 #endif
 }
 
 bool
 ContentParent::DeallocPBluetooth(PBluetoothParent* aActor)
 {
 #ifdef MOZ_B2G_BT
     delete aActor;
     return true;
 #else
-    MOZ_NOT_REACHED("No support for bluetooth on this platform!");
+    MOZ_CRASH("No support for bluetooth on this platform!");
     return false;
 #endif
 }
 
 bool
 ContentParent::RecvPBluetoothConstructor(PBluetoothParent* aActor)
 {
 #ifdef MOZ_B2G_BT
     nsRefPtr<BluetoothService> btService = BluetoothService::Get();
     NS_ENSURE_TRUE(btService, false);
 
     return static_cast<BluetoothParent*>(aActor)->InitWithService(btService);
 #else
-    MOZ_NOT_REACHED("No support for bluetooth on this platform!");
+    MOZ_CRASH("No support for bluetooth on this platform!");
     return false;
 #endif
 }
 
 PSpeechSynthesisParent*
 ContentParent::AllocPSpeechSynthesis()
 {
 #ifdef MOZ_WEBSPEECH
--- a/dom/ipc/StructuredCloneUtils.cpp
+++ b/dom/ipc/StructuredCloneUtils.cpp
@@ -44,17 +44,17 @@ Read(JSContext* aCx, JSStructuredCloneRe
     MOZ_ASSERT(file);
 
 #ifdef DEBUG
     {
       // File should not be mutable.
       nsCOMPtr<nsIMutable> mutableFile = do_QueryInterface(file);
       bool isMutable;
       if (NS_FAILED(mutableFile->GetMutable(&isMutable))) {
-        MOZ_NOT_REACHED("GetMutable failed!");
+        MOZ_CRASH("GetMutable failed!");
       }
       else {
         MOZ_ASSERT(!isMutable);
       }
     }
 #endif
 
     JS::Rooted<JS::Value> wrappedFile(aCx);
@@ -77,17 +77,17 @@ Read(JSContext* aCx, JSStructuredCloneRe
     MOZ_ASSERT(blob);
 
 #ifdef DEBUG
     {
       // Blob should not be mutable.
       nsCOMPtr<nsIMutable> mutableBlob = do_QueryInterface(blob);
       bool isMutable;
       if (NS_FAILED(mutableBlob->GetMutable(&isMutable))) {
-        MOZ_NOT_REACHED("GetMutable failed!");
+        MOZ_CRASH("GetMutable failed!");
       }
       else {
         MOZ_ASSERT(!isMutable);
       }
     }
 #endif
 
     JS::Rooted<JS::Value> wrappedBlob(aCx);
--- a/dom/mobilemessage/src/MmsMessage.cpp
+++ b/dom/mobilemessage/src/MmsMessage.cpp
@@ -361,17 +361,17 @@ MmsMessage::GetDelivery(nsAString& aDeli
       aDelivery = DELIVERY_ERROR;
       break;
     case eDeliveryState_NotDownloaded:
       aDelivery = DELIVERY_NOT_DOWNLOADED;
       break;
     case eDeliveryState_Unknown:
     case eDeliveryState_EndGuard:
     default:
-      MOZ_NOT_REACHED("We shouldn't get any other delivery state!");
+      MOZ_CRASH("We shouldn't get any other delivery state!");
       return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MmsMessage::GetDeliveryStatus(JSContext* aCx, JS::Value* aDeliveryStatus)
@@ -404,17 +404,17 @@ MmsMessage::GetDeliveryStatus(JSContext*
       case eDeliveryStatus_Reject:
         statusStr = DELIVERY_STATUS_REJECTED;
         break;
       case eDeliveryStatus_Manual:
         statusStr = DELIVERY_STATUS_MANUAL;
         break;
       case eDeliveryStatus_EndGuard:
       default:
-        MOZ_NOT_REACHED("We shouldn't get any other delivery status!");
+        MOZ_CRASH("We shouldn't get any other delivery status!");
         return NS_ERROR_UNEXPECTED;
     }
     tempStrArray.AppendElement(statusStr);
   }
 
   JS::Rooted<JSObject*> deliveryStatusObj(aCx);
   nsresult rv = nsTArrayToJSArray(aCx, tempStrArray, deliveryStatusObj.address());
   NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/mobilemessage/src/MobileMessageCallback.cpp
+++ b/dom/mobilemessage/src/MobileMessageCallback.cpp
@@ -87,17 +87,17 @@ MobileMessageCallback::NotifyError(int32
       break;
     case nsIMobileMessageCallback::NO_SIM_CARD_ERROR:
       mDOMRequest->FireError(NS_LITERAL_STRING("NoSimCardError"));
       break;
     case nsIMobileMessageCallback::RADIO_DISABLED_ERROR:
       mDOMRequest->FireError(NS_LITERAL_STRING("RadioDisabledError"));
       break;
     default: // SUCCESS_NO_ERROR is handled above.
-      MOZ_NOT_REACHED("Should never get here!");
+      MOZ_CRASH("Should never get here!");
       return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageCallback::NotifyMessageSent(nsISupports *aMessage)
--- a/dom/mobilemessage/src/MobileMessageCursorCallback.cpp
+++ b/dom/mobilemessage/src/MobileMessageCursorCallback.cpp
@@ -43,17 +43,17 @@ MobileMessageCursorCallback::NotifyCurso
       break;
     case nsIMobileMessageCallback::UNKNOWN_ERROR:
       cursor->FireError(NS_LITERAL_STRING("UnknownError"));
       break;
     case nsIMobileMessageCallback::INTERNAL_ERROR:
       cursor->FireError(NS_LITERAL_STRING("InternalError"));
       break;
     default: // SUCCESS_NO_ERROR is handled above.
-      MOZ_NOT_REACHED("Should never get here!");
+      MOZ_CRASH("Should never get here!");
       return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageCursorCallback::NotifyCursorResult(nsISupports* aResult)
--- a/dom/mobilemessage/src/MobileMessageThread.cpp
+++ b/dom/mobilemessage/src/MobileMessageThread.cpp
@@ -181,17 +181,17 @@ MobileMessageThread::GetLastMessageType(
     case eMessageType_SMS:
       aLastMessageType = MESSAGE_TYPE_SMS;
       break;
     case eMessageType_MMS:
       aLastMessageType = MESSAGE_TYPE_MMS;
       break;
     case eMessageType_EndGuard:
     default:
-      MOZ_NOT_REACHED("We shouldn't get any other message type!");
+      MOZ_CRASH("We shouldn't get any other message type!");
       return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/mobilemessage/src/SmsMessage.cpp
+++ b/dom/mobilemessage/src/SmsMessage.cpp
@@ -173,17 +173,17 @@ SmsMessage::GetDelivery(nsAString& aDeli
       aDelivery = DELIVERY_SENT;
       break;
     case eDeliveryState_Error:
       aDelivery = DELIVERY_ERROR;
       break;
     case eDeliveryState_Unknown:
     case eDeliveryState_EndGuard:
     default:
-      MOZ_NOT_REACHED("We shouldn't get any other delivery state!");
+      MOZ_CRASH("We shouldn't get any other delivery state!");
       return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsMessage::GetDeliveryStatus(nsAString& aDeliveryStatus)
@@ -198,17 +198,17 @@ SmsMessage::GetDeliveryStatus(nsAString&
     case eDeliveryStatus_Pending:
       aDeliveryStatus = DELIVERY_STATUS_PENDING;
       break;
     case eDeliveryStatus_Error:
       aDeliveryStatus = DELIVERY_STATUS_ERROR;
       break;
     case eDeliveryStatus_EndGuard:
     default:
-      MOZ_NOT_REACHED("We shouldn't get any other delivery status!");
+      MOZ_CRASH("We shouldn't get any other delivery status!");
       return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsMessage::GetSender(nsAString& aSender)
@@ -246,17 +246,17 @@ SmsMessage::GetMessageClass(nsAString& a
       break;
     case eMessageClass_Class2:
       aMessageClass = MESSAGE_CLASS_CLASS_2;
       break;
     case eMessageClass_Class3:
       aMessageClass = MESSAGE_CLASS_CLASS_3;
       break;
     default:
-      MOZ_NOT_REACHED("We shouldn't get any other message class!");
+      MOZ_CRASH("We shouldn't get any other message class!");
       return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 SmsMessage::GetTimestamp(JSContext* cx, JS::Value* aDate)
--- a/dom/mobilemessage/src/ipc/SmsChild.cpp
+++ b/dom/mobilemessage/src/ipc/SmsChild.cpp
@@ -25,17 +25,17 @@ CreateMessageFromMessageData(const Mobil
   switch(aData. type()) {
     case MobileMessageData::TMmsMessageData:
       message = new MmsMessage(aData.get_MmsMessageData());
       break;
     case MobileMessageData::TSmsMessageData:
       message = new SmsMessage(aData.get_SmsMessageData());
       break;
     default:
-      MOZ_NOT_REACHED("Unexpected type of MobileMessageData");
+      MOZ_CRASH("Unexpected type of MobileMessageData");
       return nullptr;
   }
 
   return message.forget();
 }
 
 void
 NotifyObserversWithMobileMessage(const char* aEventName,
@@ -108,31 +108,31 @@ SmsChild::RecvNotifyDeliveryErrorMessage
 {
   NotifyObserversWithMobileMessage(kSmsDeliveryErrorObserverTopic, aData);
   return true;
 }
 
 PSmsRequestChild*
 SmsChild::AllocPSmsRequest(const IPCSmsRequest& aRequest)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a request!");
+  MOZ_CRASH("Caller is supposed to manually construct a request!");
   return nullptr;
 }
 
 bool
 SmsChild::DeallocPSmsRequest(PSmsRequestChild* aActor)
 {
   delete aActor;
   return true;
 }
 
 PMobileMessageCursorChild*
 SmsChild::AllocPMobileMessageCursor(const IPCMobileMessageCursor& aCursor)
 {
-  MOZ_NOT_REACHED("Caller is supposed to manually construct a cursor!");
+  MOZ_CRASH("Caller is supposed to manually construct a cursor!");
   return nullptr;
 }
 
 bool
 SmsChild::DeallocPMobileMessageCursor(PMobileMessageCursorChild* aActor)
 {
   // MobileMessageCursorChild is refcounted, must not be freed manually.
   // Originally AddRefed in SendCursorRequest() in SmsIPCService.cpp.
@@ -195,17 +195,17 @@ SmsRequestChild::Recv__delete__(const Me
       break;
     case MessageReply::TReplyMarkeMessageRead:
       mReplyRequest->NotifyMessageMarkedRead(aReply.get_ReplyMarkeMessageRead().read());
       break;
     case MessageReply::TReplyMarkeMessageReadFail:
       mReplyRequest->NotifyMarkMessageReadFailed(aReply.get_ReplyMarkeMessageReadFail().error());
       break;
     default:
-      MOZ_NOT_REACHED("Received invalid response parameters!");
+      MOZ_CRASH("Received invalid response parameters!");
       return false;
   }
 
   return true;
 }
 
 /*******************************************************************************
  * MobileMessageCursorChild
@@ -238,17 +238,17 @@ MobileMessageCursorChild::RecvNotifyResu
       break;
     case MobileMessageCursorData::TSmsMessageData:
       result = new SmsMessage(aData.get_SmsMessageData());
       break;
     case MobileMessageCursorData::TThreadData:
       result = new MobileMessageThread(aData.get_ThreadData());
       break;
     default:
-      MOZ_NOT_REACHED("Received invalid response parameters!");
+      MOZ_CRASH("Received invalid response parameters!");
       return false;
   }
 
   mCursorCallback->NotifyCursorResult(result);
   return true;
 }
 
 bool
--- a/dom/mobilemessage/src/ipc/SmsParent.cpp
+++ b/dom/mobilemessage/src/ipc/SmsParent.cpp
@@ -333,17 +333,17 @@ SmsParent::RecvPSmsRequestConstructor(PS
       return actor->DoRequest(aRequest.get_RetrieveMessageRequest());
     case IPCSmsRequest::TGetMessageRequest:
       return actor->DoRequest(aRequest.get_GetMessageRequest());
     case IPCSmsRequest::TDeleteMessageRequest:
       return actor->DoRequest(aRequest.get_DeleteMessageRequest());
     case IPCSmsRequest::TMarkMessageReadRequest:
       return actor->DoRequest(aRequest.get_MarkMessageReadRequest());
     default:
-      MOZ_NOT_REACHED("Unknown type!");
+      MOZ_CRASH("Unknown type!");
       break;
   }
 
   return false;
 }
 
 PSmsRequestParent*
 SmsParent::AllocPSmsRequest(const IPCSmsRequest& aRequest)
@@ -372,17 +372,17 @@ SmsParent::RecvPMobileMessageCursorConst
     static_cast<MobileMessageCursorParent*>(aActor);
 
   switch (aRequest.type()) {
     case IPCMobileMessageCursor::TCreateMessageCursorRequest:
       return actor->DoRequest(aRequest.get_CreateMessageCursorRequest());
     case IPCMobileMessageCursor::TCreateThreadCursorRequest:
       return actor->DoRequest(aRequest.get_CreateThreadCursorRequest());
     default:
-      MOZ_NOT_REACHED("Unknown type!");
+      MOZ_CRASH("Unknown type!");
       break;
   }
 
   return false;
 }
 
 PMobileMessageCursorParent*
 SmsParent::AllocPMobileMessageCursor(const IPCMobileMessageCursor& aRequest)
@@ -439,17 +439,17 @@ SmsRequestParent::DoRequest(const SendMe
               params.address())) {
         NS_WARNING("SmsRequestParent: Fail to build MMS params.");
         return true;
       }
       mmsService->Send(params, this);
     }
     break;
   default:
-    MOZ_NOT_REACHED("Unknown type of SendMessageRequest!");
+    MOZ_CRASH("Unknown type of SendMessageRequest!");
     return false;
   }
   return true;
 }
 
 bool
 SmsRequestParent::DoRequest(const RetrieveMessageRequest& aRequest)
 {
@@ -735,17 +735,17 @@ MobileMessageCursorParent::NotifyCursorR
 
   nsCOMPtr<nsIDOMMozMobileMessageThread> iThread = do_QueryInterface(aResult);
   if (iThread) {
     MobileMessageThread* thread = static_cast<MobileMessageThread*>(aResult);
     return SendNotifyResult(MobileMessageCursorData(thread->GetData()))
       ? NS_OK : NS_ERROR_FAILURE;
   }
 
-  MOZ_NOT_REACHED("Received invalid response parameters!");
+  MOZ_CRASH("Received invalid response parameters!");
   return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
 MobileMessageCursorParent::NotifyCursorDone()
 {
   return NotifyCursorError(nsIMobileMessageCallback::SUCCESS_NO_ERROR);
 }
--- a/dom/network/src/TCPSocketChild.cpp
+++ b/dom/network/src/TCPSocketChild.cpp
@@ -140,21 +140,21 @@ TCPSocketChild::RecvCallback(const nsStr
       bool ok = IPC::DeserializeArrayBuffer(socket, data.get_ArrayOfuint8_t(), &val);
       NS_ENSURE_TRUE(ok, true);
       rv = mSocket->CallListenerArrayBuffer(aType, val);
 
     } else if (data.type() == SendableData::TnsString) {
       rv = mSocket->CallListenerData(aType, data.get_nsString());
 
     } else {
-      MOZ_NOT_REACHED("Invalid callback data type!");
+      MOZ_CRASH("Invalid callback data type!");
     }
 
   } else {
-    MOZ_NOT_REACHED("Invalid callback type!");
+    MOZ_CRASH("Invalid callback type!");
   }
   NS_ENSURE_SUCCESS(rv, true);
   return true;
 }
 
 NS_IMETHODIMP
 TCPSocketChild::Suspend()
 {
--- a/dom/network/src/TCPSocketParent.cpp
+++ b/dom/network/src/TCPSocketParent.cpp
@@ -107,17 +107,17 @@ TCPSocketParent::RecvData(const Sendable
     }
 
     case SendableData::TnsString:
       rv = mIntermediary->SendString(aData.get_nsString());
       NS_ENSURE_SUCCESS(rv, true);
       break;
 
     default:
-      MOZ_NOT_REACHED("unexpected SendableData type");
+      MOZ_CRASH("unexpected SendableData type");
       return false;
   }
   return true;
 }
 
 bool
 TCPSocketParent::RecvClose()
 {
--- a/dom/power/PowerManagerService.cpp
+++ b/dom/power/PowerManagerService.cpp
@@ -114,28 +114,28 @@ PowerManagerService::SyncProfile()
 
 NS_IMETHODIMP
 PowerManagerService::Reboot()
 {
   StartForceQuitWatchdog(eHalShutdownMode_Reboot, mWatchdogTimeoutSecs);
   // To synchronize any unsaved user data before rebooting.
   SyncProfile();
   hal::Reboot();
-  MOZ_NOT_REACHED("hal::Reboot() shouldn't return");
+  MOZ_CRASH("hal::Reboot() shouldn't return");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PowerManagerService::PowerOff()
 {
   StartForceQuitWatchdog(eHalShutdownMode_PowerOff, mWatchdogTimeoutSecs);
   // To synchronize any unsaved user data before powering off.
   SyncProfile();
   hal::PowerOff();
-  MOZ_NOT_REACHED("hal::PowerOff() shouldn't return");
+  MOZ_CRASH("hal::PowerOff() shouldn't return");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PowerManagerService::Restart()
 {
   // FIXME/bug 796826 this implementation is currently gonk-specific,
   // because it relies on the Gonk to initialize the Gecko processes to
@@ -148,17 +148,17 @@ PowerManagerService::Restart()
   ContentParent::JoinAllSubprocesses();
 
   // To synchronize any unsaved user data before restarting.
   SyncProfile();
 #ifdef XP_UNIX
   sync();
 #endif
   _exit(0);
-  MOZ_NOT_REACHED("_exit() shouldn't return");
+  MOZ_CRASH("_exit() shouldn't return");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 PowerManagerService::AddWakeLockListener(nsIDOMMozWakeLockListener *aListener)
 {
   if (mWakeLockListeners.Contains(aListener))
     return NS_OK;
--- a/dom/src/notification/Notification.cpp
+++ b/dom/src/notification/Notification.cpp
@@ -249,17 +249,17 @@ NS_IMETHODIMP
 NotificationTask::Run()
 {
   switch (mAction) {
   case eShow:
     return mNotification->ShowInternal();
   case eClose:
     return mNotification->CloseInternal();
   default:
-    MOZ_NOT_REACHED("Unexpected action for NotificationTask.");
+    MOZ_CRASH("Unexpected action for NotificationTask.");
   }
 }
 
 NS_IMPL_ISUPPORTS1(NotificationObserver, nsIObserver)
 
 NS_IMETHODIMP
 NotificationObserver::Observe(nsISupports* aSubject, const char* aTopic,
                               const PRUnichar* aData)
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -744,17 +744,17 @@ CTypesActivityCallback(JSContext* aCx,
       worker->BeginCTypesCallback();
       break;
 
     case js::CTYPES_CALLBACK_END:
       worker->EndCTypesCallback();
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown type flag!");
+      MOZ_CRASH("Unknown type flag!");
   }
 }
 
 JSContext*
 CreateJSContextForWorker(WorkerPrivate* aWorkerPrivate)
 {
   aWorkerPrivate->AssertIsOnWorkerThread();
   NS_ASSERTION(!aWorkerPrivate->GetJSContext(), "Already has a context!");
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -258,17 +258,17 @@ ConvertStringToResponseType(const nsAStr
     mozilla::dom::XMLHttpRequestResponseTypeValues;
 
   for (size_t index = 0; index < ArrayLength(strings) - 1; index++) {
     if (aString.EqualsASCII(strings[index].value, strings[index].length)) {
       return static_cast<XMLHttpRequestResponseType>(index);
     }
   }
 
-  MOZ_NOT_REACHED("Don't know anything about this response type!");
+  MOZ_CRASH("Don't know anything about this response type!");
   return XMLHttpRequestResponseType::_empty;
 }
 
 enum
 {
   STRING_abort = 0,
   STRING_error,
   STRING_load,
--- a/editor/libeditor/base/nsEditorCommands.cpp
+++ b/editor/libeditor/base/nsEditorCommands.cpp
@@ -585,17 +585,17 @@ nsDeleteCommand::DoCommand(const char* a
     deleteDir = nsIEditor::ePreviousWord;
   } else if (!nsCRT::strcmp("cmd_deleteWordForward", aCommandName)) {
     deleteDir = nsIEditor::eNextWord;
   } else if (!nsCRT::strcmp("cmd_deleteToBeginningOfLine", aCommandName)) {
     deleteDir = nsIEditor::eToBeginningOfLine;
   } else if (!nsCRT::strcmp("cmd_deleteToEndOfLine", aCommandName)) {
     deleteDir = nsIEditor::eToEndOfLine;
   } else {
-    MOZ_NOT_REACHED("Unrecognized nsDeleteCommand");
+    MOZ_CRASH("Unrecognized nsDeleteCommand");
   }
 
   return editor->DeleteSelection(deleteDir, nsIEditor::eStrip);
 }
 
 NS_IMETHODIMP 
 nsDeleteCommand::DoCommandParams(const char *aCommandName,
                                  nsICommandParams *aParams,
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -283,17 +283,17 @@ NS_IMPL_ISUPPORTS1(DeleteFromMozHostList
 DeleteFromMozHostListener::
 DeleteFromMozHostListener(nsPermissionManager* aManager)
   : mManager(aManager)
 {
 }
 
 NS_IMETHODIMP DeleteFromMozHostListener::HandleResult(mozIStorageResultSet *)
 {
-  MOZ_NOT_REACHED("Should not get any results");
+  MOZ_CRASH("Should not get any results");
   return NS_OK;
 }
 
 NS_IMETHODIMP DeleteFromMozHostListener::HandleError(mozIStorageError *)
 {
   // Errors are handled in |HandleCompletion|
   return NS_OK;
 }
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1733,17 +1733,17 @@ GLContext::ReadPixelsIntoImageSurface(gf
 
         case gfxASurface::ImageFormatRGB16_565:
             destPixelSize = 2;
             destFormat = LOCAL_GL_RGB;
             destType = LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV;
             break;
 
         default:
-            MOZ_NOT_REACHED("Bad format.");
+            MOZ_CRASH("Bad format.");
             return;
     }
     MOZ_ASSERT(dest->Stride() == dest->Width() * destPixelSize);
 
     GLenum readFormat = destFormat;
     GLenum readType = destType;
     bool needsTempSurf = !GetActualReadFormats(this,
                                                destFormat, destType,
@@ -1767,17 +1767,17 @@ GLContext::ReadPixelsIntoImageSurface(gf
             }
             case LOCAL_GL_RGB: {
                 MOZ_ASSERT(readPixelSize == 2);
                 MOZ_ASSERT(readType == LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV);
                 readFormatGFX = gfxASurface::ImageFormatRGB16_565;
                 break;
             }
             default: {
-                MOZ_NOT_REACHED("Bad read format.");
+                MOZ_CRASH("Bad read format.");
                 return;
             }
         }
 
         switch (readType) {
             case LOCAL_GL_UNSIGNED_BYTE: {
                 MOZ_ASSERT(readFormat == LOCAL_GL_RGBA);
                 readPixelSize = 4;
@@ -1789,17 +1789,17 @@ GLContext::ReadPixelsIntoImageSurface(gf
                 break;
             }
             case LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV: {
                 MOZ_ASSERT(readFormat == LOCAL_GL_RGB);
                 readPixelSize = 2;
                 break;
             }
             default: {
-                MOZ_NOT_REACHED("Bad read type.");
+                MOZ_CRASH("Bad read type.");
                 return;
             }
         }
 
         tempSurf = new gfxImageSurface(dest->GetSize(), readFormatGFX, false);
         readSurf = tempSurf;
     } else {
         readPixelSize = destPixelSize;
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -245,17 +245,17 @@ public:
             mOwningThread->Dispatch(event, NS_DISPATCH_NORMAL);
         }
     }
 
     virtual EGLContext GetEGLContext() { return nullptr; }
     virtual GLLibraryEGL* GetLibraryEGL() { return nullptr; }
 
     virtual void MakeCurrent_EGLSurface(void* surf) {
-        MOZ_NOT_REACHED("Must be called against a GLContextEGL.");
+        MOZ_CRASH("Must be called against a GLContextEGL.");
     }
 
     /**
      * If this context is double-buffered, returns TRUE.
      */
     virtual bool IsDoubleBuffered() { return false; }
 
     /**
--- a/gfx/gl/GLContextProviderGLX.cpp
+++ b/gfx/gl/GLContextProviderGLX.cpp
@@ -102,17 +102,17 @@ GLXLibrary::EnsureInitialized(LibType li
             // which trigger glibc bug http://sourceware.org/bugzilla/show_bug.cgi?id=12225
 #ifdef __OpenBSD__
             libGLfilename = "libGL.so";
 #else
             libGLfilename = "libGL.so.1";
 #endif
             break;
         default:
-            MOZ_NOT_REACHED("Invalid GLX library type.");
+            MOZ_CRASH("Invalid GLX library type.");
             return false;
         }
 
         ScopedGfxFeatureReporter reporter(libGLfilename, forceFeatureReport);
         mOGLLibrary = PR_LoadLibrary(libGLfilename);
         if (!mOGLLibrary) {
             NS_WARNING("Couldn't load OpenGL shared library.");
             return false;
--- a/gfx/gl/GLScreenBuffer.cpp
+++ b/gfx/gl/GLScreenBuffer.cpp
@@ -91,17 +91,17 @@ GLScreenBuffer::BindAsFramebuffer(GLCont
         if (!gl->HasExt_FramebufferBlit())
             NS_WARNING("READ_FRAMEBUFFER requested but unavailable.");
 
         gl->raw_fBindFramebuffer(LOCAL_GL_READ_FRAMEBUFFER_EXT, readFB);
         break;
 
     default:
         // In case we got a bad target.
-        MOZ_NOT_REACHED("Bad `target` for BindFramebuffer.");
+        MOZ_CRASH("Bad `target` for BindFramebuffer.");
         gl->raw_fBindFramebuffer(target, 0);
         break;
     }
 }
 
 void
 GLScreenBuffer::BindFB(GLuint fb)
 {
@@ -572,17 +572,17 @@ ReadBuffer::Create(GLContext* gl,
     switch (surf->AttachType()) {
     case AttachmentType::GLTexture:
         colorTex = surf->Texture();
         break;
     case AttachmentType::GLRenderbuffer:
         colorRB = surf->Renderbuffer();
         break;
     default:
-        MOZ_NOT_REACHED("Unknown attachment type?");
+        MOZ_CRASH("Unknown attachment type?");
         return nullptr;
     }
     MOZ_ASSERT(colorTex || colorRB);
 
     GLuint fb = 0;
     gl->fGenFramebuffers(1, &fb);
     gl->AttachBuffersToFB(colorTex, colorRB, depthRB, stencilRB, fb);
 
@@ -622,17 +622,17 @@ ReadBuffer::Attach(SharedSurface_GL* sur
         switch (surf->AttachType()) {
         case AttachmentType::GLTexture:
             colorTex = surf->Texture();
             break;
         case AttachmentType::GLRenderbuffer:
             colorRB = surf->Renderbuffer();
             break;
         default:
-            MOZ_NOT_REACHED("Unknown attachment type?");
+            MOZ_CRASH("Unknown attachment type?");
             return;
         }
 
         mGL->AttachBuffersToFB(colorTex, colorRB, 0, 0, mFB);
         MOZ_ASSERT(mGL->IsFramebufferComplete(mFB));
     }
 
     mSurf = surf;
--- a/gfx/gl/SharedSurface.h
+++ b/gfx/gl/SharedSurface.h
@@ -100,23 +100,23 @@ public:
     bool HasAlpha() const {
         return mHasAlpha;
     }
 
 
     // For use when AttachType is correct.
     virtual GLuint Texture() const {
         MOZ_ASSERT(AttachType() == AttachmentType::GLTexture);
-        MOZ_NOT_REACHED("Did you forget to override this function?");
+        MOZ_CRASH("Did you forget to override this function?");
         return 0;
     }
 
     virtual GLuint Renderbuffer() const {
         MOZ_ASSERT(AttachType() == AttachmentType::GLRenderbuffer);
-        MOZ_NOT_REACHED("Did you forget to override this function?");
+        MOZ_CRASH("Did you forget to override this function?");
         return 0;
     }
 };
 
 } /* namespace gfx */
 } /* namespace mozilla */
 
 #endif /* SHARED_SURFACE_H_ */
--- a/gfx/gl/SharedSurfaceGL.cpp
+++ b/gfx/gl/SharedSurfaceGL.cpp
@@ -56,17 +56,17 @@ SharedSurface_GL::Copy(SharedSurface_GL*
             gl->BlitFramebufferToTexture(0, destTex, src->Size(), dest->Size());
         } else if (dest->AttachType() == AttachmentType::GLRenderbuffer) {
             GLuint destRB = dest->Renderbuffer();
             ScopedFramebufferForRenderbuffer destWrapper(gl, destRB);
 
             gl->BlitFramebufferToFramebuffer(0, destWrapper.FB(),
                                              src->Size(), dest->Size());
         } else {
-            MOZ_NOT_REACHED("Unhandled dest->AttachType().");
+            MOZ_CRASH("Unhandled dest->AttachType().");
             return;
         }
 
         if (srcNeedsUnlock)
             src->UnlockProd();
 
         if (origNeedsRelock)
             origLocked->LockProd();
@@ -94,17 +94,17 @@ SharedSurface_GL::Copy(SharedSurface_GL*
             gl->BlitTextureToFramebuffer(srcTex, 0, src->Size(), dest->Size());
         } else if (src->AttachType() == AttachmentType::GLRenderbuffer) {
             GLuint srcRB = src->Renderbuffer();
             ScopedFramebufferForRenderbuffer srcWrapper(gl, srcRB);
 
             gl->BlitFramebufferToFramebuffer(srcWrapper.FB(), 0,
                                              src->Size(), dest->Size());
         } else {
-            MOZ_NOT_REACHED("Unhandled src->AttachType().");
+            MOZ_CRASH("Unhandled src->AttachType().");
             return;
         }
 
         if (destNeedsUnlock)
             dest->UnlockProd();
 
         if (origNeedsRelock)
             origLocked->LockProd();
@@ -132,17 +132,17 @@ SharedSurface_GL::Copy(SharedSurface_GL*
             ScopedFramebufferForRenderbuffer destWrapper(gl, destRB);
 
             gl->BlitTextureToFramebuffer(srcTex, destWrapper.FB(),
                                          src->Size(), dest->Size());
 
             return;
         }
 
-        MOZ_NOT_REACHED("Unhandled dest->AttachType().");
+        MOZ_CRASH("Unhandled dest->AttachType().");
         return;
     }
 
     if (src->AttachType() == AttachmentType::GLRenderbuffer) {
         GLuint srcRB = src->Renderbuffer();
         ScopedFramebufferForRenderbuffer srcWrapper(gl, srcRB);
 
         if (dest->AttachType() == AttachmentType::GLTexture) {
@@ -159,21 +159,21 @@ SharedSurface_GL::Copy(SharedSurface_GL*
             ScopedFramebufferForRenderbuffer destWrapper(gl, destRB);
 
             gl->BlitFramebufferToFramebuffer(srcWrapper.FB(), destWrapper.FB(),
                                              src->Size(), dest->Size());
 
             return;
         }
 
-        MOZ_NOT_REACHED("Unhandled dest->AttachType().");
+        MOZ_CRASH("Unhandled dest->AttachType().");
         return;
     }
 
-    MOZ_NOT_REACHED("Unhandled src->AttachType().");
+    MOZ_CRASH("Unhandled src->AttachType().");
     return;
 }
 
 void
 SharedSurface_GL::LockProd()
 {
     MOZ_ASSERT(!mIsLocked);
 
@@ -259,17 +259,17 @@ SharedSurface_Basic::Create(GLContext* g
         else
             format = gfxASurface::ImageFormatRGB24;
         break;
     case LOCAL_GL_RGBA:
     case LOCAL_GL_RGBA8:
         format = gfxASurface::ImageFormatARGB32;
         break;
     default:
-        MOZ_NOT_REACHED("Unhandled Tex format.");
+        MOZ_CRASH("Unhandled Tex format.");
         return nullptr;
     }
     return new SharedSurface_Basic(gl, size, hasAlpha, format, tex);
 }
 
 SharedSurface_Basic::SharedSurface_Basic(GLContext* gl,
                                          const gfxIntSize& size,
                                          bool hasAlpha,
--- a/gfx/gl/SurfaceStream.cpp
+++ b/gfx/gl/SurfaceStream.cpp
@@ -38,17 +38,17 @@ SurfaceStream::CreateForType(SurfaceStre
             return new SurfaceStream_SingleBuffer(prevStream);
         case SurfaceStreamType::TripleBuffer_Copy:
             return new SurfaceStream_TripleBuffer_Copy(prevStream);
         case SurfaceStreamType::TripleBuffer_Async:
             return new SurfaceStream_TripleBuffer_Async(prevStream);
         case SurfaceStreamType::TripleBuffer:
             return new SurfaceStream_TripleBuffer(prevStream);
         default:
-            MOZ_NOT_REACHED("Invalid Type.");
+            MOZ_CRASH("Invalid Type.");
             return nullptr;
     }
 }
 
 void
 SurfaceStream::New(SurfaceFactory* factory, const gfxIntSize& size,
                    SharedSurface*& surf)
 {
--- a/gfx/layers/Effects.h
+++ b/gfx/layers/Effects.h
@@ -251,17 +251,17 @@ CreateTexturedEffect(TextureHost *aTextu
     break;
   case gfx::FORMAT_R8G8B8A8:
     result = new EffectRGBA(aTextureHost, true, aFilter);
     break;
   case gfx::FORMAT_YUV:
     result = new EffectYCbCr(aTextureHost, aFilter);
     break;
   default:
-    MOZ_NOT_REACHED("unhandled program type");
+    MOZ_CRASH("unhandled program type");
   }
 
   return result;
 }
 
 inline TemporaryRef<TexturedEffect>
 CreateTexturedEffect(TextureHost *aTextureHost,
                      const gfx::Filter& aFilter)
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -1773,23 +1773,23 @@ private:
  * Clients will usually want to Connect/Clear() on each transaction to
  * avoid difficulties managing memory across multiple layer subtrees.
  */
 class RefLayer : public ContainerLayer {
   friend class LayerManager;
 
 private:
   virtual void InsertAfter(Layer* aChild, Layer* aAfter)
-  { MOZ_NOT_REACHED("no"); }
+  { MOZ_CRASH("no"); }
 
   virtual void RemoveChild(Layer* aChild)
-  { MOZ_NOT_REACHED("no"); }
+  { MOZ_CRASH("no"); }
 
   virtual void RepositionChild(Layer* aChild, Layer* aAfter)
-  { MOZ_NOT_REACHED("no"); }
+  { MOZ_CRASH("no"); }
 
   using ContainerLayer::SetFrameMetrics;
 
 public:
   /**
    * CONSTRUCTION PHASE ONLY
    * Set the ID of the layer's referent.
    */
--- a/gfx/layers/client/CompositableClient.h
+++ b/gfx/layers/client/CompositableClient.h
@@ -68,29 +68,29 @@ public:
   {
     MOZ_COUNT_CTOR(CompositableClient);
   }
 
   virtual ~CompositableClient();
 
   virtual TextureInfo GetTextureInfo() const
   {
-    MOZ_NOT_REACHED("This method should be overridden");
+    MOZ_CRASH("This method should be overridden");
     return TextureInfo();
   }
 
   LayersBackend GetCompositorBackendType() const;
 
   TemporaryRef<TextureClient>
   CreateTextureClient(TextureClientType aTextureClientType);
 
   virtual void SetDescriptorFromReply(TextureIdentifier aTextureId,
                                       const SurfaceDescriptor& aDescriptor)
   {
-    MOZ_NOT_REACHED("If you want to call this, you should have implemented it");
+    MOZ_CRASH("If you want to call this, you should have implemented it");
   }
 
   /**
    * Establishes the connection with compositor side through IPDL
    */
   virtual bool Connect();
 
   void Destroy();
--- a/gfx/layers/client/ContentClient.h
+++ b/gfx/layers/client/ContentClient.h
@@ -136,17 +136,17 @@ public:
                                                      const nsIntRect& aRect,
                                                      uint32_t aFlags,
                                                      gfxASurface**) MOZ_OVERRIDE;
   virtual TemporaryRef<gfx::DrawTarget>
     CreateDTBuffer(ContentType aType, const nsIntRect& aRect, uint32_t aFlags);
 
   virtual TextureInfo GetTextureInfo() const MOZ_OVERRIDE
   {
-    MOZ_NOT_REACHED("Should not be called on non-remote ContentClient");
+    MOZ_CRASH("Should not be called on non-remote ContentClient");
     return TextureInfo();
   }
 
 private:
   BasicLayerManager* mManager;
 };
 
 /**
--- a/gfx/layers/client/ImageClient.cpp
+++ b/gfx/layers/client/ImageClient.cpp
@@ -35,17 +35,17 @@ ImageClient::CreateImageClient(Composita
     break;
   case BUFFER_BRIDGE:
     result = new ImageClientBridge(aForwarder, aFlags);
     break;
   case BUFFER_UNKNOWN:
     result = nullptr;
     break;
   default:
-    MOZ_NOT_REACHED("unhandled program type");
+    MOZ_CRASH("unhandled program type");
   }
 
   NS_ASSERTION(result, "Failed to create ImageClient");
 
   return result.forget();
 }
 
 
--- a/gfx/layers/composite/CompositableHost.cpp
+++ b/gfx/layers/composite/CompositableHost.cpp
@@ -67,17 +67,17 @@ CompositableHost::Create(const TextureIn
     return result;
   case BUFFER_CONTENT_DIRECT:
     result = new ContentHostDoubleBuffered(aTextureInfo);
     return result;
   case BUFFER_CONTENT_INC:
     result = new ContentHostIncremental(aTextureInfo);
     return result;
   default:
-    MOZ_NOT_REACHED("Unknown CompositableType");
+    MOZ_CRASH("Unknown CompositableType");
     return nullptr;
   }
 }
 
 void
 CompositableHost::DumpTextureHost(FILE* aFile, TextureHost* aTexture)
 {
   if (!aTexture) {
--- a/gfx/layers/composite/TextureHost.cpp
+++ b/gfx/layers/composite/TextureHost.cpp
@@ -54,17 +54,17 @@ TextureHost::CreateTextureHost(SurfaceDe
                                     aTextureHostFlags,
                                     aTextureFlags);
 #endif
     case LAYERS_BASIC:
       return CreateBasicTextureHost(aDescriptorType,
                                     aTextureHostFlags,
                                     aTextureFlags);
     default:
-      MOZ_NOT_REACHED("Couldn't create texture host");
+      MOZ_CRASH("Couldn't create texture host");
       return nullptr;
   }
 }
 
 
 TextureHost::TextureHost()
   : mFlags(0)
   , mBuffer(nullptr)
--- a/gfx/layers/composite/TiledContentHost.h
+++ b/gfx/layers/composite/TiledContentHost.h
@@ -185,17 +185,17 @@ public:
 
   virtual TiledLayerComposer* AsTiledLayerComposer() MOZ_OVERRIDE { return this; }
 
   virtual void EnsureTextureHost(TextureIdentifier aTextureId,
                                  const SurfaceDescriptor& aSurface,
                                  ISurfaceAllocator* aAllocator,
                                  const TextureInfo& aTextureInfo) MOZ_OVERRIDE
   {
-    MOZ_NOT_REACHED("Does nothing");
+    MOZ_CRASH("Does nothing");
   }
 
   virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE
   {
     CompositableHost::SetCompositor(aCompositor);
     mVideoMemoryTiledBuffer.SetCompositor(aCompositor);
     mLowPrecisionVideoMemoryTiledBuffer.SetCompositor(aCompositor);
   }
--- a/gfx/layers/d3d10/CanvasLayerD3D10.cpp
+++ b/gfx/layers/d3d10/CanvasLayerD3D10.cpp
@@ -165,17 +165,17 @@ CanvasLayerD3D10::UpdateSurface()
         }
 
         mTexture->Unmap(0);
         mSRView = mUploadSRView;
         break;
       }
 
       default:
-        MOZ_NOT_REACHED("Unhandled SharedSurfaceType.");
+        MOZ_CRASH("Unhandled SharedSurfaceType.");
         return;
     }
   } else if (mSurface) {
     RECT r;
     r.left = 0;
     r.top = 0;
     r.right = mBounds.width;
     r.bottom = mBounds.height;
--- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
+++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp
@@ -120,17 +120,17 @@ ImageFormatForPixelFormat(android::Pixel
     return gfxASurface::ImageFormatARGB32;
   case PIXEL_FORMAT_RGBX_8888:
     return gfxASurface::ImageFormatRGB24;
   case PIXEL_FORMAT_RGB_565:
     return gfxASurface::ImageFormatRGB16_565;
   case PIXEL_FORMAT_A_8:
     return gfxASurface::ImageFormatA8;
   default:
-    MOZ_NOT_REACHED("Unknown gralloc pixel format");
+    MOZ_CRASH("Unknown gralloc pixel format");
   }
   return gfxASurface::ImageFormatARGB32;
 }
 
 static android::PixelFormat
 PixelFormatForImageFormat(gfxASurface::gfxImageFormat aFormat)
 {
   switch (aFormat) {
@@ -138,17 +138,17 @@ PixelFormatForImageFormat(gfxASurface::g
     return android::PIXEL_FORMAT_RGBA_8888;
   case gfxASurface::ImageFormatRGB24:
     return android::PIXEL_FORMAT_RGBX_8888;
   case gfxASurface::ImageFormatRGB16_565:
     return android::PIXEL_FORMAT_RGB_565;
   case gfxASurface::ImageFormatA8:
     return android::PIXEL_FORMAT_A_8;
   default:
-    MOZ_NOT_REACHED("Unknown gralloc pixel format");
+    MOZ_CRASH("Unknown gralloc pixel format");
   }
   return gfxASurface::ImageFormatARGB32;
 }
 
 static size_t
 BytesPerPixelForPixelFormat(android::PixelFormat aFormat)
 {
   switch (aFormat) {
--- a/gfx/layers/opengl/CanvasLayerOGL.cpp
+++ b/gfx/layers/opengl/CanvasLayerOGL.cpp
@@ -218,17 +218,17 @@ CanvasLayerOGL::UpdateSurface()
           break;
         }
         case SharedSurfaceType::GLTextureShare: {
           SharedSurface_GLTexture* textureSurf = SharedSurface_GLTexture::Cast(surf);
           mTexture = textureSurf->Texture();
           break;
         }
         default:
-          MOZ_NOT_REACHED("Unacceptable SharedSurface type.");
+          MOZ_CRASH("Unacceptable SharedSurface type.");
           return;
       }
     } else {
       nothingToShow = true;
     }
   } else if (mCanvasSurface) {
 #ifdef XP_MACOSX
     if (mDrawTarget && mDrawTarget->GetNativeSurface(gfx::NATIVE_SURFACE_CGCONTEXT_ACCELERATED)) {
@@ -240,17 +240,17 @@ CanvasLayerOGL::UpdateSurface()
         mLayerProgram = gl::RGBARectLayerProgramType;
       }
       mDrawTarget->Flush();
       return;
     }
 #endif
     updatedSurface = mCanvasSurface;
   } else {
-    MOZ_NOT_REACHED("Unhandled canvas layer type.");
+    MOZ_CRASH("Unhandled canvas layer type.");
     return;
   }
 
   if (updatedSurface) {
     mOGLManager->MakeCurrent();
     mLayerProgram = gl()->UploadSurfaceToTexture(updatedSurface,
                                                  mBounds,
                                                  mUploadTexture,
--- a/gfx/layers/opengl/GLManager.cpp
+++ b/gfx/layers/opengl/GLManager.cpp
@@ -73,14 +73,14 @@ GLManager::CreateGLManager(LayerManager*
     if (Compositor::GetBackend() == LAYERS_OPENGL) {
       return new GLManagerCompositor(static_cast<CompositorOGL*>(
         static_cast<LayerManagerComposite*>(aManager)->GetCompositor()));
     } else {
       return nullptr;
     }
   }
 
-  MOZ_NOT_REACHED("Cannot create GLManager for non-GL layer manager");
+  MOZ_CRASH("Cannot create GLManager for non-GL layer manager");
   return nullptr;
 }
 
 }
 }
--- a/gfx/layers/opengl/TextureHostOGL.cpp
+++ b/gfx/layers/opengl/TextureHostOGL.cpp
@@ -110,17 +110,17 @@ FormatFromShaderType(ShaderProgramType a
       return FORMAT_R8G8B8A8;
     case RGBXLayerProgramType:
       return FORMAT_R8G8B8X8;
     case BGRALayerProgramType:
       return FORMAT_B8G8R8A8;
     case BGRXLayerProgramType:
       return FORMAT_B8G8R8X8;
     default:
-      MOZ_NOT_REACHED("Unsupported texture shader type");
+      MOZ_CRASH("Unsupported texture shader type");
       return FORMAT_UNKNOWN;
   }
 }
 
 TextureImageTextureHostOGL::~TextureImageTextureHostOGL()
 {
   MOZ_COUNT_DTOR(TextureImageTextureHostOGL);
   if (mTexture && mTexture->InUpdate()) {
@@ -430,17 +430,17 @@ SurfaceStreamHostOGL::Lock()
       break;
     }
     case SharedSurfaceType::Basic: {
       toUpload = SharedSurface_Basic::Cast(sharedSurf)->GetData();
       MOZ_ASSERT(toUpload);
       break;
     }
     default:
-      MOZ_NOT_REACHED("Invalid SharedSurface type.");
+      MOZ_CRASH("Invalid SharedSurface type.");
       return false;
   }
 
   if (toUpload) {
     // mBounds seems to end up as (0,0,0,0) a lot, so don't use it?
     nsIntSize size(toUpload->GetSize());
     nsIntRect rect(nsIntPoint(0,0), size);
     nsIntRegion bounds(rect);
--- a/gfx/layers/opengl/TextureHostOGL.h
+++ b/gfx/layers/opengl/TextureHostOGL.h
@@ -45,17 +45,17 @@ class CompositorOGL;
 class TextureSourceOGL
 {
 public:
   virtual bool IsValid() const = 0;
   virtual void BindTexture(GLenum aTextureUnit) = 0;
   virtual void ReleaseTexture() = 0;
   virtual gfx::IntSize GetSize() const = 0;
   virtual gl::ShaderProgramType GetShaderProgram() const {
-    MOZ_NOT_REACHED("unhandled shader type");
+    MOZ_CRASH("unhandled shader type");
   }
   // TODO: Noone's implementing this anymore, should see if we need this.
   virtual GLenum GetTextureTarget() const { return LOCAL_GL_TEXTURE_2D; }
   virtual GLenum GetWrapMode() const = 0;// { return LOCAL_GL_CLAMP_TO_EDGE; } // default
   virtual gfx3DMatrix GetTextureTransform() { return gfx3DMatrix(); }
 
   virtual TextureImageTextureHostOGL* AsTextureImageTextureHost() { return nullptr; }
 };
@@ -68,17 +68,17 @@ GetProgramTypeForTexture(const TextureHo
     return gl::BGRALayerProgramType;;
   case gfx::FORMAT_B8G8R8X8:
     return gl::BGRXLayerProgramType;;
   case gfx::FORMAT_R8G8B8X8:
     return gl::RGBXLayerProgramType;;
   case gfx::FORMAT_R8G8B8A8:
     return gl::RGBALayerProgramType;;
   default:
-    MOZ_NOT_REACHED("unhandled program type");
+    MOZ_CRASH("unhandled program type");
   }
 }
 
 /**
  * TextureHost implementation using a TextureImage as the underlying texture.
  */
 class TextureImageTextureHostOGL : public TextureHost
                                  , public TextureSourceOGL
--- a/gfx/thebes/gfx2DGlue.h
+++ b/gfx/thebes/gfx2DGlue.h
@@ -128,30 +128,30 @@ inline gfxContext::GraphicsLineCap Thebe
   switch (aStyle) {
   case CAP_BUTT:
     return gfxContext::LINE_CAP_BUTT;
   case CAP_ROUND:
     return gfxContext::LINE_CAP_ROUND;
   case CAP_SQUARE:
     return gfxContext::LINE_CAP_SQUARE;
   }
-  MOZ_NOT_REACHED("Incomplete switch");
+  MOZ_CRASH("Incomplete switch");
 }
 
 inline CapStyle ToCapStyle(gfxContext::GraphicsLineCap aStyle)
 {
   switch (aStyle) {
   case gfxContext::LINE_CAP_BUTT:
     return CAP_BUTT;
   case gfxContext::LINE_CAP_ROUND:
     return CAP_ROUND;
   case gfxContext::LINE_CAP_SQUARE:
     return CAP_SQUARE;
   }
-  MOZ_NOT_REACHED("Incomplete switch");
+  MOZ_CRASH("Incomplete switch");
 }
 
 inline gfxContext::GraphicsLineJoin ThebesLineJoin(JoinStyle aStyle)
 {
   switch (aStyle) {
   case JOIN_MITER:
     return gfxContext::LINE_JOIN_MITER;
   case JOIN_BEVEL:
@@ -168,17 +168,17 @@ inline JoinStyle ToJoinStyle(gfxContext:
   switch (aStyle) {
   case gfxContext::LINE_JOIN_MITER:
     return JOIN_MITER;
   case gfxContext::LINE_JOIN_BEVEL:
     return JOIN_BEVEL;
   case gfxContext::LINE_JOIN_ROUND:
     return JOIN_ROUND;
   }
-  MOZ_NOT_REACHED("Incomplete switch");
+  MOZ_CRASH("Incomplete switch");
 }
 
 inline gfxMatrix ThebesMatrix(const Matrix &aMatrix)
 {
   return gfxMatrix(aMatrix._11, aMatrix._12, aMatrix._21,
                    aMatrix._22, aMatrix._31, aMatrix._32);
 }
 
--- a/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -131,17 +131,17 @@ GetBackendName(mozilla::gfx::BackendType
         return "cairo";
       case mozilla::gfx::BACKEND_SKIA:
         return "skia";
       case mozilla::gfx::BACKEND_RECORDING:
         return "recording";
       case mozilla::gfx::BACKEND_NONE:
         return "none";
   }
-  MOZ_NOT_REACHED("Incomplete switch");
+  MOZ_CRASH("Incomplete switch");
 }
 
 class gfxPlatform {
 public:
     /**
      * Return a pointer to the current active platform.
      * This is a singleton; it contains mostly convenience
      * functions to obtain platform-specific objects.
--- a/gfx/thebes/gfxRect.h
+++ b/gfx/thebes/gfxRect.h
@@ -91,27 +91,27 @@ struct gfxRect :
 
     gfxPoint CCWCorner(mozilla::css::Side side) const {
         switch (side) {
             case NS_SIDE_TOP: return TopLeft();
             case NS_SIDE_RIGHT: return TopRight();
             case NS_SIDE_BOTTOM: return BottomRight();
             case NS_SIDE_LEFT: return BottomLeft();
         }
-        MOZ_NOT_REACHED("Incomplet switch");
+        MOZ_CRASH("Incomplet switch");
     }
 
     gfxPoint CWCorner(mozilla::css::Side side) const {
         switch (side) {
             case NS_SIDE_TOP: return TopRight();
             case NS_SIDE_RIGHT: return BottomRight();
             case NS_SIDE_BOTTOM: return BottomLeft();
             case NS_SIDE_LEFT: return TopLeft();
         }
-        MOZ_NOT_REACHED("Incomplet switch");
+        MOZ_CRASH("Incomplet switch");
     }
 
     /* Conditions this border to Cairo's max coordinate space.
      * The caller can check IsEmpty() after Condition() -- if it's TRUE,
      * the caller can possibly avoid doing any extra rendering.
      */
     void Condition();
 
--- a/hal/gonk/GonkDiskSpaceWatcher.cpp
+++ b/hal/gonk/GonkDiskSpaceWatcher.cpp
@@ -69,17 +69,17 @@ public:
   GonkDiskSpaceWatcher();
   ~GonkDiskSpaceWatcher() {};
 
   virtual void OnFileCanReadWithoutBlocking(int aFd);
 
   // We should never write to the fanotify fd.
   virtual void OnFileCanWriteWithoutBlocking(int aFd)
   {
-    MOZ_NOT_REACHED("Must not write to fanotify fd");
+    MOZ_CRASH("Must not write to fanotify fd");
     MOZ_CRASH();
   }
 
   void DoStart();
   void DoStop();
 
 private:
   void NotifyUpdate();
--- a/hal/gonk/UeventPoller.cpp
+++ b/hal/gonk/UeventPoller.cpp
@@ -53,17 +53,17 @@ public:
 
   bool OpenSocket();
 
   virtual void OnFileCanReadWithoutBlocking(int fd);
 
   // no writing to the netlink socket
   virtual void OnFileCanWriteWithoutBlocking(int fd)
   {
-    MOZ_NOT_REACHED("Must not write to netlink socket");
+    MOZ_CRASH("Must not write to netlink socket");
   }
 
   MessageLoopForIO *GetIOLoop () const { return mIOLoop; }
   void RegisterObserver(IUeventObserver *aObserver)
   {
     mUeventObserverList.AddObserver(aObserver);
   }
 
--- a/hal/linux/LinuxPower.cpp
+++ b/hal/linux/LinuxPower.cpp
@@ -61,20 +61,20 @@ QuitHard(hal::ShutdownMode aMode)
       kill(0, SIGKILL);
       // If we can't SIGKILL our process group, something is badly
       // wrong.  Trying to deliver a catch-able signal to ourselves can
       // invoke signal handlers and might cause problems.  So try
       // _exit() and hope we go away.
       _exit(1);
       break;
     default:
-      MOZ_NOT_REACHED();
+      MOZ_CRASH();
       break;
   }
-  MOZ_NOT_REACHED();
+  MOZ_CRASH();
 }
 
 // Function to complusively shut down the system with a given mode when timeout.
 static void*
 ForceQuitWatchdog(void* aParamPtr)
 {
   watchdogParam_t* paramPtr = reinterpret_cast<watchdogParam_t*>(aParamPtr);
   if (paramPtr->timeoutSecs > 0 && paramPtr->timeoutSecs <= 30) {
--- a/ipc/glue/FileDescriptor.cpp
+++ b/ipc/glue/FileDescriptor.cpp
@@ -105,17 +105,17 @@ FileDescriptor::ShareTo(const FileDescri
     if (IsValid(newHandle)) {
       return base::FileDescriptor(newHandle, /* auto_close */ true);
     }
     NS_WARNING("Failed to duplicate file handle for other process!");
   }
   return base::FileDescriptor();
 #endif
 
-  MOZ_NOT_REACHED("Must not get here!");
+  MOZ_CRASH("Must not get here!");
   return PickleType();
 }
 
 // static
 bool
 FileDescriptor::IsValid(PlatformHandleType aHandle)
 {
   return aHandle != INVALID_HANDLE;
--- a/ipc/glue/InputStreamUtils.cpp
+++ b/ipc/glue/InputStreamUtils.cpp
@@ -43,23 +43,23 @@ SerializeInputStream(nsIInputStream* aIn
                      InputStreamParams& aParams)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aInputStream);
 
   nsCOMPtr<nsIIPCSerializableInputStream> serializable =
     do_QueryInterface(aInputStream);
   if (!serializable) {
-    MOZ_NOT_REACHED("Input stream is not serializable!");
+    MOZ_CRASH("Input stream is not serializable!");
   }
 
   serializable->Serialize(aParams);
 
   if (aParams.type() == InputStreamParams::T__None) {
-    MOZ_NOT_REACHED("Serialize failed!");
+    MOZ_CRASH("Serialize failed!");
   }
 }
 
 void
 SerializeInputStream(nsIInputStream* aInputStream,
                      OptionalInputStreamParams& aParams)
 {
   MOZ_ASSERT(NS_IsMainThread());
--- a/ipc/glue/URIUtils.cpp
+++ b/ipc/glue/URIUtils.cpp
@@ -53,45 +53,45 @@ SerializeURI(nsIURI* aURI,
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aURI);
 
   nsCOMPtr<nsIIPCSerializableURI> serializable = do_QueryInterface(aURI);
   if (serializable) {
     serializable->Serialize(aParams);
     if (aParams.type() == URIParams::T__None) {
-      MOZ_NOT_REACHED("Serialize failed!");
+      MOZ_CRASH("Serialize failed!");
     }
     return;
   }
 
   nsCString scheme;
   if (NS_FAILED(aURI->GetScheme(scheme))) {
-    MOZ_NOT_REACHED("This must never fail!");
+    MOZ_CRASH("This must never fail!");
   }
 
   bool allowed = false;
 
   for (size_t i = 0; i < ArrayLength(kGenericURIAllowedSchemes); i++) {
     const StringWithLengh& entry = kGenericURIAllowedSchemes[i];
     if (scheme.EqualsASCII(entry.string, entry.length)) {
       allowed = true;
       break;
     }
   }
 
   if (!allowed) {
-    MOZ_NOT_REACHED("All IPDL URIs must be serializable or an allowed "
+    MOZ_CRASH("All IPDL URIs must be serializable or an allowed "
                     "scheme!");
   }
 
   GenericURIParams params;
   if (NS_FAILED(aURI->GetSpec(params.spec())) ||
       NS_FAILED(aURI->GetOriginCharset(params.charset()))) {
-    MOZ_NOT_REACHED("This must never fail!");
+    MOZ_CRASH("This must never fail!");
   }
 
   aParams = params;
 }
 
 void
 SerializeURI(nsIURI* aURI,
              OptionalURIParams& aParams)
@@ -127,17 +127,17 @@ DeserializeURI(const URIParams& aParams)
         serializable = do_CreateInstance(kStandardURLCID);
         break;
 
       case URIParams::TJARURIParams:
         serializable = do_CreateInstance(kJARURICID);
         break;
 
       default:
-        MOZ_NOT_REACHED("Unknown params!");
+        MOZ_CRASH("Unknown params!");
     }
 
     MOZ_ASSERT(serializable);
 
     if (!serializable->Deserialize(aParams)) {
       MOZ_ASSERT(false, "Deserialize failed!");
       return nullptr;
     }
@@ -155,17 +155,17 @@ DeserializeURI(const URIParams& aParams)
   if (NS_FAILED(NS_NewURI(getter_AddRefs(uri), params.spec(),
                           params.charset().get()))) {
     NS_WARNING("Failed to make new URI!");
     return nullptr;
   }
 
   nsCString scheme;
   if (NS_FAILED(uri->GetScheme(scheme))) {
-    MOZ_NOT_REACHED("This must never fail!");
+    MOZ_CRASH("This must never fail!");
   }
 
   bool allowed = false;
 
   for (size_t i = 0; i < ArrayLength(kGenericURIAllowedSchemes); i++) {
     const StringWithLengh& entry = kGenericURIAllowedSchemes[i];
     if (scheme.EqualsASCII(entry.string, entry.length)) {
       allowed = true;
@@ -192,16 +192,16 @@ DeserializeURI(const OptionalURIParams& 
     case OptionalURIParams::Tvoid_t:
       break;
 
     case OptionalURIParams::TURIParams:
       uri = DeserializeURI(aParams.get_URIParams());
       break;
 
     default:
-      MOZ_NOT_REACHED("Unknown params!");
+      MOZ_CRASH("Unknown params!");
   }
 
   return uri.forget();
 }
 
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/nfc/Nfc.cpp
+++ b/ipc/nfc/Nfc.cpp
@@ -150,17 +150,17 @@ NfcConnector::SetUp(int aFd)
     // Nothing to do here.
     return true;
 }
 
 void
 NfcConnector::GetSocketAddr(const sockaddr_any& aAddr,
                             nsAString& aAddrStr)
 {
-    MOZ_NOT_REACHED("This should never be called!");
+    MOZ_CRASH("This should never be called!");
 }
 
 } // anonymous namespace
 
 
 namespace mozilla {
 namespace ipc {
 
--- a/ipc/ril/Ril.cpp
+++ b/ipc/ril/Ril.cpp
@@ -152,17 +152,17 @@ RilConnector::SetUp(int aFd)
     return true;
 }
 
 void
 RilConnector::GetSocketAddr(const sockaddr_any& aAddr,
                             nsAString& aAddrStr)
 {
     // Unused.
-    MOZ_NOT_REACHED("This should never be called!");
+    MOZ_CRASH("This should never be called!");
 }
 
 } // anonymous namespace
 
 namespace mozilla {
 namespace ipc {
 
 RilConsumer::RilConsumer(unsigned long aClientId,
--- a/ipc/unixsocket/UnixSocket.cpp
+++ b/ipc/unixsocket/UnixSocket.cpp
@@ -748,17 +748,17 @@ UnixSocketImpl::OnFileCanReadWithoutBloc
 
       // If ret is less than MAX_READ_SIZE, there's no more data in the socket
       // for us to read now.
       if (ret < ssize_t(MAX_READ_SIZE)) {
         return;
       }
     }
 
-    MOZ_NOT_REACHED("We returned early");
+    MOZ_CRASH("We returned early");
   }
 
   if (status == SOCKET_LISTENING) {
     int client_fd = accept(mFd.get(), (struct sockaddr*)&mAddr, &mAddrSize);
 
     if (client_fd < 0) {
       return;
     }
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -9757,17 +9757,17 @@ nsCSSFrameConstructor::CreateNeededTable
         wrapperType = eTypeRow;
         break;
       case eTypeTable:
         // Either colgroup or rowgroup, depending on what we're grouping.
         wrapperType = groupingParentType == eTypeColGroup ?
           eTypeColGroup : eTypeRowGroup;
         break;
       default:
-        MOZ_NOT_REACHED("Colgroups should be suppresing non-col child items");
+        MOZ_CRASH("Colgroups should be suppresing non-col child items");
         break;
     }
 
     const PseudoParentData& pseudoData = sPseudoParentData[wrapperType];
     nsIAtom* pseudoType = *pseudoData.mPseudoType;
     nsStyleContext* parentStyle = aParentFrame->StyleContext();
     nsIContent* parentContent = aParentFrame->GetContent();
 
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1565,17 +1565,17 @@ MainAxisPositionTracker::
           mPosition += totalEdgePackingSpace / 2;
           // ...but we need to subtract all of it right away, so that we won't
           // hand out any of it to intermediate packing spaces.
           mPackingSpaceRemaining -= totalEdgePackingSpace;
           mNumPackingSpacesRemaining--;
         }
         break;
       default:
-        MOZ_NOT_REACHED("Unexpected justify-content value");
+        MOZ_CRASH("Unexpected justify-content value");
     }
   }
 
   MOZ_ASSERT(mNumPackingSpacesRemaining == 0 ||
              mNumAutoMarginsInMainAxis == 0,
              "extra space should either go to packing space or to "
              "auto margins, but not to both");
 }
@@ -1895,17 +1895,17 @@ FlexboxAxisTracker::FlexboxAxisTracker(n
       break;
     case NS_STYLE_FLEX_DIRECTION_COLUMN:
       mMainAxis = blockDimension;
       break;
     case NS_STYLE_FLEX_DIRECTION_COLUMN_REVERSE:
       mMainAxis = GetReverseAxis(blockDimension);
       break;
     default:
-      MOZ_NOT_REACHED("Unexpected computed value for 'flex-flow' property");
+      MOZ_CRASH("Unexpected computed value for 'flex-flow' property");
       mMainAxis = inlineDimension;
       break;
   }
 
   // Determine cross axis:
   // (This is set up so that a bogus |flexDirection| value will
   // give us blockDimension.
   if (flexDirection == NS_STYLE_FLEX_DIRECTION_COLUMN ||
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -354,74 +354,74 @@ MOZ_ReportCrash(const char* s, const cha
        if (cond) \
          MOZ_ASSERT(expr); \
      } while (0)
 #else
 #  define MOZ_ASSERT_IF(cond, expr)  do { } while (0)
 #endif
 
 /*
- * MOZ_NOT_REACHED_MARKER() expands to an expression which states that it is
+ * MOZ_CRASH_MARKER() expands to an expression which states that it is
  * undefined behavior for execution to reach this point.  No guarantees are made
  * about what will happen if this is reached at runtime.  Most code should
- * probably use the higher level MOZ_NOT_REACHED, which uses this when
+ * probably use the higher level MOZ_CRASH, which uses this when
  * appropriate.
  */
 #if defined(__clang__)
-#  define MOZ_NOT_REACHED_MARKER() __builtin_unreachable()
+#  define MOZ_CRASH_MARKER() __builtin_unreachable()
 #elif defined(__GNUC__)
    /*
     * __builtin_unreachable() was implemented in gcc 4.5.  If we don't have
     * that, call a noreturn function; abort() will do nicely.  Qualify the call
     * in C++ in case there's another abort() visible in local scope.
     */
 #  if MOZ_GCC_VERSION_AT_LEAST(4, 5, 0)
-#    define MOZ_NOT_REACHED_MARKER() __builtin_unreachable()
+#    define MOZ_CRASH_MARKER() __builtin_unreachable()
 #  else
 #    ifdef __cplusplus
-#      define MOZ_NOT_REACHED_MARKER() ::abort()
+#      define MOZ_CRASH_MARKER() ::abort()
 #    else
-#      define MOZ_NOT_REACHED_MARKER() abort()
+#      define MOZ_CRASH_MARKER() abort()
 #    endif
 #  endif
 #elif defined(_MSC_VER)
-#  define MOZ_NOT_REACHED_MARKER() __assume(0)
+#  define MOZ_CRASH_MARKER() __assume(0)
 #else
 #  ifdef __cplusplus
-#    define MOZ_NOT_REACHED_MARKER() ::abort()
+#    define MOZ_CRASH_MARKER() ::abort()
 #  else
-#    define MOZ_NOT_REACHED_MARKER() abort()
+#    define MOZ_CRASH_MARKER() abort()
 #  endif
 #endif
 
 /*
- * MOZ_NOT_REACHED(reason) indicates that the given point can't be reached
+ * MOZ_CRASH(reason) indicates that the given point can't be reached
  * during execution: simply reaching that point in execution is a bug.  It takes
  * as an argument an error message indicating the reason why that point should
  * not have been reachable.
  *
  *   // ...in a language parser...
  *   void handle(BooleanLiteralNode node)
  *   {
  *     if (node.isTrue())
  *       handleTrueLiteral();
  *     else if (node.isFalse())
  *       handleFalseLiteral();
  *     else
- *       MOZ_NOT_REACHED("boolean literal that's not true or false?");
+ *       MOZ_CRASH("boolean literal that's not true or false?");
  *   }
  */
 #if defined(DEBUG)
-#  define MOZ_NOT_REACHED(reason) \
+#  define MOZ_CRASH(reason) \
      do { \
        MOZ_ASSERT(false, reason); \
-       MOZ_NOT_REACHED_MARKER(); \
+       MOZ_CRASH_MARKER(); \
      } while (0)
 #else
-#  define MOZ_NOT_REACHED(reason)  MOZ_NOT_REACHED_MARKER()
+#  define MOZ_CRASH(reason)  MOZ_CRASH_MARKER()
 #endif
 
 /*
  * MOZ_ALWAYS_TRUE(expr) and MOZ_ALWAYS_FALSE(expr) always evaluate the provided
  * expression, in debug builds and in release builds both.  Then, in debug
  * builds only, the value of the expression is asserted either true or false
  * using MOZ_ASSERT.
  */
--- a/mfbt/LinkedList.h
+++ b/mfbt/LinkedList.h
@@ -408,17 +408,17 @@ class LinkedList
 #ifdef DEBUG
       for (const T* elem = getFirst();
            elem;
            elem = elem->getNext())
       {
         if (elem == t)
           return;
       }
-      MOZ_NOT_REACHED("element wasn't found in this list!");
+      MOZ_CRASH("element wasn't found in this list!");
 #endif
     }
 
     LinkedList& operator=(const LinkedList<T>& other) MOZ_DELETE;
     LinkedList(const LinkedList<T>& other) MOZ_DELETE;
 };
 
 } /* namespace mozilla */
--- a/mfbt/decimal/moz-decimal-utils.h
+++ b/mfbt/decimal/moz-decimal-utils.h
@@ -27,17 +27,17 @@
 #define UINT64_C(c) (c ## ULL)
 #endif
 
 #ifdef ASSERT
 #undef ASSERT
 #endif
 #define ASSERT MOZ_ASSERT
 
-#define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("")
+#define ASSERT_NOT_REACHED() MOZ_CRASH("")
 
 #define WTF_MAKE_NONCOPYABLE(ClassName) \
   private: \
     ClassName(const ClassName&) MOZ_DELETE; \
     void operator=(const ClassName&) MOZ_DELETE;
 
 #if defined(_MSC_VER) && (_MSC_VER <= 1700)
 namespace std {
--- a/mfbt/decimal/to-moz-dependencies.patch
+++ b/mfbt/decimal/to-moz-dependencies.patch
@@ -251,17 +251,17 @@ new file mode 100644
 +#define UINT64_C(c) (c ## ULL)
 +#endif
 +
 +#ifdef ASSERT
 +#undef ASSERT
 +#endif
 +#define ASSERT MOZ_ASSERT
 +
-+#define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("")
++#define ASSERT_NOT_REACHED() MOZ_CRASH("")
 +
 +#define WTF_MAKE_NONCOPYABLE(ClassName) \
 +  private: \
 +    ClassName(const ClassName&) MOZ_DELETE; \
 +    void operator=(const ClassName&) MOZ_DELETE;
 +
 +#if defined(_MSC_VER) && (_MSC_VER <= 1700)
 +namespace std {
--- a/modules/libjar/nsJARProtocolHandler.cpp
+++ b/modules/libjar/nsJARProtocolHandler.cpp
@@ -70,17 +70,17 @@ nsJARProtocolHandler::RemoteOpenFileInPr
                                            nsIHashable *aRemoteFile,
                                            nsIRemoteOpenFileListener *aListener)
 {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(aRemoteFile);
     MOZ_ASSERT(aListener);
 
     if (IsMainProcess()) {
-        MOZ_NOT_REACHED("Shouldn't be called in the main process!");
+        MOZ_CRASH("Shouldn't be called in the main process!");
         return false;
     }
 
     RemoteFileListenerArray *listeners;
     if (mRemoteFileListeners.Get(aRemoteFile, &listeners)) {
         listeners->AppendElement(aListener);
         return true;
     }
@@ -94,17 +94,17 @@ nsJARProtocolHandler::RemoteOpenFileInPr
 void
 nsJARProtocolHandler::RemoteOpenFileComplete(nsIHashable *aRemoteFile,
                                              nsresult aStatus)
 {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_ASSERT(aRemoteFile);
 
     if (IsMainProcess()) {
-        MOZ_NOT_REACHED("Shouldn't be called in the main process!");
+        MOZ_CRASH("Shouldn't be called in the main process!");
         return;
     }
 
     RemoteFileListenerArray *tempListeners;
     if (!mRemoteFileListeners.Get(aRemoteFile, &tempListeners)) {
         return;
     }
 
--- a/modules/libpref/src/prefapi.cpp
+++ b/modules/libpref/src/prefapi.cpp
@@ -288,17 +288,17 @@ SetPrefValue(const char* aPrefName, cons
                                 setDefault);
     case dom::PrefValue::Tint32_t:
         return PREF_SetIntPref(aPrefName, aValue.get_int32_t(),
                                setDefault);
     case dom::PrefValue::Tbool:
         return PREF_SetBoolPref(aPrefName, aValue.get_bool(),
                                 setDefault);
     default:
-        MOZ_NOT_REACHED();
+        MOZ_CRASH();
         return NS_ERROR_FAILURE;
     }
 }
 
 nsresult
 pref_SetPref(const dom::PrefSetting& aPref)
 {
     const char* prefName = aPref.name().get();
@@ -421,17 +421,17 @@ GetPrefValueFromEntry(PrefHashEntry *aHa
         return;
     case PREF_INT:
         *settingValue = value->intVal;
         return;
     case PREF_BOOL:
         *settingValue = !!value->boolVal;
         return;
     default:
-        MOZ_NOT_REACHED();
+        MOZ_CRASH();
     }
 }
 
 void
 pref_GetPrefFromEntry(PrefHashEntry *aHashEntry, dom::PrefSetting* aPref)
 {
     aPref->name() = aHashEntry->key;
     if (PREF_HAS_DEFAULT_VALUE(aHashEntry)) {
--- a/mozglue/linker/ElfLoader.h
+++ b/mozglue/linker/ElfLoader.h
@@ -542,17 +542,17 @@ private:
         item = item->l_next;
         return *item;
       }
 
       bool operator<(const iterator &other) const
       {
         if (other.item == NULL)
           return item ? true : false;
-        MOZ_NOT_REACHED("DebuggerHelper::iterator::operator< called with something else than DebuggerHelper::end()");
+        MOZ_CRASH("DebuggerHelper::iterator::operator< called with something else than DebuggerHelper::end()");
       }
     protected:
       friend class DebuggerHelper;
       iterator(const link_map *item): item(item) { }
 
     private:
       const link_map *item;
     };
--- a/mozglue/linker/Mappable.cpp
+++ b/mozglue/linker/Mappable.cpp
@@ -406,33 +406,33 @@ MappableSeekableZStream::munmap(void *ad
 {
   std::vector<LazyMap>::iterator it;
   for (it = lazyMaps.begin(); it < lazyMaps.end(); ++it)
     if ((it->addr = addr) && (it->length == length)) {
       lazyMaps.erase(it);
       ::munmap(addr, length);
       return;
     }
-  MOZ_NOT_REACHED("munmap called with unknown mapping");
+  MOZ_CRASH("munmap called with unknown mapping");
 }
 
 void
 MappableSeekableZStream::finalize() { }
 
 class AutoLock {
 public:
   AutoLock(pthread_mutex_t *mutex): mutex(mutex)
   {
     if (pthread_mutex_lock(mutex))
-      MOZ_NOT_REACHED("pthread_mutex_lock failed");
+      MOZ_CRASH("pthread_mutex_lock failed");
   }
   ~AutoLock()
   {
     if (pthread_mutex_unlock(mutex))
-      MOZ_NOT_REACHED("pthread_mutex_unlock failed");
+      MOZ_CRASH("pthread_mutex_unlock failed");
   }
 private:
   pthread_mutex_t *mutex;
 };
 
 bool
 MappableSeekableZStream::ensure(const void *addr)
 {
--- a/netwerk/base/src/BackgroundFileSaver.cpp
+++ b/netwerk/base/src/BackgroundFileSaver.cpp
@@ -963,25 +963,25 @@ DigestOutputStream::Write(const char* aB
 
 NS_IMETHODIMP
 DigestOutputStream::WriteFrom(nsIInputStream* aFromStream,
                               uint32_t aCount, uint32_t* retval)
 {
   // Not supported. We could read the stream to a buf, call DigestOp on the
   // result, seek back and pass the stream on, but it's not worth it since our
   // application (NS_AsyncCopy) doesn't invoke this on the sink.
-  MOZ_NOT_REACHED("DigestOutputStream::WriteFrom not implemented");
+  MOZ_CRASH("DigestOutputStream::WriteFrom not implemented");
 }
 
 NS_IMETHODIMP
 DigestOutputStream::WriteSegments(nsReadSegmentFun aReader,
                                   void *aClosure, uint32_t aCount,
                                   uint32_t *retval)
 {
-  MOZ_NOT_REACHED("DigestOutputStream::WriteSegments not implemented");
+  MOZ_CRASH("DigestOutputStream::WriteSegments not implemented");
 }
 
 NS_IMETHODIMP
 DigestOutputStream::IsNonBlocking(bool *retval)
 {
   return mOutputStream->IsNonBlocking(retval);
 }
 
--- a/netwerk/ipc/RemoteOpenFileChild.cpp
+++ b/netwerk/ipc/RemoteOpenFileChild.cpp
@@ -165,17 +165,17 @@ RemoteOpenFileChild::AsyncRemoteFileOpen
     new CallsListenerInNewEvent(aListener, NS_OK);
   runnable->Dispatch();
 
   mAsyncOpenCalled = true;
   return NS_OK;
 #else
   nsString path;
   if (NS_FAILED(mFile->GetPath(path))) {
-    MOZ_NOT_REACHED("Couldn't get path from file!");
+    MOZ_CRASH("Couldn't get path from file!");
   }
 
   if (mTabChild) {
     if (mTabChild->GetCachedFileDescriptor(path, this)) {
       // The file descriptor was found in the cache and OnCachedFileDescriptor()
       // will be called with it.
       return NS_OK;
     }
@@ -200,33 +200,33 @@ RemoteOpenFileChild::OnCachedFileDescrip
                                             const FileDescriptor& aFD)
 {
 #ifdef DEBUG
   if (!aPath.IsEmpty()) {
     MOZ_ASSERT(mFile);
 
     nsString path;
     if (NS_FAILED(mFile->GetPath(path))) {
-      MOZ_NOT_REACHED("Couldn't get path from file!");
+      MOZ_CRASH("Couldn't get path from file!");
     }
 
     MOZ_ASSERT(path == aPath, "Paths don't match!");
   }
 #endif
 
   HandleFileDescriptorAndNotifyListener(aFD, /* aFromRecvDelete */ false);
 }
 
 void
 RemoteOpenFileChild::HandleFileDescriptorAndNotifyListener(
                                                       const FileDescriptor& aFD,
                                                       bool aFromRecvDelete)
 {
 #if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA)
-  MOZ_NOT_REACHED("OS X and Windows shouldn't be doing IPDL here");
+  MOZ_CRASH("OS X and Windows shouldn't be doing IPDL here");
 #else
   if (!mListener) {
     // We already notified our listener (either in response to a cached file
     // descriptor callback or through the normal messaging mechanism). Close the
     // file descriptor if it is valid.
     if (aFD.IsValid()) {
       nsRefPtr<CloseFileRunnable> runnable = new CloseFileRunnable(aFD);
       runnable->Dispatch();
@@ -241,17 +241,17 @@ RemoteOpenFileChild::HandleFileDescripto
 
   // If RemoteOpenFile reply (Recv__delete__) for app's application.zip comes
   // back sooner than the parent-pushed fd (TabChild::RecvCacheFileDescriptor())
   // have TabChild cancel running callbacks, since we'll call them in
   // NotifyListener.
   if (tabChild && aFromRecvDelete) {
     nsString path;
     if (NS_FAILED(mFile->GetPath(path))) {
-      MOZ_NOT_REACHED("Couldn't get path from file!");
+      MOZ_CRASH("Couldn't get path from file!");
     }
 
     tabChild->CancelCachedFileDescriptorCallback(path, this);
   }
 
   if (aFD.IsValid()) {
     mNSPRFileDesc = PR_ImportFile(aFD.PlatformHandle());
     if (!mNSPRFileDesc) {
--- a/netwerk/ipc/RemoteOpenFileParent.cpp
+++ b/netwerk/ipc/RemoteOpenFileParent.cpp
@@ -16,17 +16,17 @@
 
 namespace mozilla {
 namespace net {
 
 bool
 RemoteOpenFileParent::OpenSendCloseDelete()
 {
 #if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA)
-  MOZ_NOT_REACHED("OS X and Windows shouldn't be doing IPDL here");
+  MOZ_CRASH("OS X and Windows shouldn't be doing IPDL here");
 #else
 
   // TODO: make this async!
 
   FileDescriptor fileDescriptor;
 
   nsAutoCString path;
   nsresult rv = mURI->GetFilePath(path);
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -2911,17 +2911,17 @@ HttpCacheQuery::OnCacheEntryAvailable(ns
                     = Telemetry::HTTP_DISK_CACHE_DISPOSITION_2;
             } else if (!strcmp(cacheDeviceID, kMemoryDeviceID)) {
                 mCacheEntryDeviceTelemetryID
                     = Telemetry::HTTP_MEMORY_CACHE_DISPOSITION_2;
             } else if (!strcmp(cacheDeviceID, kOfflineDeviceID)) {
                 mCacheEntryDeviceTelemetryID
                     = Telemetry::HTTP_OFFLINE_CACHE_DISPOSITION_2;
             } else {
-                MOZ_NOT_REACHED("unknown cache device ID");
+                MOZ_CRASH("unknown cache device ID");
             }
 
             delete cacheDeviceID;
         } else {
             // If we can read from the entry, it must have a device, but
             // sometimes we don't (Bug 769497).
             // MOZ_ASSERT(!(mCacheAccess & nsICache::ACCESS_READ));
         }
--- a/security/manager/ssl/src/ScopedNSSTypes.h
+++ b/security/manager/ssl/src/ScopedNSSTypes.h
@@ -47,17 +47,17 @@ uint8_t_ptr_cast(const char * p) { retur
 // NSPR/NSS function forgot to call PR_SetError.
 
 // IMPORTANT: This must be called immediately after the function that set the
 // error code. Prefer using MapSECStatus to this.
 inline nsresult
 PRErrorCode_to_nsresult(PRErrorCode error)
 {
   if (!error) {
-    MOZ_NOT_REACHED("Function failed without calling PR_GetError");
+    MOZ_CRASH("Function failed without calling PR_GetError");
     return NS_ERROR_UNEXPECTED;
   }
 
   // From NSSErrorsService::GetXPCOMFromNSSError
   // XXX Don't make up nsresults, it's supposed to be an enum (bug 778113)
   return (nsresult)NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY,
                                              -1 * error);
 }
--- a/security/manager/ssl/src/nsUsageArrayHelper.cpp
+++ b/security/manager/ssl/src/nsUsageArrayHelper.cpp
@@ -63,17 +63,17 @@ nsUsageArrayHelper::check(uint32_t previ
                           CertVerifier * certVerifier,
                           SECCertificateUsage aCertUsage,
                           PRTime time,
                           CertVerifier::Flags flags,
                           uint32_t &aCounter,
                           PRUnichar **outUsages)
 {
   if (!aCertUsage) {
-    MOZ_NOT_REACHED("caller should have supplied non-zero aCertUsage");
+    MOZ_CRASH("caller should have supplied non-zero aCertUsage");
     return nsIX509Cert::NOT_VERIFIED_UNKNOWN;
   }
 
   if (isFatalError(previousCheckResult)) {
       return previousCheckResult;
   }
 
   nsAutoCString typestr;
@@ -110,17 +110,17 @@ nsUsageArrayHelper::check(uint32_t previ
     break;
   case certificateUsageStatusResponder:
     typestr = "VerifyStatusResponder";
     break;
   case certificateUsageAnyCA:
     typestr = "VerifyAnyCA";
     break;
   default:
-    MOZ_NOT_REACHED("unknown cert usage passed to check()");
+    MOZ_CRASH("unknown cert usage passed to check()");
     return nsIX509Cert::NOT_VERIFIED_UNKNOWN;
   }
 
   SECStatus rv = certVerifier->VerifyCert(mCert, aCertUsage,
                          time, nullptr /*XXX:wincx*/, flags);
 
   if (rv == SECSuccess) {
     typestr.Append(suffix);
--- a/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
+++ b/toolkit/components/ctypes/tests/jsctypes-test-finalizer.cpp
@@ -59,34 +59,34 @@ test_finalizer_acq_size_t(size_t i)
   return i;
 }
 
 // Release resource i
 void
 test_finalizer_rel_size_t(size_t i)
 {
   if (--gFinalizerTestResources[i] < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
 }
 
 size_t
 test_finalizer_rel_size_t_return_size_t(size_t i)
 {
   if (-- gFinalizerTestResources[i] < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   return i;
 }
 
 RECT
 test_finalizer_rel_size_t_return_struct_t(size_t i)
 {
   if (-- gFinalizerTestResources[i] < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   const int32_t narrowed = (int32_t)i;
   RECT result = { narrowed, narrowed, narrowed, narrowed };
   return result;
 }
 
 bool
 test_finalizer_cmp_size_t(size_t a, size_t b)
@@ -104,17 +104,17 @@ test_finalizer_acq_int32_t(size_t i)
   return i;
 }
 
 // Release resource i
 void
 test_finalizer_rel_int32_t(int32_t i)
 {
   if (--gFinalizerTestResources[i] < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
 }
 
 bool
 test_finalizer_cmp_int32_t(int32_t a, int32_t b)
 {
   return a==b;
 }
@@ -129,17 +129,17 @@ test_finalizer_acq_int64_t(size_t i)
   return i;
 }
 
 // Release resource i
 void
 test_finalizer_rel_int64_t(int64_t i)
 {
   if (-- gFinalizerTestResources[i] < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
 }
 
 bool
 test_finalizer_cmp_int64_t(int64_t a, int64_t b)
 {
   return a==b;
 }
@@ -156,17 +156,17 @@ test_finalizer_acq_ptr_t(size_t i)
 
 // Release resource i
 void
 test_finalizer_rel_ptr_t(void *i)
 {
   int *as_int = (int*)i;
   -- (*as_int);
   if (*as_int < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
 }
 
 bool
 test_finalizer_cmp_ptr_t(void *a, void *b)
 {
   return a==b;
 }
@@ -182,17 +182,17 @@ test_finalizer_acq_int32_ptr_t(size_t i)
 }
 
 // Release resource i
 void
 test_finalizer_rel_int32_ptr_t(int32_t *i)
 {
   -- (*i);
   if (*i < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
 }
 
 bool
 test_finalizer_cmp_int32_ptr_t(int32_t *a, int32_t *b)
 {
   return a==b;
 }
@@ -207,17 +207,17 @@ test_finalizer_acq_null_t(size_t i)
   return NULL;
 }
 
 // Release resource i
 void
 test_finalizer_rel_null_t(void *i)
 {
   if (i != NULL) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   gFinalizerTestResources[0] --;
 }
 
 bool
 test_finalizer_null_resource_is_acquired(size_t)
 {
   return gFinalizerTestResources[0] == 1;
@@ -246,17 +246,17 @@ test_finalizer_acq_string_t(int i)
 }
 
 // Release resource i
 void
 test_finalizer_rel_string_t(char *i)
 {
   int index = atoi(i);
   if (index < 0 || index >= (int)gFinalizerTestSize) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   gFinalizerTestResources[index] --;
 }
 
 bool
 test_finalizer_string_resource_is_acquired(size_t i)
 {
   return gFinalizerTestResources[i] == 1;
@@ -280,27 +280,27 @@ test_finalizer_acq_struct_t(int i)
 }
 
 // Release resource i
 void
 test_finalizer_rel_struct_t(RECT i)
 {
   int index = i.top;
   if (index < 0 || index >= (int)gFinalizerTestSize) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   gFinalizerTestResources[index] --;
 }
 
 bool
 test_finalizer_struct_resource_is_acquired(RECT i)
 {
   int index = i.top;
   if (index < 0 || index >= (int)gFinalizerTestSize) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   return gFinalizerTestResources[index] == 1;
 }
 
 bool
 test_finalizer_cmp_struct_t(RECT a, RECT b)
 {
   return a.top == b.top;
@@ -311,17 +311,17 @@ afun* test_finalizer_rel_null_function()
 {
   return NULL;
 }
 
 void
 test_finalizer_rel_size_t_set_errno(size_t i)
 {
   if (-- gFinalizerTestResources[i] < 0) {
-    MOZ_NOT_REACHED("Assertion failed");
+    MOZ_CRASH("Assertion failed");
   }
   errno = 10;
 }
 
 void
 reset_errno()
 {
   errno = 0;
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -666,17 +666,17 @@ JSHistogram_Snapshot(JSContext *cx, unsi
     return JS_FALSE;
   case REFLECT_CORRUPT:
     JS_ReportError(cx, "Histogram is corrupt");
     return JS_FALSE;
   case REFLECT_OK:
     JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(snapshot));
     return JS_TRUE;
   default:
-    MOZ_NOT_REACHED("unhandled reflection status");
+    MOZ_CRASH("unhandled reflection status");
     return JS_FALSE;
   }
 }
 
 JSBool
 JSHistogram_Clear(JSContext *cx, unsigned argc, JS::Value *vp)
 {
   JSObject *obj = JS_THIS_OBJECT(cx, vp);
--- a/toolkit/identity/IdentityCryptoService.cpp
+++ b/toolkit/identity/IdentityCryptoService.cpp
@@ -354,17 +354,17 @@ GenerateKeyPair(PK11SlotInfo * slot,
                                      NULL /*&pwdata*/);
   if (!*privateKey) {
     MOZ_ASSERT(!*publicKey);
     return PRErrorCode_to_nsresult(PR_GetError());
   }
   if (!*publicKey) {
 	SECKEY_DestroyPrivateKey(*privateKey);
 	*privateKey = NULL;
-    MOZ_NOT_REACHED("PK11_GnerateKeyPair returned private key without public "
+    MOZ_CRASH("PK11_GnerateKeyPair returned private key without public "
                     "key");
     return NS_ERROR_UNEXPECTED;
   }
 
   return NS_OK;
 }
 
 
@@ -463,17 +463,17 @@ KeyGenRunnable::Run()
         switch (mKeyType) {
         case rsaKey:
           mRv = GenerateRSAKeyPair(slot, &privk, &pubk);
           break;
         case dsaKey:
           mRv = GenerateDSAKeyPair(slot, &privk, &pubk);
           break;
         default:
-          MOZ_NOT_REACHED("unknown key type");
+          MOZ_CRASH("unknown key type");
           mRv = NS_ERROR_UNEXPECTED;
         }
 
         PK11_FreeSlot(slot);
 
         if (NS_SUCCEEDED(mRv)) {
           MOZ_ASSERT(privk);
           MOZ_ASSERT(pubk);
--- a/widget/cocoa/nsChildView.mm
+++ b/widget/cocoa/nsChildView.mm
@@ -4839,17 +4839,17 @@ static int32_t RoundUp(double aDouble)
 - (void)keyDown:(NSEvent*)theEvent
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
 #if !defined(RELEASE_BUILD) || defined(DEBUG)
   if (mGeckoChild &&
       mGeckoChild->GetInputContext().IsPasswordEditor() !=
         TextInputHandler::IsSecureEventInputEnabled()) {
-    MOZ_NOT_REACHED("in wrong secure input mode");
+    MOZ_CRASH("in wrong secure input mode");
   }
 #endif // #if !defined(RELEASE_BUILD) || defined(DEBUG)
 
   if (mGeckoChild && mTextInputHandler && mIsPluginView) {
     mTextInputHandler->HandleKeyDownEventForPlugin(theEvent);
     return;
   }
 
--- a/widget/gonk/nsWindow.cpp
+++ b/widget/gonk/nsWindow.cpp
@@ -169,17 +169,17 @@ nsWindow::nsWindow()
         case nsIScreen::ROTATION_0_DEG:
             break;
         case nsIScreen::ROTATION_180_DEG:
             sRotationMatrix.Translate(gfxPoint(gScreenBounds.width,
                                                gScreenBounds.height));
             sRotationMatrix.Rotate(M_PI);
             break;
         default:
-            MOZ_NOT_REACHED("Unknown rotation");
+            MOZ_CRASH("Unknown rotation");
             break;
         }
         sVirtualBounds = gScreenBounds;
 
         sScreenInitialized = true;
 
         nsAppShell::NotifyScreenInitialized();
 
@@ -842,17 +842,17 @@ ComputeOrientation(uint32_t aRotation, c
                 eScreenOrientation_PortraitPrimary);
     case nsIScreen::ROTATION_180_DEG:
         return (naturallyPortrait ? eScreenOrientation_PortraitSecondary : 
                 eScreenOrientation_LandscapeSecondary);
     case nsIScreen::ROTATION_270_DEG:
         return (naturallyPortrait ? eScreenOrientation_LandscapeSecondary : 
                 eScreenOrientation_PortraitSecondary);
     default:
-        MOZ_NOT_REACHED("Gonk screen must always have a known rotation");
+        MOZ_CRASH("Gonk screen must always have a known rotation");
         return eScreenOrientation_None;
     }
 }
 
 /*static*/ uint32_t
 nsScreenGonk::GetRotation()
 {
     return sScreenRotation;
--- a/widget/gtk2/nsGtkKeyUtils.cpp
+++ b/widget/gtk2/nsGtkKeyUtils.cpp
@@ -491,17 +491,17 @@ KeymapWrapper::InitBySystemSettings()
                 break;
             case INDEX_LEVEL3:
                 modifier = LEVEL3;
                 break;
             case INDEX_LEVEL5:
                 modifier = LEVEL5;
                 break;
             default:
-                MOZ_NOT_REACHED("All indexes must be handled here");
+                MOZ_CRASH("All indexes must be handled here");
                 break;
         }
         for (uint32_t j = 0; j < ArrayLength(mod); j++) {
             if (modifier == mod[j]) {
                 mModifierMasks[i] |= 1 << (j + 3);
             }
         }
     }
--- a/widget/os2/nsWindow.cpp
+++ b/widget/os2/nsWindow.cpp
@@ -2521,17 +2521,17 @@ PlatformToNSAttr(uint8_t aAttr)
 
     case CP_ATTR_TARGET_NOTCONVERTED:
       return NS_TEXTRANGE_SELECTEDRAWTEXT;
 
     case CP_ATTR_TARGET_CONVERTED:
       return NS_TEXTRANGE_SELECTEDCONVERTEDTEXT;
 
     default:
-      MOZ_NOT_REACHED("unknown attribute");
+      MOZ_CRASH("unknown attribute");
       return NS_TEXTRANGE_RAWINPUT;
   }
 }
 
 bool nsWindow::ImeConversionString(HIMI himi)
 {
   ULONG ulBufLen;
   // Get a buffer size
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -492,17 +492,17 @@ NativeKey::NativeKey(nsWindowBase* aWidg
             mVirtualKeyCode = VK_RMENU;
             break;
           case VK_SHIFT:
             // Neither left shift nor right shift is not an extended key,
             // let's use VK_LSHIFT for invalid scan code.
             mVirtualKeyCode = VK_LSHIFT;
             break;
           default:
-            MOZ_NOT_REACHED("Unsupported mOriginalVirtualKeyCode");
+            MOZ_CRASH("Unsupported mOriginalVirtualKeyCode");
             break;
         }
         break;
       }
 
       NS_ASSERTION(!mVirtualKeyCode,
                    "mVirtualKeyCode has been computed already");
 
@@ -529,34 +529,34 @@ NativeKey::NativeKey(nsWindowBase* aWidg
         case VK_SHIFT:
           if (mVirtualKeyCode != VK_LSHIFT && mVirtualKeyCode != VK_RSHIFT) {
             // Neither left shift nor right shift is not an extended key,
             // let's use VK_LSHIFT for invalid scan code.
             mVirtualKeyCode = VK_LSHIFT;
           }
           break;
         default:
-          MOZ_NOT_REACHED("Unsupported mOriginalVirtualKeyCode");
+          MOZ_CRASH("Unsupported mOriginalVirtualKeyCode");
           break;
       }
       break;
     }
     case WM_CHAR:
     case WM_UNICHAR:
     case WM_SYSCHAR:
       // We cannot compute the virtual key code from WM_CHAR message on WinXP
       // if it's caused by an extended key.
       if (!canComputeVirtualKeyCodeFromScanCode) {
         break;
       }
       mVirtualKeyCode = mOriginalVirtualKeyCode =
         ComputeVirtualKeyCodeFromScanCodeEx();
       break;
     default:
-      MOZ_NOT_REACHED("Unsupported message");
+      MOZ_CRASH("Unsupported message");
       break;
   }
 
   if (!mVirtualKeyCode) {
     mVirtualKeyCode = mOriginalVirtualKeyCode;
   }
 
   mDOMKeyCode =
@@ -732,17 +732,17 @@ NativeKey::InitKeyEvent(nsKeyEvent& aKey
       // technologies such as Window-Eyes and ZoomText or for switching open
       // state of IME.
       aKeyEvent.mFlags.mDefaultPrevented =
         (mOriginalVirtualKeyCode == VK_MENU && mMsg.message != WM_SYSKEYUP);
       break;
     case NS_KEY_PRESS:
       break;
     default:
-      MOZ_NOT_REACHED("Invalid event message");
+      MOZ_CRASH("Invalid event message");
       break;
   }
 
   aKeyEvent.mKeyNameIndex = mKeyNameIndex;
   aKeyEvent.location = GetKeyLocation();
   aModKeyState.InitInputEvent(aKeyEvent);
 }
 
@@ -1064,17 +1064,17 @@ NativeKey::RemoveFollowingCharMessage() 
 
   if (mIsFakeCharMsg) {
     return mCharMsg;
   }
 
   MSG msg;
   if (!WinUtils::GetMessage(&msg, mMsg.hwnd,
                             mCharMsg.message, mCharMsg.message)) {
-    MOZ_NOT_REACHED("We lost the following char message");
+    MOZ_CRASH("We lost the following char message");
     return mCharMsg;
   }
 
   MOZ_ASSERT(mCharMsg.message == msg.message &&
              mCharMsg.wParam == msg.wParam &&
              mCharMsg.lParam == msg.lParam);
 
   return mCharMsg;
--- a/widget/windows/KeyboardLayout.h
+++ b/widget/windows/KeyboardLayout.h
@@ -372,17 +372,17 @@ private:
   // any modifier keys.  Otherwise, false.
   // Please note that the event may not cause any text input even if this
   // is true.  E.g., it might be dead key state or Ctrl key may be pressed.
   bool    mIsPrintableKey;
   bool    mIsFakeCharMsg;
 
   NativeKey()
   {
-    MOZ_NOT_REACHED("The default constructor of NativeKey isn't available");
+    MOZ_CRASH("The default constructor of NativeKey isn't available");
   }
 
   UINT GetScanCodeWithExtendedFlag() const;
 
   // The result is one of nsIDOMKeyEvent::DOM_KEY_LOCATION_*.
   uint32_t GetKeyLocation() const;
 
   /**
--- a/widget/windows/nsTextStore.cpp
+++ b/widget/windows/nsTextStore.cpp
@@ -1019,17 +1019,17 @@ nsTextStore::FlushPendingActions()
         selectionSet.mOffset = 
           static_cast<uint32_t>(action.mSelectionStart);
         selectionSet.mLength =
           static_cast<uint32_t>(action.mSelectionLength);
         selectionSet.mReversed = action.mSelectionReversed;
         break;
       }
       default:
-        MOZ_NOT_REACHED("unexpected action type");
+        MOZ_CRASH("unexpected action type");
         break;
     }
 
     if (mWidget && !mWidget->Destroyed()) {
       continue;
     }
 
     mComposition.EnsureLayoutChangeTimerStopped();
--- a/widget/xpwidgets/WidgetUtils.cpp
+++ b/widget/xpwidgets/WidgetUtils.cpp
@@ -25,15 +25,15 @@ ComputeTransformForRotation(const nsIntR
         transform.Translate(gfxPoint(aBounds.width, aBounds.height));
         transform.Rotate(M_PI);
         break;
     case ROTATION_270:
         transform.Translate(gfxPoint(0, aBounds.height));
         transform.Rotate(M_PI * 3 / 2);
         break;
     default:
-        MOZ_NOT_REACHED("Unknown rotation");
+        MOZ_CRASH("Unknown rotation");
         break;
     }
     return transform;
 }
 
 } // namespace mozilla
--- a/xpcom/ds/nsAtomTable.cpp
+++ b/xpcom/ds/nsAtomTable.cpp
@@ -479,17 +479,17 @@ NS_SizeOfAtomTablesIncludingThis(MallocS
 }
 
 #define ATOM_HASHTABLE_INITIAL_SIZE  4096
 
 static void HandleOOM()
 {
   fputs("Out of memory allocating atom hashtable.\n", stderr);
   MOZ_CRASH();
-  MOZ_NOT_REACHED();
+  MOZ_CRASH();
 }
 
 static inline void
 EnsureTableExists()
 {
   if (!gAtomTable.ops &&
       !PL_DHashTableInit(&gAtomTable, &AtomTableOps, 0,
                          sizeof(AtomTableEntry), ATOM_HASHTABLE_INITIAL_SIZE)) {
--- a/xpcom/glue/nsISupportsImpl.h
+++ b/xpcom/glue/nsISupportsImpl.h
@@ -61,17 +61,17 @@ private:
 };
 
 #define NS_DECL_OWNINGTHREAD            nsAutoOwningThread _mOwningThread;
 #define NS_ASSERT_OWNINGTHREAD(_class) \
   NS_CheckThreadSafe(_mOwningThread.GetThread(), #_class " not thread-safe")
 #define NS_ASSERT_OWNINGTHREAD_AND_NOT_CCTHREAD(_class) \
   do { \
     if (NS_IsCycleCollectorThread()) { \
-      MOZ_NOT_REACHED("Changing refcount of " #_class " object during Traverse is " \
+      MOZ_CRASH("Changing refcount of " #_class " object during Traverse is " \
                       "not permitted!"); \
     } \
     else { \
       NS_ASSERT_OWNINGTHREAD(_class); \
     } \
   } while (0)
 
 #else // !DEBUG
--- a/xpcom/glue/nsTArray.h
+++ b/xpcom/glue/nsTArray.h
@@ -260,17 +260,17 @@ struct nsTArrayInfallibleAllocator : nsT
   static void SizeTooBig() {
     HandleOOM();
   }
 
 private:
   static void HandleOOM() {
     fputs("Out of memory allocating nsTArray buffer.\n", stderr);
     MOZ_CRASH();
-    MOZ_NOT_REACHED();
+    MOZ_CRASH();
   }
 };
 
 #endif
 
 // nsTArray_base stores elements into the space allocated beyond
 // sizeof(*this).  This is done to minimize the size of the nsTArray
 // object when it is empty.