if (mRemoveMagicNumber) {  nsCOMPtr<nsISupportsPRUint32> container = do_QueryInterface(ctxt); if (container) { PRUint32 magicNumber = 0; container->GetData(&magicNumber); if (magicNumber == MAGIC_REQUEST_CONTEXT) {   container->SetData(0); } } else { NS_WARNING("Bad state of nsPluginByteRangeStreamListener");
nsCOMPtr<nsIByteRangeRequest> brr = do_QueryInterface(request); if (brr) { PRInt32 absoluteOffset = 0; brr->GetStartRange(&absoluteOffset);  nsPRUintKey key(absoluteOffset);   (void) mDataForwardToRequest->Remove(&key);   PLUGIN_LOG(PLUGIN_LOG_NOISY, ("                          ::OnStopRequest for ByteRangeRequest Started=%d\n", absoluteOffset)); } else {    mFileCacheOutputStream = nsnull; }   if (--mPendingRequests > 0) return NS_OK;   nsCOMPtr<nsISupportsPRUint32> container = do_QueryInterface(aContext); if (container) { PRUint32 magicNumber = 0; container->GetData(&magicNumber); if (magicNumber == MAGIC_REQUEST_CONTEXT) {  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);}