bug 343107 Make sure to always fire STATE_START before STATE_STOP

patch by Dorian <boissomag@free.fr> r=biesi sr=darin
This commit is contained in:
cbiesinger%web.de 2006-07-06 19:34:28 +00:00
Родитель 7beb194bd0
Коммит 20eeca4260
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -2139,6 +2139,9 @@ nsresult nsExternalAppHandler::CreateProgressListener()
if (NS_SUCCEEDED(rv))
InitializeDownload(tr);
if (tr)
tr->OnStateChange(nsnull, mRequest, nsIWebProgressListener::STATE_START, NS_OK);
// note we might not have a listener here if the QI() failed, or if
// there is no nsITransfer object, but we still call
// SetWebProgressListener() to make sure our progress state is sane
@ -2147,9 +2150,6 @@ nsresult nsExternalAppHandler::CreateProgressListener()
// OnStopRequest.
SetWebProgressListener(tr);
if (tr)
tr->OnStateChange(nsnull, mRequest, nsIWebProgressListener::STATE_START, NS_OK);
return rv;
}