return mStreamConverter->OnStopRequest(request, ctxt, status);
if(!mPStreamListener) return NS_ERROR_FAILURE;  nsCOMPtr<nsIChannel> channel = do_QueryInterface(request); if (!channel) return NS_ERROR_FAILURE;  nsCAutoString aContentType; rv = channel->GetContentType(aContentType); if (NS_FAILED(rv)) return rv;  if (!aContentType.IsEmpty()) mPluginStreamInfo->SetContentType(aContentType.get());   if (mRequestFailed) aStatus = NS_ERROR_FAILURE;  if (NS_FAILED(aStatus)) {   mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus); return NS_OK; }  nsCOMPtr<nsIFile> localFile; mPluginStreamInfo->GetLocalCachedFile(getter_AddRefs(localFile));  if (!localFile) { nsCOMPtr<nsICachingChannel> cacheChannel = do_QueryInterface(request); if (cacheChannel) { cacheChannel->GetCacheFile(getter_AddRefs(localFile)); } else {  nsCOMPtr<nsIFileChannel> fileChannel = do_QueryInterface(request); if (fileChannel) { fileChannel->GetFile(getter_AddRefs(localFile)); } } }  if (localFile) { OnFileAvailable(localFile); }  if (mStartBinding) {  mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus); } else {  mPStreamListener->OnStartBinding((nsIPluginStreamInfo*)mPluginStreamInfo); mPStreamListener->OnStopBinding((nsIPluginStreamInfo*)mPluginStreamInfo, aStatus); }  return NS_OK;
nsPluginByteRangeStreamListener::OnStopRequest(nsIRequest *request, nsISupports *ctxt,                              nsresult status){  if (!mStreamConverter)    return NS_ERROR_FAILURE;  nsCOMPtr<nsIStreamListener> finalStreamListener = do_QueryReferent(mWeakPtrPluginStreamListenerPeer);  if (!finalStreamListener)     return NS_ERROR_FAILURE;  if (mRemoveMagicNumber) {    // remove magic number from container    nsCOMPtr<nsISupportsPRUint32> container = do_QueryInterface(ctxt);    if (container) {      PRUint32 magicNumber = 0;      container->GetData(&magicNumber);      if (magicNumber == MAGIC_REQUEST_CONTEXT) {        // to allow properly finish nsPluginStreamListenerPeer->OnStopRequest()        // set it to something that is not the magic number.        container->SetData(0);      }    } else {      NS_WARNING("Bad state of nsPluginByteRangeStreamListener");    }  }    return mStreamConverter->OnStopRequest(request, ctxt, status);}