rv = CleanUpStream(reason);
if(!callbacks || !npp->pdata) return NS_ERROR_FAILURE;  NPError error;  pluginInfo->GetURL(&mNPStream.url); pluginInfo->GetLastModified((PRUint32*)&(mNPStream.lastmodified));  if (callbacks->destroystream != NULL) {  PRLibrary* lib = nsnull; PRBool started = PR_FALSE; if(mInst) { lib = mInst->fLibrary; started = mInst->IsStarted(); }  if (started) { NS_TRY_SAFE_CALL_RETURN(error, CallNPP_DestroyStreamProc(callbacks->destroystream, npp, &mNPStream, NPRES_DONE), lib); } if(error != NPERR_NO_ERROR) return NS_ERROR_FAILURE;
ns4xPluginStreamListener::OnStopBinding(nsIPluginStreamInfo* pluginInfo,                                         nsresult status){  if(!mInst || !mInst->IsStarted())    return NS_ERROR_FAILURE;  // check if the stream is of seekable type and later its destruction  // see bug 91140      nsresult rv = NS_OK;  if(mStreamType != nsPluginStreamType_Seek) {    NPReason reason = NPRES_DONE;    if (NS_FAILED(status))      reason = NPRES_NETWORK_ERR;   // since the stream failed, we need to tell the plugin that    rv = CleanUpStream(reason);  }    if(rv != NPERR_NO_ERROR)    return NS_ERROR_FAILURE;  return NS_OK;}