This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

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?
Status: RESOLVED FIXED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-17 23:52 UTC by Olli Pettay
Modified: 2011-12-18 18:23 UTC (History)
2 users (show)

See Also:


Attachments

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