mMsgProtocol->UpdateProgress(bytesWritten);
    NS_IMETHODIMP OnDataWritable(nsIRequest *aChannel, nsISupports *aContext,                                 nsIOutputStream *aOutStream,                                 PRUint32 aOffset, PRUint32 aCount)    {         NS_ASSERTION(mInStream, "not initialized");        nsresult rv;        PRUint32 avail;        // Write whatever is available in the pipe. If the pipe is empty, then        // return NS_BASE_STREAM_WOULD_BLOCK; we will resume the write when there        // is more data.        rv = mInStream->Available(&avail);        if (NS_FAILED(rv)) return rv;        if (avail == 0)         {          mMsgProtocol->mSuspendedWrite = PR_TRUE;          return NS_BASE_STREAM_WOULD_BLOCK;        }        PRUint32 bytesWritten;        rv =  aOutStream->WriteFrom(mInStream, PR_MIN(avail, aCount), &bytesWritten);        // if were full at the time, the input stream may be backed up and we need to read any remains from the last ODA call        // before we'll get more ODA calls        if (mMsgProtocol->mSuspendedRead)          mMsgProtocol->UnblockPostReader();        return rv;    }