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.
This commit is contained in:
Justin Lebar 2013-06-28 18:38:30 -07:00
parent e3cf7e4acc
commit 75c400493b
126 changed files with 318 additions and 318 deletions

View File

@ -680,7 +680,7 @@ getRoleCB(AtkObject *aAtkObj)
switch (accWrap->Role()) {
#include "RoleMap.h"
default:
MOZ_NOT_REACHED("Unknown role.");
MOZ_CRASH("Unknown role.");
aAtkObj->role = ATK_ROLE_UNKNOWN;
};

View File

@ -394,7 +394,7 @@ nsTextEquivUtils::GetRoleRule(role aRole)
switch (aRole) {
#include "RoleMap.h"
default:
MOZ_NOT_REACHED("Unknown role.");
MOZ_CRASH("Unknown role.");
}
#undef ROLE

View File

@ -378,7 +378,7 @@ AccessibleWrap::get_accRole(
switch (geckoRole) {
#include "RoleMap.h"
default:
MOZ_NOT_REACHED("Unknown role.");
MOZ_CRASH("Unknown role.");
};
#undef ROLE
@ -1181,7 +1181,7 @@ AccessibleWrap::role(long *aRole)
switch (geckoRole) {
#include "RoleMap.h"
default:
MOZ_NOT_REACHED("Unknown role.");
MOZ_CRASH("Unknown role.");
};
#undef ROLE

View File

@ -840,7 +840,7 @@ nsExpandedPrincipal::CheckMayLoad(nsIURI* uri, bool aReport, bool aAllowIfInheri
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;
}

View File

@ -2708,7 +2708,7 @@ public:
EncodeTextFragment(u.mTextFragment, aOut);
break;
default:
MOZ_NOT_REACHED("Unknown unit type?");
MOZ_CRASH("Unknown unit type?");
}
}
}

View File

@ -308,7 +308,7 @@ nsAttrValue::SetTo(const nsAttrValue& aOther)
}
case eCSSStyleRule:
{
MOZ_NOT_REACHED("These should be refcounted!");
MOZ_CRASH("These should be refcounted!");
break;
}
case eURL:

View File

@ -1452,5 +1452,5 @@ nsContentSubtreeIterator::GetTopAncestorInRange(nsINode* aNode)
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");
}

View File

@ -8475,7 +8475,7 @@ nsDocument::MaybePreLoadImage(nsIURI* uri, const nsAString &aCrossOriginAttr)
break;
default:
/* should never happen */
MOZ_NOT_REACHED("Unknown CORS mode!");
MOZ_CRASH("Unknown CORS mode!");
}
// Image not in cache - trigger preload
@ -11148,7 +11148,7 @@ nsDocument::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
// 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;
}

View File

@ -2993,7 +2993,7 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
case nsIPluginTag::STATE_CLICKTOPLAY:
return false;
}
MOZ_NOT_REACHED("Unexpected enabledState");
MOZ_CRASH("Unexpected enabledState");
return false;
}

View File

@ -1318,7 +1318,7 @@ WrapStyle(JSContext* cx, JSObject* objArg,
break;
}
default:
MOZ_NOT_REACHED("unexpected CanvasMultiGetterType");
MOZ_CRASH("unexpected CanvasMultiGetterType");
}
if (!ok) {
error.Throw(NS_ERROR_FAILURE);
@ -2638,7 +2638,7 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
anchorY = -fontMetrics.emDescent;
break;
default:
MOZ_NOT_REACHED("unexpected TextBaseline");
MOZ_CRASH("unexpected TextBaseline");
}
processor.mPt.y += anchorY;

View File

@ -5509,7 +5509,7 @@ WebGLTexelFormat mozilla::GetWebGLTexelFormat(GLenum format, GLenum type)
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) {
@ -5517,7 +5517,7 @@ WebGLTexelFormat mozilla::GetWebGLTexelFormat(GLenum format, GLenum 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;
}

View File

@ -118,7 +118,7 @@ WebGLFramebuffer::Attachment::IsComplete() const {
format == LOCAL_GL_RGB ||
format == LOCAL_GL_RGBA);
}
MOZ_NOT_REACHED("Invalid WebGL attachment poin?");
MOZ_CRASH("Invalid WebGL attachment poin?");
}
if (mRenderbufferPtr) {
@ -139,7 +139,7 @@ WebGLFramebuffer::Attachment::IsComplete() const {
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

View File

@ -140,7 +140,7 @@ TextComposition::CompositionEventDispatcher::Run()
break;
}
default:
MOZ_NOT_REACHED("Unsupported event");
MOZ_CRASH("Unsupported event");
break;
}
return NS_OK;

View File

@ -141,7 +141,7 @@ nsDOMMouseEvent::InitMouseEvent(const nsAString& aType,
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;
}
}
@ -242,7 +242,7 @@ nsDOMMouseEvent::Buttons()
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;
}
}

View File

@ -362,7 +362,7 @@ nsDOMUIEvent::IsChar() const
default:
return false;
}
MOZ_NOT_REACHED("Switch handles all cases.");
MOZ_CRASH("Switch handles all cases.");
}
NS_IMETHODIMP

View File

