Bug 741384 - Change MOZ_NOT_REACHED added in bug 732343 to MOZ_ASSERT(false). r=smaug.

This commit is contained in:
Henri Sivonen 2012-04-10 10:02:31 +03:00
parent 4724b0d9cb
commit 914678b308
2 changed files with 6 additions and 6 deletions

View File

@ -560,15 +560,15 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
nsIContentSink* aSink) nsIContentSink* aSink)
{ {
if (!aCommand) { if (!aCommand) {
MOZ_NOT_REACHED("Command is mandatory"); MOZ_ASSERT(false, "Command is mandatory");
return NS_ERROR_INVALID_POINTER; return NS_ERROR_INVALID_POINTER;
} }
if (aSink) { if (aSink) {
MOZ_NOT_REACHED("Got a sink override. Should not happen for HTML doc."); MOZ_ASSERT(false, "Got a sink override. Should not happen for HTML doc.");
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
} }
if (!mIsRegularHTML) { if (!mIsRegularHTML) {
MOZ_NOT_REACHED("Must not set HTML doc to XHTML mode before load start."); MOZ_ASSERT(false, "Must not set HTML doc to XHTML mode before load start.");
return NS_ERROR_DOM_INVALID_STATE_ERR; return NS_ERROR_DOM_INVALID_STATE_ERR;
} }
@ -580,7 +580,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
bool viewSource = !strcmp(aCommand, "view-source"); bool viewSource = !strcmp(aCommand, "view-source");
bool asData = !strcmp(aCommand, kLoadAsData); bool asData = !strcmp(aCommand, kLoadAsData);
if(!(view || viewSource || asData)) { if(!(view || viewSource || asData)) {
MOZ_NOT_REACHED("Bad parser command"); MOZ_ASSERT(false, "Bad parser command");
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
} }
@ -595,7 +595,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
contentType.EqualsLiteral(TEXT_JAVASCRIPT) || contentType.EqualsLiteral(TEXT_JAVASCRIPT) ||
contentType.EqualsLiteral(APPLICATION_JSON)); contentType.EqualsLiteral(APPLICATION_JSON));
if (!(html || xhtml || plainText || viewSource)) { if (!(html || xhtml || plainText || viewSource)) {
MOZ_NOT_REACHED("Channel with bad content type."); MOZ_ASSERT(false, "Channel with bad content type.");
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
} }

View File

@ -2106,7 +2106,7 @@ nsParser::OnDataAvailable(nsIRequest *request, nsISupports* aContext,
nsresult rv = NS_OK; nsresult rv = NS_OK;
if (mIsAboutBlank) { if (mIsAboutBlank) {
MOZ_NOT_REACHED("Must not get OnDataAvailable for about:blank"); MOZ_ASSERT(false, "Must not get OnDataAvailable for about:blank");
// ... but if an extension tries to feed us data for about:blank in a // ... but if an extension tries to feed us data for about:blank in a
// release build, silently ignore the data. // release build, silently ignore the data.
PRUint32 totalRead; PRUint32 totalRead;