Bug 1024322 - Replace calls to MOZ_ASSUME_UNREACHABLE that have crept back into dom. r=smaug

This commit is contained in:
Chris Peterson
2014-06-20 22:42:45 -07:00
parent 6364b79ad7
commit 43fb851b51
5 changed files with 6 additions and 9 deletions

View File

@@ -117,8 +117,7 @@ DataStoreDB::HandleEvent(nsIDOMEvent* aEvent)
return NS_OK; return NS_OK;
} }
MOZ_ASSUME_UNREACHABLE("This should not happen"); MOZ_CRASH("This should not happen");
return NS_OK;
} }
nsresult nsresult

View File

@@ -53,8 +53,7 @@ DataStoreRevision::AddRevision(JSContext* aCx,
break; break;
default: default:
MOZ_ASSUME_UNREACHABLE("This should not happen"); MOZ_CRASH("This should not happen");
break;
} }
JS::Rooted<JS::Value> value(aCx); JS::Rooted<JS::Value> value(aCx);
@@ -88,8 +87,7 @@ DataStoreRevision::HandleEvent(nsIDOMEvent* aEvent)
} }
if (!type.EqualsASCII("success")) { if (!type.EqualsASCII("success")) {
MOZ_ASSUME_UNREACHABLE("This should not happen"); MOZ_CRASH("This should not happen");
return NS_ERROR_FAILURE;
} }
mRequest->RemoveEventListener(NS_LITERAL_STRING("success"), this, false); mRequest->RemoveEventListener(NS_LITERAL_STRING("success"), this, false);

View File

@@ -61,7 +61,7 @@ DOMMobileMessageError::GetData(OwningMozSmsMessageOrMozMmsMessage& aRetVal) cons
return; return;
} }
MOZ_ASSUME_UNREACHABLE("Bad object with invalid mSms and mMms."); MOZ_CRASH("Bad object with invalid mSms and mMms.");
} }
JSObject* JSObject*

View File

@@ -45,7 +45,7 @@ TelephonyCallId::GetPresentationStr(uint16_t aPresentation) const
case nsITelephonyService::CALL_PRESENTATION_PAYPHONE: case nsITelephonyService::CALL_PRESENTATION_PAYPHONE:
return CallIdPresentation::Payphone; return CallIdPresentation::Payphone;
default: default:
MOZ_ASSUME_UNREACHABLE("Bad presentation!"); MOZ_CRASH("Bad presentation!");
} }
} }

View File

@@ -38,7 +38,7 @@ private:
#define USE_DLFUNC(name) \ #define USE_DLFUNC(name) \
FUNC##name name = (FUNC##name) dlsym(GetSharedLibrary(), #name); \ FUNC##name name = (FUNC##name) dlsym(GetSharedLibrary(), #name); \
if (!name) { \ if (!name) { \
MOZ_ASSUME_UNREACHABLE("Symbol not found in shared library : " #name); \ MOZ_CRASH("Symbol not found in shared library : " #name); \
} }
#endif // WifiHotspotUtils_h #endif // WifiHotspotUtils_h