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

git-svn-id: svn://10.0.0.236/trunk@182482 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net
2005-10-18 19:45:46 +00:00
parent 7a9cca2e72
commit 8cb759fbf5

View File

@@ -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);