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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user