Skip to content

Commit

Permalink
[] (0) Make document.open() handle timeouts and database transactions…
Browse files Browse the repository at this point in the history
… more cleanly.

git-svn-id: http://svn.whatwg.org/webapps@3260 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 15, 2009
1 parent b234c33 commit c5718cc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
20 changes: 6 additions & 14 deletions index
Expand Up @@ -8554,20 +8554,6 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
document to be unloaded</a>, then these steps must be
aborted.</li>

<!-- XXX should some task sources be emptied here? e.g. what about
timeouts that fired after this algorithm started but before the
list of timeouts was cleared in the previous step? or database
transaction callbacks that were queued after the task that started
this algorithm?

This is what the 'discard a document' algorithm does:

"any <span title="concept-task">tasks</span> associated with the
<code>Document</code> in any <span>task source</span> must be
removed without being run"

-->

<li><p>If the document has an <a href=#active-parser>active parser</a>, then
abort that parser, and throw away any pending content in the input
stream. <span class=XXX>what about if it doesn't, because it's
Expand All @@ -8578,6 +8564,12 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<li><p>Unregister all event listeners registered on the
<code>Document</code> node and its descendants.</p>

<li><p>Remove any <a href=#concept-task title=concept-task>tasks</a>
associated with the <code>Document</code> in any <a href=#task-source>task
source</a>.</li> <!-- removes callbacks that fired between
this algorithm starting and the times and databases being aborted
in the "unload" step above -->

<li><p>Remove all child nodes of the document, without firing any
mutation events.</li> <!-- as of 2009-03-30, only WebKit fired
mutation events here. -->
Expand Down
20 changes: 6 additions & 14 deletions source
Expand Up @@ -8702,20 +8702,6 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
document to be unloaded</span>, then these steps must be
aborted.</p></li>

<!-- XXX should some task sources be emptied here? e.g. what about
timeouts that fired after this algorithm started but before the
list of timeouts was cleared in the previous step? or database
transaction callbacks that were queued after the task that started
this algorithm?

This is what the 'discard a document' algorithm does:

"any <span title="concept-task">tasks</span> associated with the
<code>Document</code> in any <span>task source</span> must be
removed without being run"

-->

<li><p>If the document has an <span>active parser</span>, then
abort that parser, and throw away any pending content in the input
stream. <span class="XXX">what about if it doesn't, because it's
Expand All @@ -8726,6 +8712,12 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<li><p>Unregister all event listeners registered on the
<code>Document</code> node and its descendants.</p>

<li><p>Remove any <span title="concept-task">tasks</span>
associated with the <code>Document</code> in any <span>task
source</span>.</p></li> <!-- removes callbacks that fired between
this algorithm starting and the times and databases being aborted
in the "unload" step above -->

<li><p>Remove all child nodes of the document, without firing any
mutation events.</p></li> <!-- as of 2009-03-30, only WebKit fired
mutation events here. -->
Expand Down

0 comments on commit c5718cc

Please sign in to comment.