Bug 103309
Summary: | XMLHttpRequest timeout doesn't work for synchronous requests | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> |
Component: | XML | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | beidson, d-r, joepeck |
Priority: | P3 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Alexey Proskuryakov
I'm not sure if we want to give authors control over sync XHR timeout, but it looks like we currently don't.
After calling setTimeoutInterval() in XMLHttpRequest::createRequest() ,we reset the timeout to 10 seconds in FrameLoader::loadResourceSynchronously().
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dominik Röttsches (drott)
As the spec says, and the implementation ensures, sync timeout is only supported for workers - and a few tests cover this. Last time I checked, it seemed it was working at least. Do you see any of the http/tests/xmlhttprequest/timeout/* tests failing?
For the workers case, is it hitting the same code path in FrameLoader::loadResourceSynchronously() which would reset the timeout? What do you mean by "resetting the timeout", if this code path actually just sets a new setTimeoutInterval on a request that was already sent out, I doubt it would have any effect. The backends don't handle this case.
Alexey Proskuryakov
FrameLoader::loadResourceSynchronously() is a bottleneck for all synchronous loads.
From the look of this code, it shouldn't work.
Alexey Proskuryakov
I just tested, and setting synchronous timeout in a worker appears to work on Mac. Unsure if something changed in the code, or if I misunderstood it in the first place.