Bug 475526: Move assertion to somewhere it makes sense. r+sr=dveditz
--- a/xpinstall/src/nsXPInstallManager.cpp
+++ b/xpinstall/src/nsXPInstallManager.cpp
@@ -1158,33 +1158,33 @@ nsXPInstallManager::OnStopRequest(nsIReq
nsresult status)
{
nsresult rv;
switch( status )
{
case NS_BINDING_SUCCEEDED:
+ NS_ASSERTION( mItem->mOutStream, "XPIManager: output stream doesn't exist");
rv = NS_OK;
break;
case NS_BINDING_FAILED:
case NS_BINDING_ABORTED:
rv = status;
// XXX need to note failure, both to send back status
// to the callback, and also so we don't try to install
// this probably corrupt file.
break;
default:
rv = NS_ERROR_ILLEGAL_VALUE;
}
NS_ASSERTION( mItem, "Bad state in XPIManager");
- NS_ASSERTION( mItem->mOutStream, "XPIManager: output stream doesn't exist");
if ( mItem && mItem->mOutStream )
{
mItem->mOutStream->Close();
mItem->mOutStream = nsnull;
}
if (NS_FAILED(rv) || mCancelled)
{