@ -1495,7 +1495,7 @@ nsEventStateManager::DispatchCrossProcessEvent(nsEvent* 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;
}
}
@ -2520,7 +2520,7 @@ nsEventStateManager::DispatchLegacyMouseScrollEvents(nsIFrame* aTargetFrame,
break;
default:
MOZ_NOT_REACHED("Invalid deltaMode value comes");
MOZ_CRASH("Invalid deltaMode value comes");
return;
}
@ -2847,7 +2847,7 @@ nsEventStateManager::DoScrollText(nsIScrollableFrame* aScrollableFrame,
origin = nsGkAtoms::pixels;
break;
default:
MOZ_NOT_REACHED("Invalid deltaMode value comes");
MOZ_CRASH("Invalid deltaMode value comes");
return;
}
@ -2892,7 +2892,7 @@ nsEventStateManager::DoScrollText(nsIScrollableFrame* aScrollableFrame,
mode = nsIScrollableFrame::SMOOTH;
break;
default:
MOZ_NOT_REACHED("Invalid scrollType value comes");
MOZ_CRASH("Invalid scrollType value comes");
return;
}

View File

@ -587,10 +587,10 @@ nsIMEStateManager::NotifyIME(NotificationToIME aNotification,
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");
}
@ -1049,7 +1049,7 @@ nsIMEStateManager::IsEditableIMEState(nsIWidget* aWidget)
case widget::IMEState::DISABLED:
return false;
default:
MOZ_NOT_REACHED("Unknown IME enable state");
MOZ_CRASH("Unknown IME enable state");
return false;
}
}

View File

@ -662,21 +662,21 @@ SinkContext::OpenContainer(const nsIParserNode& aNode)
// 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:
@ -783,11 +783,11 @@ SinkContext::CloseContainer(const nsHTMLTag aTag)
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:
@ -801,12 +801,12 @@ SinkContext::CloseContainer(const nsHTMLTag aTag)
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;
@ -855,7 +855,7 @@ SinkContext::AddLeaf(const nsIParserNode& aNode)
// 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;
@ -1751,7 +1751,7 @@ HTMLContentSink::OpenContainer(const nsIParserNode& aNode)
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:
@ -1776,7 +1776,7 @@ HTMLContentSink::OpenContainer(const nsIParserNode& aNode)
}
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:
@ -1794,7 +1794,7 @@ HTMLContentSink::CloseContainer(const eHTMLTags aTag)
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:
@ -1807,7 +1807,7 @@ HTMLContentSink::CloseContainer(const eHTMLTags aTag)
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:
@ -1833,7 +1833,7 @@ HTMLContentSink::AddLeaf(const nsIParserNode& aNode)
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:

View File

@ -255,7 +255,7 @@ DOMMediaStream::CreateDOMTrack(TrackID aTrackID, MediaSegment::Type aType)
mTrackTypesAvailable |= HINT_CONTENTS_VIDEO;
break;
default:
MOZ_NOT_REACHED("Unhandled track type");
MOZ_CRASH("Unhandled track type");
return nullptr;
}
mTracks.AppendElement(track);

View File

@ -1837,7 +1837,7 @@ MediaStream::ApplyTrackDisabling(TrackID aTrackID, MediaSegment* aSegment)
break;
}
default:
MOZ_NOT_REACHED("Unknown track type");
MOZ_CRASH("Unknown track type");
break;
}
}

View File

@ -233,7 +233,7 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
break;
default:
MOZ_NOT_REACHED("Invalid encode state");
MOZ_CRASH("Invalid encode state");
break;
}
}

View File

@ -220,7 +220,7 @@ OpusTrackEncoder::GetHeader(nsTArray<uint8_t>* aOutput)
// No more headers.
break;
default:
MOZ_NOT_REACHED("Invalid state");
MOZ_CRASH("Invalid state");
break;
}
return NS_OK;

View File

@ -439,7 +439,7 @@ MediaDecodeTask::RunNextPhase()
break;
case PhaseEnum::Decode:
case PhaseEnum::Done:
MOZ_NOT_REACHED("Invalid phase Decode");
MOZ_CRASH("Invalid phase Decode");
break;
}
}

View File

@ -171,7 +171,7 @@ SpeechRecognition::Transition(SpeechEvent* aEvent)
AbortError(aEvent);
break;
case EVENT_COUNT:
MOZ_NOT_REACHED("Invalid event EVENT_COUNT");
MOZ_CRASH("Invalid event EVENT_COUNT");
}
break;
case STATE_STARTING:
@ -195,9 +195,9 @@ SpeechRecognition::Transition(SpeechEvent* 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:
@ -221,9 +221,9 @@ SpeechRecognition::Transition(SpeechEvent* 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:
@ -247,9 +247,9 @@ SpeechRecognition::Transition(SpeechEvent* 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:
@ -273,9 +273,9 @@ SpeechRecognition::Transition(SpeechEvent* 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:
@ -299,16 +299,16 @@ SpeechRecognition::Transition(SpeechEvent* aEvent)
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;

View File

@ -48,7 +48,7 @@ SpeechSynthesisChild::AllocPSpeechSynthesisRequest(const nsString& aText,
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;
}
@ -149,7 +149,7 @@ 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;
}
@ -157,7 +157,7 @@ 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;
}

View File

@ -2220,7 +2220,7 @@ nsSMILTimedElement::GetNextMilestone(nsSMILMilestone& aNextMilestone) const
case STATE_POSTACTIVE:
return false;
}
MOZ_NOT_REACHED("Invalid element state");
MOZ_CRASH("Invalid element state");
}
void
@ -2292,7 +2292,7 @@ nsSMILTimedElement::GetEffectiveBeginInstance() const
return prevInterval ? prevInterval->Begin() : nullptr;
}
}
MOZ_NOT_REACHED("Invalid element state");
MOZ_CRASH("Invalid element state");
}
const nsSMILInterval*

