зеркало из https://github.com/mozilla/pjs.git
Fix XMLHttpRequest progress events. Bug 337374, r+sr=sicking
This commit is contained in:
Родитель
43b2041329
Коммит
1ee54590dd
|
@ -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 =
|
||||
|
|
Загрузка…
Ссылка в новой задаче