Skip to content

Commit

Permalink
[giow] (0) Shut down WebSocket when a document is unloaded. Add a hoo…
Browse files Browse the repository at this point in the history
…k for XHR to do the same.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8435

git-svn-id: http://svn.whatwg.org/webapps@4501 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 6, 2010
1 parent 80b4c9b commit 2b2e2c3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
12 changes: 11 additions & 1 deletion complete.html
Expand Up @@ -56480,7 +56480,17 @@ <h4 id=unloading-documents><span class=secno>6.11.10 </span>Unloading documents<

<li><p>Empty the <code>Document</code>'s <code><a href=#window>Window</a></code>'s
<a href=#list-of-active-timeouts>list of active timeouts</a> and its <a href=#list-of-active-intervals>list of active
intervals</a>.</li>
intervals</a>.</li> <!-- should this affect var
title="">salvageable</var>? -->

<li><p><a href=#close-the-web-socket-connection>Close the Web Socket connection</a> of any
<code><a href=#websocket>WebSocket</a></code> objects that were created by the <code title=dom-WebSocket><a href=#dom-websocket>WebSocket()</a></code> constructor visible on the
<code>Document</code>'s <code><a href=#window>Window</a></code> object. If this
affected any <code><a href=#websocket>WebSocket</a></code> objects, set <var title="">salvageable</var> to false.</li>

<li><p>Run any <dfn id=unloading-document-cleanup-steps>unloading document cleanup steps</dfn> for
<code>Document</code> that are defined by any other relevant
specifications.</li>

<li><p>If this algorithm was invoked by another instance of the
"unload a document" algorithm (i.e. through the steps below that
Expand Down
12 changes: 11 additions & 1 deletion index
Expand Up @@ -53654,7 +53654,17 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU

<li><p>Empty the <code>Document</code>'s <code><a href=#window>Window</a></code>'s
<a href=#list-of-active-timeouts>list of active timeouts</a> and its <a href=#list-of-active-intervals>list of active
intervals</a>.</li>
intervals</a>.</li> <!-- should this affect var
title="">salvageable</var>? -->

<li><p><span>Close the Web Socket connection</span> of any
<code>WebSocket</code> objects that were created by the <code title=dom-WebSocket>WebSocket()</code> constructor visible on the
<code>Document</code>'s <code><a href=#window>Window</a></code> object. If this
affected any <code>WebSocket</code> objects, set <var title="">salvageable</var> to false.</li>

<li><p>Run any <dfn id=unloading-document-cleanup-steps>unloading document cleanup steps</dfn> for
<code>Document</code> that are defined by any other relevant
specifications.</li>

<li><p>If this algorithm was invoked by another instance of the
"unload a document" algorithm (i.e. through the steps below that
Expand Down
14 changes: 13 additions & 1 deletion source
Expand Up @@ -63783,7 +63783,19 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

<li><p>Empty the <code>Document</code>'s <code>Window</code>'s
<span>list of active timeouts</span> and its <span>list of active
intervals</span>.</p></li>
intervals</span>.</p></li> <!-- should this affect var
title="">salvageable</var>? -->

<li><p><span>Close the Web Socket connection</span> of any
<code>WebSocket</code> objects that were created by the <code
title="dom-WebSocket">WebSocket()</code> constructor visible on the
<code>Document</code>'s <code>Window</code> object. If this
affected any <code>WebSocket</code> objects, set <var
title="">salvageable</var> to false.</p></li>

<li><p>Run any <dfn>unloading document cleanup steps</dfn> for
<code>Document</code> that are defined by any other relevant
specifications.</p></li>

<li><p>If this algorithm was invoked by another instance of the
"unload a document" algorithm (i.e. through the steps below that
Expand Down

0 comments on commit 2b2e2c3

Please sign in to comment.