View File

@ -568,6 +568,6 @@ AudioChannelService::GetInternalType(AudioChannelType aType,
break;
}
MOZ_NOT_REACHED("unexpected audio channel type");
MOZ_CRASH("unexpected audio channel type");
return AUDIO_CHANNEL_INT_LAST;
}

View File

@ -95,7 +95,7 @@ DOMRequest::GetReadyState(nsAString& aReadyState)
aReadyState.AssignLiteral("done");
break;
default:
MOZ_NOT_REACHED("Unrecognized readyState.");
MOZ_CRASH("Unrecognized readyState.");
}
return NS_OK;

View File

@ -1816,7 +1816,7 @@ nsDOMClassInfo::Init()
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;
@ -1825,7 +1825,7 @@ nsDOMClassInfo::Init()
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;
@ -2027,7 +2027,7 @@ 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;
}
@ -3147,7 +3147,7 @@ DefineIDBInterfaceConstants(JSContext *cx, JS::Handle<JSObject*> obj, const nsII
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) {

View File

@ -198,7 +198,7 @@ nsScreen::GetMozOrientation(nsString& aOrientation)
break;
case eScreenOrientation_None:
default:
MOZ_NOT_REACHED("Unacceptable mOrientation value");
MOZ_CRASH("Unacceptable mOrientation value");
}
}
@ -371,7 +371,7 @@ nsScreen::MozLockOrientation(const Sequence<nsString>& aOrientations,
// 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;
}

View File

@ -5057,7 +5057,7 @@ class CGMethodCall(CGThing):
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")

View File

@ -93,7 +93,7 @@ struct DisallowedConversion {
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;
}
};

View File

@ -681,7 +681,7 @@ BluetoothService::HandleShutdown()
}
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 {

View File

@ -93,7 +93,7 @@ BluetoothUnixSocketConnector::SetUp(int aFd)
case BluetoothSocketType::SCO:
break;
default:
MOZ_NOT_REACHED("Unknown socket type!");
MOZ_CRASH("Unknown socket type!");
}
if (lm) {
@ -181,7 +181,7 @@ BluetoothUnixSocketConnector::Create()
fd = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_L2CAP);
break;
default:
MOZ_NOT_REACHED();
MOZ_CRASH();
}
if (fd < 0) {
@ -262,7 +262,7 @@ BluetoothUnixSocketConnector::GetSocketAddr(const sockaddr_any& aAddr,
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);
}

View File

@ -117,7 +117,7 @@ BluetoothChild::RecvNotificationsStopped()
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;
}

View File

@ -67,7 +67,7 @@ public:
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;
}
};
@ -232,11 +232,11 @@ BluetoothParent::RecvPBluetoothRequestConstructor(
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;
}

View File

@ -194,7 +194,7 @@ BluetoothServiceChildProcess::GetScoSocket(
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;
}
@ -203,7 +203,7 @@ 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;
}
@ -211,7 +211,7 @@ 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;
}
@ -364,28 +364,28 @@ BluetoothServiceChildProcess::HandleShutdown()
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;
}
@ -393,6 +393,6 @@ 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;
}

View File

@ -240,7 +240,7 @@ void FMRadio::Notify(const FMRadioOperationInformation& info)
DispatchTrustedEvent(RADIO_SEEK_COMPLETE_EVENT_NAME);
break;
default:
MOZ_NOT_REACHED();
MOZ_CRASH();
return;
}
}

View File

@ -254,7 +254,7 @@ AsyncConnectionHelper::Run()
}
default:
MOZ_NOT_REACHED("Unknown value for ChildProcessSendResult!");
MOZ_CRASH("Unknown value for ChildProcessSendResult!");
}
NS_ASSERTION(gCurrentTransaction == mTransaction, "Should be unchanged!");

View File

@ -136,7 +136,7 @@ public:
const ResponseValue& aResponseValue)
MOZ_OVERRIDE
{
MOZ_NOT_REACHED("Should never get here!");
MOZ_CRASH("Should never get here!");
return NS_ERROR_UNEXPECTED;
}
@ -869,7 +869,7 @@ nsresult
NoRequestDatabaseHelper::UnpackResponseFromParentProcess(
const ResponseValue& aResponseValue)
{
MOZ_NOT_REACHED("Should never get here!");
MOZ_CRASH("Should never get here!");
return NS_ERROR_UNEXPECTED;
}

View File

@ -1479,7 +1479,7 @@ protected:
const ResponseValue& aResponseValue)
MOZ_OVERRIDE
{
MOZ_NOT_REACHED("Should never get here!");
MOZ_CRASH("Should never get here!");
return NS_ERROR_UNEXPECTED;
}
@ -1559,7 +1559,7 @@ protected:
const ResponseValue& aResponseValue)
MOZ_OVERRIDE
{
MOZ_NOT_REACHED("Should never get here!");
MOZ_CRASH("Should never get here!");
return NS_ERROR_UNEXPECTED;
}

View File

@ -73,7 +73,7 @@ public:
AppendLiteral("\"versionchange\"");
break;
default:
MOZ_NOT_REACHED("Unknown mode!");
MOZ_CRASH("Unknown mode!");
};
}
@ -154,7 +154,7 @@ public:
AppendLiteral("\"prevunique\"");
break;
default:
MOZ_NOT_REACHED("Unknown direction!");
MOZ_CRASH("Unknown direction!");
};
}
};

View File

