<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12838</bug_id>
          
          <creation_ts>2011-05-31 23:13:51 +0000</creation_ts>
          <short_desc>Define garbage collection policy</short_desc>
          <delta_ts>2011-08-18 11:42:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>XHR</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>48984</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-05-31 23:13:51 +0000</bug_when>
    <thetext>XHR should say that an XHR object is not to be garbage collected if it can still get events and has listeners for those events. Compare with WebSocket API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55291</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-08-17 11:33:41 +0000</bug_when>
    <thetext>I think something along the following:

UNSENT, OPENED with send() flag false 
can be GC (no need to mention in the spec)

OPENED with send() flag true
must not be GC if there are any listeners for readystatechange, loadstart, progress, abort, error, load, timeout, loadend

HEADERS_RECEIVED
must not be GC if there are any listeners for readystatechange, progress, abort, error, load, timeout, loadend

LOADING
must not be GC if there are any listeners for readystatechange, progress, abort, error, load, timeout, loadend

DONE
can be GC (no need to mention in the spec)

If an XHR object is GC when it is in OPENED with send() flag true, HEADERS_RECEIVED, or LOADING, then the UA must act as if the user aborted the request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55292</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-08-17 12:12:35 +0000</bug_when>
    <thetext>websocket has:

&quot;A WebSocket object with an established connection that has data queued to be transmitted to the network must not be garbage collected.&quot;

Possible that XHR should say something similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55304</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-08-17 15:14:28 +0000</bug_when>
    <thetext>EventSource has a much simpler garbage collection policy. Would be interesting to know why that is not sufficient here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55414</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-08-18 11:42:21 +0000</bug_when>
    <thetext>Done: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#garbage-collection</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>