Bug 15257 - Should synchronous flag be cleared after state is set to UNSENT or DONE?
Summary: Should synchronous flag be cleared after state is set to UNSENT or DONE?
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: XHR (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2011-12-17 23:52 UTC by Olli Pettay
Modified: 2011-12-18 18:23 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Olli Pettay 2011-12-17 23:52:20 UTC
If someone tries to reuse sync XHR later as async XHR, setting
for example timeout after the sync XHR has succeeded doesn't work before
calling open().
Is there any reason to keep sync flag after abort() or successful request?
Comment 1 Anne 2011-12-18 13:17:11 UTC
It was not cleared before because there were no side effects. Now that we have introduced side effects, we should clear it.
Comment 2 Anne 2011-12-18 13:18:49 UTC
Actually, that would mean that doing send() after a successful synchronous send() becomes asynchronous. Not sure if that is a good idea.
Comment 3 Olli Pettay 2011-12-18 13:34:53 UTC
you need to call open before send
Comment 4 Anne 2011-12-18 18:23:32 UTC
Oops, you're right!