@ -226,7 +226,7 @@ IndexedDBChild::DeallocPIndexedDBDatabase(PIndexedDBDatabaseChild* aActor)
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;
}
@ -649,7 +649,7 @@ IndexedDBTransactionChild::RecvComplete(const CompleteParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown union type!");
MOZ_CRASH("Unknown union type!");
return false;
}
@ -661,7 +661,7 @@ 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;
}
@ -760,7 +760,7 @@ 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;
}
@ -776,7 +776,7 @@ 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;
}
@ -892,7 +892,7 @@ IndexedDBIndexChild::RecvPIndexedDBCursorConstructor(
break;
default:
MOZ_NOT_REACHED("Unknown union type!");
MOZ_CRASH("Unknown union type!");
return false;
}
@ -903,7 +903,7 @@ IndexedDBIndexChild::RecvPIndexedDBCursorConstructor(
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;
}
@ -981,7 +981,7 @@ IndexedDBCursorChild::ActorDestroy(ActorDestroyReason aWhy)
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;
}
@ -1034,7 +1034,7 @@ IndexedDBRequestChildBase::Disconnect()
bool
IndexedDBRequestChildBase::Recv__delete__(const ResponseValue& aResponse)
{
MOZ_NOT_REACHED("This should be overridden!");
MOZ_CRASH("This should be overridden!");
return false;
}
@ -1093,7 +1093,7 @@ IndexedDBObjectStoreRequestChild::Recv__delete__(const ResponseValue& aResponse)
break;
default:
MOZ_NOT_REACHED("Received invalid response parameters!");
MOZ_CRASH("Received invalid response parameters!");
return false;
}
@ -1152,7 +1152,7 @@ IndexedDBIndexRequestChild::Recv__delete__(const ResponseValue& aResponse)
break;
default:
MOZ_NOT_REACHED("Received invalid response parameters!");
MOZ_CRASH("Received invalid response parameters!");
return false;
}
@ -1196,7 +1196,7 @@ IndexedDBCursorRequestChild::Recv__delete__(const ResponseValue& aResponse)
break;
default:
MOZ_NOT_REACHED("Received invalid response parameters!");
MOZ_CRASH("Received invalid response parameters!");
return false;
}
@ -1282,14 +1282,14 @@ IPCOpenDatabaseHelper::UnpackResponseFromParentProcess(
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;
}
@ -1311,14 +1311,14 @@ IPCSetVersionHelper::UnpackResponseFromParentProcess(
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;
}
@ -1343,14 +1343,14 @@ 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;
}
@ -1364,6 +1364,6 @@ IPCDeleteDatabaseHelper::GetSuccessResult(JSContext* aCx, JS::MutableHandle<JS::
nsresult
IPCDeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
{
MOZ_NOT_REACHED("Don't call me!");
MOZ_CRASH("Don't call me!");
return NS_ERROR_FAILURE;
}

View File

@ -310,7 +310,7 @@ IndexedDBDatabaseParent::HandleEvent(nsIDOMEvent* aEvent)
return NS_OK;
}
MOZ_NOT_REACHED("Unexpected message!");
MOZ_CRASH("Unexpected message!");
return NS_ERROR_UNEXPECTED;
}
@ -413,7 +413,7 @@ IndexedDBDatabaseParent::HandleRequestEvent(nsIDOMEvent* aEvent,
nsAutoTArray<nsString, 20> objectStoreNames;
if (!dbInfo->GetObjectStoreNames(objectStoreNames)) {
MOZ_NOT_REACHED("This should never fail!");
MOZ_CRASH("This should never fail!");
}
InfallibleTArray<ObjectStoreInfoGuts> objectStoreInfos;
@ -510,7 +510,7 @@ IndexedDBDatabaseParent::HandleRequestEvent(nsIDOMEvent* aEvent,
return NS_OK;
}
MOZ_NOT_REACHED("Unexpected message type!");
MOZ_CRASH("Unexpected message type!");
return NS_ERROR_UNEXPECTED;
}
@ -556,7 +556,7 @@ IndexedDBDatabaseParent::HandleDatabaseEvent(nsIDOMEvent* aEvent,
return NS_OK;
}
MOZ_NOT_REACHED("Unexpected message type!");
MOZ_CRASH("Unexpected message type!");
return NS_ERROR_UNEXPECTED;
}
@ -780,7 +780,7 @@ IndexedDBTransactionParent::RecvAllRequestsFinished()
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;
}
@ -824,11 +824,11 @@ IndexedDBTransactionParent::RecvPIndexedDBObjectStoreConstructor(
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;
}
@ -1029,11 +1029,11 @@ IndexedDBCursorParent::RecvPIndexedDBRequestConstructor(
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;
}
@ -1086,7 +1086,7 @@ IndexedDBObjectStoreParent::ActorDestroy(ActorDestroyReason aWhy)
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;
}
@ -1139,11 +1139,11 @@ IndexedDBObjectStoreParent::RecvPIndexedDBRequestConstructor(
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;
}
@ -1183,11 +1183,11 @@ IndexedDBObjectStoreParent::RecvPIndexedDBIndexConstructor(
}
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;
}
@ -1225,7 +1225,7 @@ 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;
}
@ -1415,11 +1415,11 @@ IndexedDBIndexParent::RecvPIndexedDBRequestConstructor(
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;
}
@ -1440,7 +1440,7 @@ 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;
}
@ -1572,7 +1572,7 @@ IndexedDBObjectStoreRequestParent::GetAll(const GetAllParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -1712,7 +1712,7 @@ IndexedDBObjectStoreRequestParent::Count(const CountParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -1752,7 +1752,7 @@ IndexedDBObjectStoreRequestParent::OpenCursor(const OpenCursorParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -1875,7 +1875,7 @@ IndexedDBIndexRequestParent::GetAll(const GetAllParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -1915,7 +1915,7 @@ IndexedDBIndexRequestParent::GetAllKeys(const GetAllKeysParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -1953,7 +1953,7 @@ IndexedDBIndexRequestParent::Count(const CountParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -1993,7 +1993,7 @@ IndexedDBIndexRequestParent::OpenCursor(const OpenCursorParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -2035,7 +2035,7 @@ IndexedDBIndexRequestParent::OpenKeyCursor(const OpenKeyCursorParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown param type!");
MOZ_CRASH("Unknown param type!");
return false;
}
@ -2202,6 +2202,6 @@ IndexedDBDeleteDatabaseRequestParent::SetOpenRequest(
NS_IMETHODIMP
WeakEventListenerBase::HandleEvent(nsIDOMEvent* aEvent)
{
MOZ_NOT_REACHED("This must be overridden!");
MOZ_CRASH("This must be overridden!");
return NS_ERROR_FAILURE;
}

View File

@ -90,7 +90,7 @@ public:
{
// 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;
}
@ -626,7 +626,7 @@ BlobTraits<Parent>::BaseType::NoteRunnableCompleted(
}
}
MOZ_NOT_REACHED("Runnable not in our array!");
MOZ_CRASH("Runnable not in our array!");
}
template <ActorFlavorEnum ActorFlavor>
@ -1079,7 +1079,7 @@ Blob<ActorFlavor>::Create(const ConstructorParamsType& aParams)
}
default:
MOZ_NOT_REACHED("Unknown params!");
MOZ_CRASH("Unknown params!");
}
return nullptr;
@ -1185,13 +1185,13 @@ Blob<ActorFlavor>::CreateRemoteBlob(const ConstructorParamsType& aParams)
}
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();
@ -1278,7 +1278,7 @@ Blob<ActorFlavor>::RecvResolveMystery(const ResolveMysteryParams& aParams)
}
default:
MOZ_NOT_REACHED("Unknown params!");
MOZ_CRASH("Unknown params!");
}
return true;

View File

@ -846,10 +846,10 @@ 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
}
@ -861,7 +861,7 @@ ContentChild::DeallocPBluetooth(PBluetoothChild* aActor)
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
}
@ -870,7 +870,7 @@ 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;

