fixes bug 273578 "XMLHttpRequest with async = false takes 100% CPU until request finished" r=jst sr=bz

This commit is contained in:
darin%meer.net 2005-10-18 19:45:46 +00:00
Родитель 36671db790
Коммит fb27621347
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -1611,6 +1611,10 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
if (!(mState & XML_HTTP_REQUEST_ASYNC)) {
while (mState & XML_HTTP_REQUEST_SYNCLOOPING) {
modalEventQueue->ProcessPendingEvents();
// Be sure not to busy wait! (see bug 273578)
if (mState & XML_HTTP_REQUEST_SYNCLOOPING)
PR_Sleep(PR_MillisecondsToInterval(10));
}
mEventQService->PopThreadEventQueue(modalEventQueue);