Closed Bug 225274 Opened 22 years ago Closed 22 years ago

synchronous XMLHttpRequest freezes browser, maxes CPU

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 190313

People

(Reporter: geofforama, Assigned: hjtoi-bugzilla)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031010 Mozilla Firebird/0.6 StumbleUpon/1.88 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031010 Mozilla Firebird/0.6 StumbleUpon/1.88 A synchronous xmlhttprequest will hang the browser and max out the cpu until it has received a response. The url http://www.stumbleupon.com/test.html sends a xmlhttprequest to a script called sleep.php that just sleeps for 10 seconds before returning a response. You will notice our CPU at 100% for 10 seconds and the browser GUI will not respond. Reproducible: Always Steps to Reproduce: 1. go to http://www.stumbleupon.com/test.html Actual Results: CPU at 100% for 10 seconds, browser GUI freezes Expected Results: No gui freeze, minimal CPU usage.
Why are we manually calling ProcessPendingEvents here? It looks like we should do something more like what http://lxr.mozilla.org/seamonkey/source/embedding/components/windowwatcher/src/nsWindowWatcher.cpp#290 does...
I have tried several different things, but I can't remember if I tried the thing in nsWindowWatcher. If that works, then DOMParser, document.load and the XSLT code (or it might now use a generic sync loader, actually) should be fixed to use that. The biggest problem has been embedding - it's easy to make things not block in Mozilla proper, but doing it for embedded apps has turned out to be not so easy. Anyway, this is dupe, so should continue discussion there... *** This bug has been marked as a duplicate of 190313 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.