View File

@ -1992,7 +1992,7 @@ ContentParent::AllocPBluetooth()
}
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
}
@ -2004,7 +2004,7 @@ ContentParent::DeallocPBluetooth(PBluetoothParent* aActor)
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
}
@ -2018,7 +2018,7 @@ ContentParent::RecvPBluetoothConstructor(PBluetoothParent* aActor)
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
}

View File

@ -49,7 +49,7 @@ Read(JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
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);
@ -82,7 +82,7 @@ Read(JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
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);

View File

@ -366,7 +366,7 @@ MmsMessage::GetDelivery(nsAString& aDelivery)
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;
}
@ -409,7 +409,7 @@ MmsMessage::GetDeliveryStatus(JSContext* aCx, JS::Value* aDeliveryStatus)
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);

View File

@ -92,7 +92,7 @@ MobileMessageCallback::NotifyError(int32_t aError)
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;
}

View File

@ -48,7 +48,7 @@ MobileMessageCursorCallback::NotifyCursorError(int32_t aError)
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;
}

View File

@ -186,7 +186,7 @@ MobileMessageThread::GetLastMessageType(nsAString& aLastMessageType)
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;
}

View File

@ -178,7 +178,7 @@ SmsMessage::GetDelivery(nsAString& aDelivery)
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;
}
@ -203,7 +203,7 @@ SmsMessage::GetDeliveryStatus(nsAString& aDeliveryStatus)
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;
}
@ -251,7 +251,7 @@ SmsMessage::GetMessageClass(nsAString& aMessageClass)
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;
}

View File

@ -30,7 +30,7 @@ CreateMessageFromMessageData(const MobileMessageData& aData)
message = new SmsMessage(aData.get_SmsMessageData());
break;
default:
MOZ_NOT_REACHED("Unexpected type of MobileMessageData");
MOZ_CRASH("Unexpected type of MobileMessageData");
return nullptr;
}
@ -113,7 +113,7 @@ SmsChild::RecvNotifyDeliveryErrorMessage(const MobileMessageData& aData)
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;
}
@ -127,7 +127,7 @@ SmsChild::DeallocPSmsRequest(PSmsRequestChild* aActor)
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;
}
@ -200,7 +200,7 @@ SmsRequestChild::Recv__delete__(const MessageReply& aReply)
mReplyRequest->NotifyMarkMessageReadFailed(aReply.get_ReplyMarkeMessageReadFail().error());
break;
default:
MOZ_NOT_REACHED("Received invalid response parameters!");
MOZ_CRASH("Received invalid response parameters!");
return false;
}
@ -243,7 +243,7 @@ MobileMessageCursorChild::RecvNotifyResult(const MobileMessageCursorData& aData)
result = new MobileMessageThread(aData.get_ThreadData());
break;
default:
MOZ_NOT_REACHED("Received invalid response parameters!");
MOZ_CRASH("Received invalid response parameters!");
return false;
}

View File

