NS_IMETHODIMP HttpChannelParent::OnProgress(nsIRequest *aRequest, nsISupports *aContext, PRUint64 aProgress, PRUint64 aProgressMax) { if (mIPCClosed || !SendOnProgress(aProgress, aProgressMax)) return NS_ERROR_UNEXPECTED; return NS_OK; }
NS_IMETHODIMP HttpChannelParent::OnProgress(nsIRequest *aRequest, nsISupports *aContext, PRUint64 aProgress, PRUint64 aProgressMax) { // OnStatus has always just set mStoredStatus. If it indicates this precedes // OnDataAvailable, store and ODA will send to child. if (mStoredStatus == nsISocketTransport::STATUS_RECEIVING_FROM || mStoredStatus == nsITransport::STATUS_READING) { mStoredProgress = aProgress; mStoredProgressMax = aProgressMax; } else { // Send to child now. The only case I've observed that this handles (i.e. // non-ODA status with progress > 0) is data upload progress notification // (status == nsISocketTransport::STATUS_SENDING_TO) if (mIPCClosed || !SendOnProgress(aProgress, aProgressMax)) return NS_ERROR_UNEXPECTED; } return NS_OK; }