Bug 15257 - Should synchronous flag be cleared after state is set to UNSENT or DONE?
Should synchronous flag be cleared after state is set to UNSENT or DONE?
Status: RESOLVED FIXED
Product: WebAppsWG
Classification: Unclassified
Component: XHR
unspecified
PC Linux
: P2 normal
: ---
Assigned To: Anne
public-webapps-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-17 23:52 UTC by Olli Pettay
Modified: 2011-12-18 18:23 UTC (History)
2 users (show)

See Also:


Attachments

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!

http://dvcs.w3.org/hg/xhr/rev/38004ff3f26d