@ -338,7 +338,7 @@ SmsParent::RecvPSmsRequestConstructor(PSmsRequestParent* aActor,
case IPCSmsRequest::TMarkMessageReadRequest:
return actor->DoRequest(aRequest.get_MarkMessageReadRequest());
default:
MOZ_NOT_REACHED("Unknown type!");
MOZ_CRASH("Unknown type!");
break;
}
@ -377,7 +377,7 @@ SmsParent::RecvPMobileMessageCursorConstructor(PMobileMessageCursorParent* aActo
case IPCMobileMessageCursor::TCreateThreadCursorRequest:
return actor->DoRequest(aRequest.get_CreateThreadCursorRequest());
default:
MOZ_NOT_REACHED("Unknown type!");
MOZ_CRASH("Unknown type!");
break;
}
@ -444,7 +444,7 @@ SmsRequestParent::DoRequest(const SendMessageRequest& aRequest)
}
break;
default:
MOZ_NOT_REACHED("Unknown type of SendMessageRequest!");
MOZ_CRASH("Unknown type of SendMessageRequest!");
return false;
}
return true;
@ -740,7 +740,7 @@ MobileMessageCursorParent::NotifyCursorResult(nsISupports* aResult)
? NS_OK : NS_ERROR_FAILURE;
}
MOZ_NOT_REACHED("Received invalid response parameters!");
MOZ_CRASH("Received invalid response parameters!");
return NS_ERROR_FAILURE;
}

View File

@ -145,11 +145,11 @@ TCPSocketChild::RecvCallback(const nsString& aType,
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;

View File

@ -112,7 +112,7 @@ TCPSocketParent::RecvData(const SendableData& aData)
break;
default:
MOZ_NOT_REACHED("unexpected SendableData type");
MOZ_CRASH("unexpected SendableData type");
return false;
}
return true;

View File

@ -119,7 +119,7 @@ PowerManagerService::Reboot()
// 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;
}
@ -130,7 +130,7 @@ PowerManagerService::PowerOff()
// 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;
}
@ -153,7 +153,7 @@ PowerManagerService::Restart()
sync();
#endif
_exit(0);
MOZ_NOT_REACHED("_exit() shouldn't return");
MOZ_CRASH("_exit() shouldn't return");
return NS_OK;
}

View File

@ -254,7 +254,7 @@ NotificationTask::Run()
case eClose:
return mNotification->CloseInternal();
default:
MOZ_NOT_REACHED("Unexpected action for NotificationTask.");
MOZ_CRASH("Unexpected action for NotificationTask.");
}
}

View File

@ -749,7 +749,7 @@ CTypesActivityCallback(JSContext* aCx,
break;
default:
MOZ_NOT_REACHED("Unknown type flag!");
MOZ_CRASH("Unknown type flag!");
}
}

View File

@ -263,7 +263,7 @@ ConvertStringToResponseType(const nsAString& aString)
}
}
MOZ_NOT_REACHED("Don't know anything about this response type!");
MOZ_CRASH("Don't know anything about this response type!");
return XMLHttpRequestResponseType::_empty;
}

View File

@ -590,7 +590,7 @@ nsDeleteCommand::DoCommand(const char* aCommandName,
} 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);

View File

@ -288,7 +288,7 @@ DeleteFromMozHostListener(nsPermissionManager* aManager)
NS_IMETHODIMP DeleteFromMozHostListener::HandleResult(mozIStorageResultSet *)
{
MOZ_NOT_REACHED("Should not get any results");
MOZ_CRASH("Should not get any results");
return NS_OK;
}

View File

@ -1738,7 +1738,7 @@ GLContext::ReadPixelsIntoImageSurface(gfxImageSurface* dest)
break;
default:
MOZ_NOT_REACHED("Bad format.");
MOZ_CRASH("Bad format.");
return;
}
MOZ_ASSERT(dest->Stride() == dest->Width() * destPixelSize);
@ -1772,7 +1772,7 @@ GLContext::ReadPixelsIntoImageSurface(gfxImageSurface* dest)
break;
}
default: {
MOZ_NOT_REACHED("Bad read format.");
MOZ_CRASH("Bad read format.");
return;
}
}
@ -1794,7 +1794,7 @@ GLContext::ReadPixelsIntoImageSurface(gfxImageSurface* dest)
break;
}
default: {
MOZ_NOT_REACHED("Bad read type.");
MOZ_CRASH("Bad read type.");
return;
}
}

View File

