WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
103309
XMLHttpRequest timeout doesn't work for synchronous requests
https://bugs.webkit.org/show_bug.cgi?id=103309
Summary
XMLHttpRequest timeout doesn't work for synchronous requests
Alexey Proskuryakov
Reported
2012-11-26 15:46:14 PST
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)
Comment 1
2012-11-27 02:05:59 PST
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
Comment 2
2012-11-27 08:46:31 PST
FrameLoader::loadResourceSynchronously() is a bottleneck for all synchronous loads. From the look of this code, it shouldn't work.
Alexey Proskuryakov
Comment 3
2013-05-21 14:59:12 PDT
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug