Bug 475526: Move assertion to somewhere it makes sense. r+sr=dveditz
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 12 Feb 2009 10:19:00 +0000
changeset 24950 a2460d14f637292d9bf1f44c1c89e5de95188e4f
parent 24949 c834f54de201bc8384e0ba88d289fa69f2ba8ba1
child 24951 c7f4baa9448b07a7721f9546f01b4522cdb509e9
push idunknown
push userunknown
push dateunknown
bugs475526
milestone1.9.2a1pre
Bug 475526: Move assertion to somewhere it makes sense. r+sr=dveditz
xpinstall/src/nsXPInstallManager.cpp
--- 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)
     {