@ -250,7 +250,7 @@ public:
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.");
}
/**

View File

@ -107,7 +107,7 @@ GLXLibrary::EnsureInitialized(LibType libType)
#endif
break;
default:
MOZ_NOT_REACHED("Invalid GLX library type.");
MOZ_CRASH("Invalid GLX library type.");
return false;
}

View File

@ -96,7 +96,7 @@ GLScreenBuffer::BindAsFramebuffer(GLContext* const gl, GLenum target) const
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;
}
@ -577,7 +577,7 @@ ReadBuffer::Create(GLContext* gl,
colorRB = surf->Renderbuffer();
break;
default:
MOZ_NOT_REACHED("Unknown attachment type?");
MOZ_CRASH("Unknown attachment type?");
return nullptr;
}
MOZ_ASSERT(colorTex || colorRB);
@ -627,7 +627,7 @@ ReadBuffer::Attach(SharedSurface_GL* surf)
colorRB = surf->Renderbuffer();
break;
default:
MOZ_NOT_REACHED("Unknown attachment type?");
MOZ_CRASH("Unknown attachment type?");
return;
}

View File

@ -105,13 +105,13 @@ public:
// 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;
}
};

View File

@ -61,7 +61,7 @@ SharedSurface_GL::Copy(SharedSurface_GL* src, SharedSurface_GL* dest,
gl->BlitFramebufferToFramebuffer(0, destWrapper.FB(),
src->Size(), dest->Size());
} else {
MOZ_NOT_REACHED("Unhandled dest->AttachType().");
MOZ_CRASH("Unhandled dest->AttachType().");
return;
}
@ -99,7 +99,7 @@ SharedSurface_GL::Copy(SharedSurface_GL* src, SharedSurface_GL* dest,
gl->BlitFramebufferToFramebuffer(srcWrapper.FB(), 0,
src->Size(), dest->Size());
} else {
MOZ_NOT_REACHED("Unhandled src->AttachType().");
MOZ_CRASH("Unhandled src->AttachType().");
return;
}
@ -137,7 +137,7 @@ SharedSurface_GL::Copy(SharedSurface_GL* src, SharedSurface_GL* dest,
return;
}
MOZ_NOT_REACHED("Unhandled dest->AttachType().");
MOZ_CRASH("Unhandled dest->AttachType().");
return;
}
@ -164,11 +164,11 @@ SharedSurface_GL::Copy(SharedSurface_GL* src, SharedSurface_GL* dest,
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;
}
@ -264,7 +264,7 @@ SharedSurface_Basic::Create(GLContext* gl,
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);

View File

@ -43,7 +43,7 @@ SurfaceStream::CreateForType(SurfaceStreamType type, SurfaceStream* prevStream)
case SurfaceStreamType::TripleBuffer:
return new SurfaceStream_TripleBuffer(prevStream);
default:
MOZ_NOT_REACHED("Invalid Type.");
MOZ_CRASH("Invalid Type.");
return nullptr;
}
}

View File

@ -256,7 +256,7 @@ CreateTexturedEffect(TextureHost *aTextureHost,
result = new EffectYCbCr(aTextureHost, aFilter);
break;
default:
MOZ_NOT_REACHED("unhandled program type");
MOZ_CRASH("unhandled program type");
}
return result;

View File

@ -1778,13 +1778,13 @@ class RefLayer : public ContainerLayer {
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;

View File

@ -73,7 +73,7 @@ public:
virtual TextureInfo GetTextureInfo() const
{
MOZ_NOT_REACHED("This method should be overridden");
MOZ_CRASH("This method should be overridden");
return TextureInfo();
}
@ -85,7 +85,7 @@ public:
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");
}
/**

View File

@ -141,7 +141,7 @@ public:
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();
}

View File

@ -40,7 +40,7 @@ ImageClient::CreateImageClient(CompositableType aCompositableHostType,
result = nullptr;
break;
default:
MOZ_NOT_REACHED("unhandled program type");
MOZ_CRASH("unhandled program type");
}
NS_ASSERTION(result, "Failed to create ImageClient");

View File

@ -72,7 +72,7 @@ CompositableHost::Create(const TextureInfo& aTextureInfo)
result = new ContentHostIncremental(aTextureInfo);
return result;
default:
MOZ_NOT_REACHED("Unknown CompositableType");
MOZ_CRASH("Unknown CompositableType");
return nullptr;
}
}

View File

@ -59,7 +59,7 @@ TextureHost::CreateTextureHost(SurfaceDescriptorType aDescriptorType,
aTextureHostFlags,
aTextureFlags);
default:
MOZ_NOT_REACHED("Couldn't create texture host");
MOZ_CRASH("Couldn't create texture host");
return nullptr;
}
}

View File

@ -190,7 +190,7 @@ public:
ISurfaceAllocator* aAllocator,
const TextureInfo& aTextureInfo) MOZ_OVERRIDE
{
MOZ_NOT_REACHED("Does nothing");
MOZ_CRASH("Does nothing");
}
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE

View File

@ -170,7 +170,7 @@ CanvasLayerD3D10::UpdateSurface()
}
default:
MOZ_NOT_REACHED("Unhandled SharedSurfaceType.");
MOZ_CRASH("Unhandled SharedSurfaceType.");
return;
}
} else if (mSurface) {

View File

@ -125,7 +125,7 @@ ImageFormatForPixelFormat(android::PixelFormat aFormat)
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;
}
@ -143,7 +143,7 @@ PixelFormatForImageFormat(gfxASurface::gfxImageFormat aFormat)
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;
}

View File

@ -223,7 +223,7 @@ CanvasLayerOGL::UpdateSurface()
break;
}
default:
MOZ_NOT_REACHED("Unacceptable SharedSurface type.");
MOZ_CRASH("Unacceptable SharedSurface type.");
return;
}
} else {
@ -245,7 +245,7 @@ CanvasLayerOGL::UpdateSurface()
#endif
updatedSurface = mCanvasSurface;
} else {
MOZ_NOT_REACHED("Unhandled canvas layer type.");
MOZ_CRASH("Unhandled canvas layer type.");
return;
}

View File

@ -78,7 +78,7 @@ GLManager::CreateGLManager(LayerManager* aManager)
}
}
MOZ_NOT_REACHED("Cannot create GLManager for non-GL layer manager");
MOZ_CRASH("Cannot create GLManager for non-GL layer manager");
return nullptr;
}

View File

@ -115,7 +115,7 @@ FormatFromShaderType(ShaderProgramType aShaderType)
case BGRXLayerProgramType:
return FORMAT_B8G8R8X8;
default:
MOZ_NOT_REACHED("Unsupported texture shader type");
MOZ_CRASH("Unsupported texture shader type");
return FORMAT_UNKNOWN;
}
}
@ -435,7 +435,7 @@ SurfaceStreamHostOGL::Lock()
break;
}
default:
MOZ_NOT_REACHED("Invalid SharedSurface type.");
MOZ_CRASH("Invalid SharedSurface type.");
return false;
}

View File

@ -50,7 +50,7 @@ public:
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; }
@ -73,7 +73,7 @@ GetProgramTypeForTexture(const TextureHost *aTextureHost)
case gfx::FORMAT_R8G8B8A8:
return gl::RGBALayerProgramType;;
default:
MOZ_NOT_REACHED("unhandled program type");
MOZ_CRASH("unhandled program type");
}
}

View File

@ -133,7 +133,7 @@ inline gfxContext::GraphicsLineCap ThebesLineCap(CapStyle aStyle)
case CAP_SQUARE:
return gfxContext::LINE_CAP_SQUARE;
}
MOZ_NOT_REACHED("Incomplete switch");
MOZ_CRASH("Incomplete switch");
}
inline CapStyle ToCapStyle(gfxContext::GraphicsLineCap aStyle)
@ -146,7 +146,7 @@ inline CapStyle ToCapStyle(gfxContext::GraphicsLineCap aStyle)
case gfxContext::LINE_CAP_SQUARE:
return CAP_SQUARE;
}
MOZ_NOT_REACHED("Incomplete switch");
MOZ_CRASH("Incomplete switch");
}
inline gfxContext::GraphicsLineJoin ThebesLineJoin(JoinStyle aStyle)
@ -173,7 +173,7 @@ inline JoinStyle ToJoinStyle(gfxContext::GraphicsLineJoin aStyle)
case gfxContext::LINE_JOIN_ROUND:
return JOIN_ROUND;
}
MOZ_NOT_REACHED("Incomplete switch");
MOZ_CRASH("Incomplete switch");
}
inline gfxMatrix ThebesMatrix(const Matrix &aMatrix)

View File

@ -136,7 +136,7 @@ GetBackendName(mozilla::gfx::BackendType aBackend)
case mozilla::gfx::BACKEND_NONE:
return "none";
}
MOZ_NOT_REACHED("Incomplete switch");
MOZ_CRASH("Incomplete switch");
}
class gfxPlatform {

View File

@ -96,7 +96,7 @@ struct gfxRect :
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 {
@ -106,7 +106,7 @@ struct gfxRect :
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.

View File

@ -74,7 +74,7 @@ public:
// 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();
}

View File

@ -58,7 +58,7 @@ public:
// 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; }

View File

@ -66,10 +66,10 @@ QuitHard(hal::ShutdownMode aMode)
_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.

View File

@ -110,7 +110,7 @@ FileDescriptor::ShareTo(const FileDescriptor::IPDLPrivate&,
return base::FileDescriptor();
#endif
MOZ_NOT_REACHED("Must not get here!");
MOZ_CRASH("Must not get here!");
return PickleType();
}

View File

@ -48,13 +48,13 @@ SerializeInputStream(nsIInputStream* 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!");
}
}

View File

@ -58,14 +58,14 @@ SerializeURI(nsIURI* 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;
@ -79,14 +79,14 @@ SerializeURI(nsIURI* aURI,
}
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;
@ -132,7 +132,7 @@ DeserializeURI(const URIParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown params!");
MOZ_CRASH("Unknown params!");
}
MOZ_ASSERT(serializable);
@ -160,7 +160,7 @@ DeserializeURI(const URIParams& aParams)
nsCString scheme;
if (NS_FAILED(uri->GetScheme(scheme))) {
MOZ_NOT_REACHED("This must never fail!");
MOZ_CRASH("This must never fail!");
}
bool allowed = false;
@ -197,7 +197,7 @@ DeserializeURI(const OptionalURIParams& aParams)
break;
default:
MOZ_NOT_REACHED("Unknown params!");
MOZ_CRASH("Unknown params!");
}
return uri.forget();

View File

@ -155,7 +155,7 @@ 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

View File

@ -157,7 +157,7 @@ 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

View File

@ -753,7 +753,7 @@ UnixSocketImpl::OnFileCanReadWithoutBlocking(int aFd)
}
}
MOZ_NOT_REACHED("We returned early");
MOZ_CRASH("We returned early");
}
if (status == SOCKET_LISTENING) {

View File

@ -9762,7 +9762,7 @@ nsCSSFrameConstructor::CreateNeededTablePseudos(nsFrameConstructorState& aState,
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;
}

View File

@ -1570,7 +1570,7 @@ MainAxisPositionTracker::
}
break;
default:
MOZ_NOT_REACHED("Unexpected justify-content value");
MOZ_CRASH("Unexpected justify-content value");
}
}
@ -1900,7 +1900,7 @@ FlexboxAxisTracker::FlexboxAxisTracker(nsFlexContainerFrame* aFlexContainerFrame
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;
}

View File

@ -359,14 +359,14 @@ __declspec(noreturn) __inline void MOZ_NoReturn() {}
#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
@ -374,26 +374,26 @@ __declspec(noreturn) __inline void MOZ_NoReturn() {}
* 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.
@ -406,17 +406,17 @@ __declspec(noreturn) __inline void MOZ_NoReturn() {}
* 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
/*

View File

@ -413,7 +413,7 @@ class LinkedList
if (elem == t)
return;
}
MOZ_NOT_REACHED("element wasn't found in this list!");
MOZ_CRASH("element wasn't found in this list!");
#endif
}

Some files were not shown because too many files have changed in this diff Show More