Fix XMLHttpRequest progress events. Bug 337374, r+sr=sicking

This commit is contained in:
bzbarsky%mit.edu 2006-05-15 18:28:21 +00:00
Родитель 43b2041329
Коммит 1ee54590dd
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1963,7 +1963,10 @@ nsXMLHttpRequest::OnChannelRedirect(nsIChannel *aOldChannel,
NS_IMETHODIMP
nsXMLHttpRequest::OnProgress(nsIRequest *aRequest, nsISupports *aContext, PRUint64 aProgress, PRUint64 aProgressMax)
{
PRBool downloading = (XML_HTTP_REQUEST_LOADED & mState);
// We're uploading if our state is XML_HTTP_REQUEST_OPENED or
// XML_HTTP_REQUEST_SENT
PRBool downloading =
!((XML_HTTP_REQUEST_OPENED | XML_HTTP_REQUEST_SENT) & mState);
nsIDOMEventListener* progressListener =
downloading ? mOnProgressListener : mOnUploadProgressListener;
nsCOMArray<nsIDOMEventListener> & progressListenerArray =