[html5] r7304 - [giow] (3) Fix an infinite loop. There's no interop here, really, so I tried to [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Aug 31 16:46:28 PDT 2012


Author: ianh
Date: 2012-08-31 16:46:27 -0700 (Fri, 31 Aug 2012)
New Revision: 7304

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Fix an infinite loop. There's no interop here, really, so I tried to find a compromise between what browsers do and keeping the requirements sane and simple. Tests at: http://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ -- See also IRC ranting starting at http://krijnhoetmer.nl/irc-logs/whatwg/20120831#l-67 and ending at http://krijnhoetmer.nl/irc-logs/whatwg/20120901#l-140
Affected topics: HTML, HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2012-08-30 19:07:45 UTC (rev 7303)
+++ complete.html	2012-08-31 23:46:27 UTC (rev 7304)
@@ -246,7 +246,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 30 August 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 31 August 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -13988,7 +13988,14 @@
 
   </dl><div class=impl>
 
-  <p>When called with two or fewer arguments, the method must act as
+  <p><code><a href=#document>Document</a></code> objects have an
+  <dfn id=ignore-opens-during-unload-counter>ignore-opens-during-unload counter</dfn>, which is used to
+  prevent scripts from invoking the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method (directly or
+  indirectly) while the document is <a href=#unload-a-document title="unload a
+  document">being unloaded</a>. Initially, the counter must be set
+  to zero.</p> <!-- http://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ -->
+
+  <p>When called with two or fewer arguments, the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method must act as
   follows:</p>
 
   <ol><li>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML document</a>, throw an
@@ -14005,13 +14012,13 @@
 
    <li>
 
-    <p>If the document has an <a href=#active-parser>active parser</a> that isn't a
-    <a href=#script-created-parser>script-created parser</a>, and the <a href=#insertion-point>insertion
-    point</a> associated with that parser's <a href=#input-stream>input
-    stream</a> is not undefined (that is, it <em>does</em> point to
-    somewhere in the input stream), then the method does
-    nothing. Abort these steps and return the <code><a href=#document>Document</a></code>
-    object on which the method was invoked.</p>
+    <p>If the <code><a href=#document>Document</a></code> has an <a href=#active-parser>active parser</a>
+    that isn't a <a href=#script-created-parser>script-created parser</a>, and the
+    <a href=#insertion-point>insertion point</a> associated with that parser's
+    <a href=#input-stream>input stream</a> is not undefined (that is, it
+    <em>does</em> point to somewhere in the input stream), then the
+    method does nothing. Abort these steps and return the
+    <code><a href=#document>Document</a></code> object on which the method was invoked.</p>
 
     <p class=note>This basically causes <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> to be ignored
     when it's called in an inline script found during the parsing of
@@ -14021,6 +14028,20 @@
 
    </li>
 
+   <li>
+
+    <p>Similarly, if the <code><a href=#document>Document</a></code>'s
+    <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> is greater than
+    zero, then the method does nothing. Abort these steps and return
+    the <code><a href=#document>Document</a></code> object on which the method was
+    invoked.</p>
+
+    <p class=note>This basically causes <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> to be ignored
+    when it's called from a <code title=event-beforeunload>beforeunload</code> <code title=event-pagehide><a href=#event-pagehide>pagehide</a></code>, or <code title=event-unload>unload</code> event handler while the
+    <code><a href=#document>Document</a></code> is being unloaded.</p>
+
+   </li>
+
    <li><p>Release the <a href=#storage-mutex>storage mutex</a>.</li>
 
    <li><p>Set the <code><a href=#document>Document</a></code>'s <var title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></var> state to
@@ -14029,7 +14050,8 @@
    <li><p><a href=#prompt-to-unload-a-document title="prompt to unload a document">Prompt to
    unload</a> the <code><a href=#document>Document</a></code> object. If the user
    <a href=#refused-to-allow-the-document-to-be-unloaded>refused to allow the document to be unloaded</a>, then
-   these steps must be aborted.</li>
+   abort these steps and return the <code><a href=#document>Document</a></code> object on
+   which the method was invoked.</li>
 
    <li><p><a href=#unload-a-document title="unload a document">Unload</a> the
    <code><a href=#document>Document</a></code> object, with the <var title="">recycle</var>
@@ -14279,9 +14301,11 @@
 
    <li>
 
-    <p>If the <a href=#insertion-point>insertion point</a> is undefined and the
-    <code><a href=#document>Document</a></code>'s <a href=#ignore-destructive-writes-counter>ignore-destructive-writes
-    counter</a> is greater than zero, then abort these steps.</p>
+    <p>If the <a href=#insertion-point>insertion point</a> is undefined and either the
+    <code><a href=#document>Document</a></code>'s <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload
+    counter</a> is greater than zero or the <code><a href=#document>Document</a></code>'s
+    <a href=#ignore-destructive-writes-counter>ignore-destructive-writes counter</a> is greater than
+    zero, abort these steps.</p>
 
    </li>
 
@@ -71451,6 +71475,9 @@
   <ol><li><p>Increase the <a href=#event-loop>event loop</a>'s <a href=#termination-nesting-level>termination
    nesting level</a> by one.</li>
 
+   <li><p>Increase the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
    <li><p>Let <var title="">event</var> be a new
    <code><a href=#beforeunloadevent>BeforeUnloadEvent</a></code> event object with the name <code title=event-beforeunload>beforeunload</code>, which does not
    bubble but is cancelable.</li>
@@ -71491,7 +71518,7 @@
    <li><p>If this algorithm was invoked by another instance of the
    "prompt to unload a document" algorithm (i.e. through the steps
    below that invoke this algorithm for all descendant browsing
-   contexts), then abort these steps here.</li>
+   contexts), then jump to the step labeled <i>end</i>.</li>
 
    <li><p>Let <var title="">descendants</var> be the <a href=#list-of-the-descendant-browsing-contexts>list of the
    descendant browsing contexts</a> of the
@@ -71509,7 +71536,7 @@
      <a href=#refused-to-allow-the-document-to-be-unloaded>refused to allow the document to be unloaded</a>, then
      the user implicitly also <a href=#refused-to-allow-the-document-to-be-unloaded title="refused to allow the
      document to be unloaded">refused to allow <em>this</em> document
-     to be unloaded</a>; abort these steps.</p>
+     to be unloaded</a>; jump to the step labeled <i>end</i>.</p>
 
      <li><p>If <var title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></var> state of
      the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing
@@ -71518,6 +71545,9 @@
 
     </ol></li>
 
+   <li><p><i>End</i>: Decrease the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
   </ol><p>When a user agent is to <dfn id=unload-a-document>unload a document</dfn>, it must run
   the following steps. These steps are passed an argument, <var title="">recycle</var>, which is either true or false, indicating
   whether the <code><a href=#document>Document</a></code> object is going to be
@@ -71526,6 +71556,9 @@
   <ol><li><p>Increase the <a href=#event-loop>event loop</a>'s <a href=#termination-nesting-level>termination
    nesting level</a> by one.</li>
 
+   <li><p>Increase the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
    <li><p>Fire a <code title=event-pagehide><a href=#event-pagehide>pagehide</a></code> event at
    the <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code>, but
    with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
@@ -71565,9 +71598,9 @@
    <a href=#other-applicable-specifications>other applicable specifications</a>.</li>
 
    <li><p>If this algorithm was invoked by another instance of the
-   "unload a document" algorithm (i.e. through the steps below that
-   invoke this algorithm for all descendant browsing contexts), then
-   abort these steps here.</li>
+   "unload a document" algorithm (i.e. by the steps below that invoke
+   this algorithm for all descendant browsing contexts), then jump to
+   the step labeled <i>end</i>.</li>
 
    <li><p>Let <var title="">descendants</var> be the <a href=#list-of-the-descendant-browsing-contexts>list of the
    descendant browsing contexts</a> of the
@@ -71595,6 +71628,9 @@
    <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a> must <a href=#discard-a-document title="discard a document">discard the
    <code>Document</code></a>.</li>
 
+   <li><p><i>End</i>: Decrease the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
   </ol><p>This specification defines the following <dfn id=unloading-document-cleanup-steps>unloading document
   cleanup steps</dfn>. Other specifications can define more.</p>
 

Modified: index
===================================================================
--- index	2012-08-30 19:07:45 UTC (rev 7303)
+++ index	2012-08-31 23:46:27 UTC (rev 7304)
@@ -246,7 +246,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 30 August 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 31 August 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -13988,7 +13988,14 @@
 
   </dl><div class=impl>
 
-  <p>When called with two or fewer arguments, the method must act as
+  <p><code><a href=#document>Document</a></code> objects have an
+  <dfn id=ignore-opens-during-unload-counter>ignore-opens-during-unload counter</dfn>, which is used to
+  prevent scripts from invoking the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method (directly or
+  indirectly) while the document is <a href=#unload-a-document title="unload a
+  document">being unloaded</a>. Initially, the counter must be set
+  to zero.</p> <!-- http://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ -->
+
+  <p>When called with two or fewer arguments, the <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> method must act as
   follows:</p>
 
   <ol><li>If the <code><a href=#document>Document</a></code> object is not flagged as an <a href=#html-documents title="HTML documents">HTML document</a>, throw an
@@ -14005,13 +14012,13 @@
 
    <li>
 
-    <p>If the document has an <a href=#active-parser>active parser</a> that isn't a
-    <a href=#script-created-parser>script-created parser</a>, and the <a href=#insertion-point>insertion
-    point</a> associated with that parser's <a href=#input-stream>input
-    stream</a> is not undefined (that is, it <em>does</em> point to
-    somewhere in the input stream), then the method does
-    nothing. Abort these steps and return the <code><a href=#document>Document</a></code>
-    object on which the method was invoked.</p>
+    <p>If the <code><a href=#document>Document</a></code> has an <a href=#active-parser>active parser</a>
+    that isn't a <a href=#script-created-parser>script-created parser</a>, and the
+    <a href=#insertion-point>insertion point</a> associated with that parser's
+    <a href=#input-stream>input stream</a> is not undefined (that is, it
+    <em>does</em> point to somewhere in the input stream), then the
+    method does nothing. Abort these steps and return the
+    <code><a href=#document>Document</a></code> object on which the method was invoked.</p>
 
     <p class=note>This basically causes <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> to be ignored
     when it's called in an inline script found during the parsing of
@@ -14021,6 +14028,20 @@
 
    </li>
 
+   <li>
+
+    <p>Similarly, if the <code><a href=#document>Document</a></code>'s
+    <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> is greater than
+    zero, then the method does nothing. Abort these steps and return
+    the <code><a href=#document>Document</a></code> object on which the method was
+    invoked.</p>
+
+    <p class=note>This basically causes <code title=dom-document-open><a href=#dom-document-open>document.open()</a></code> to be ignored
+    when it's called from a <code title=event-beforeunload>beforeunload</code> <code title=event-pagehide><a href=#event-pagehide>pagehide</a></code>, or <code title=event-unload>unload</code> event handler while the
+    <code><a href=#document>Document</a></code> is being unloaded.</p>
+
+   </li>
+
    <li><p>Release the <a href=#storage-mutex>storage mutex</a>.</li>
 
    <li><p>Set the <code><a href=#document>Document</a></code>'s <var title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></var> state to
@@ -14029,7 +14050,8 @@
    <li><p><a href=#prompt-to-unload-a-document title="prompt to unload a document">Prompt to
    unload</a> the <code><a href=#document>Document</a></code> object. If the user
    <a href=#refused-to-allow-the-document-to-be-unloaded>refused to allow the document to be unloaded</a>, then
-   these steps must be aborted.</li>
+   abort these steps and return the <code><a href=#document>Document</a></code> object on
+   which the method was invoked.</li>
 
    <li><p><a href=#unload-a-document title="unload a document">Unload</a> the
    <code><a href=#document>Document</a></code> object, with the <var title="">recycle</var>
@@ -14279,9 +14301,11 @@
 
    <li>
 
-    <p>If the <a href=#insertion-point>insertion point</a> is undefined and the
-    <code><a href=#document>Document</a></code>'s <a href=#ignore-destructive-writes-counter>ignore-destructive-writes
-    counter</a> is greater than zero, then abort these steps.</p>
+    <p>If the <a href=#insertion-point>insertion point</a> is undefined and either the
+    <code><a href=#document>Document</a></code>'s <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload
+    counter</a> is greater than zero or the <code><a href=#document>Document</a></code>'s
+    <a href=#ignore-destructive-writes-counter>ignore-destructive-writes counter</a> is greater than
+    zero, abort these steps.</p>
 
    </li>
 
@@ -71451,6 +71475,9 @@
   <ol><li><p>Increase the <a href=#event-loop>event loop</a>'s <a href=#termination-nesting-level>termination
    nesting level</a> by one.</li>
 
+   <li><p>Increase the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
    <li><p>Let <var title="">event</var> be a new
    <code><a href=#beforeunloadevent>BeforeUnloadEvent</a></code> event object with the name <code title=event-beforeunload>beforeunload</code>, which does not
    bubble but is cancelable.</li>
@@ -71491,7 +71518,7 @@
    <li><p>If this algorithm was invoked by another instance of the
    "prompt to unload a document" algorithm (i.e. through the steps
    below that invoke this algorithm for all descendant browsing
-   contexts), then abort these steps here.</li>
+   contexts), then jump to the step labeled <i>end</i>.</li>
 
    <li><p>Let <var title="">descendants</var> be the <a href=#list-of-the-descendant-browsing-contexts>list of the
    descendant browsing contexts</a> of the
@@ -71509,7 +71536,7 @@
      <a href=#refused-to-allow-the-document-to-be-unloaded>refused to allow the document to be unloaded</a>, then
      the user implicitly also <a href=#refused-to-allow-the-document-to-be-unloaded title="refused to allow the
      document to be unloaded">refused to allow <em>this</em> document
-     to be unloaded</a>; abort these steps.</p>
+     to be unloaded</a>; jump to the step labeled <i>end</i>.</p>
 
      <li><p>If <var title=concept-document-salvageable><a href=#concept-document-salvageable>salvageable</a></var> state of
      the <a href=#active-document>active document</a> of the <a href=#browsing-context>browsing
@@ -71518,6 +71545,9 @@
 
     </ol></li>
 
+   <li><p><i>End</i>: Decrease the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
   </ol><p>When a user agent is to <dfn id=unload-a-document>unload a document</dfn>, it must run
   the following steps. These steps are passed an argument, <var title="">recycle</var>, which is either true or false, indicating
   whether the <code><a href=#document>Document</a></code> object is going to be
@@ -71526,6 +71556,9 @@
   <ol><li><p>Increase the <a href=#event-loop>event loop</a>'s <a href=#termination-nesting-level>termination
    nesting level</a> by one.</li>
 
+   <li><p>Increase the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
    <li><p>Fire a <code title=event-pagehide><a href=#event-pagehide>pagehide</a></code> event at
    the <code><a href=#window>Window</a></code> object of the <code><a href=#document>Document</a></code>, but
    with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
@@ -71565,9 +71598,9 @@
    <a href=#other-applicable-specifications>other applicable specifications</a>.</li>
 
    <li><p>If this algorithm was invoked by another instance of the
-   "unload a document" algorithm (i.e. through the steps below that
-   invoke this algorithm for all descendant browsing contexts), then
-   abort these steps here.</li>
+   "unload a document" algorithm (i.e. by the steps below that invoke
+   this algorithm for all descendant browsing contexts), then jump to
+   the step labeled <i>end</i>.</li>
 
    <li><p>Let <var title="">descendants</var> be the <a href=#list-of-the-descendant-browsing-contexts>list of the
    descendant browsing contexts</a> of the
@@ -71595,6 +71628,9 @@
    <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a> must <a href=#discard-a-document title="discard a document">discard the
    <code>Document</code></a>.</li>
 
+   <li><p><i>End</i>: Decrease the <code><a href=#document>Document</a></code>'s
+   <a href=#ignore-opens-during-unload-counter>ignore-opens-during-unload counter</a> by one.</li>
+
   </ol><p>This specification defines the following <dfn id=unloading-document-cleanup-steps>unloading document
   cleanup steps</dfn>. Other specifications can define more.</p>
 

Modified: source
===================================================================
--- source	2012-08-30 19:07:45 UTC (rev 7303)
+++ source	2012-08-31 23:46:27 UTC (rev 7304)
@@ -14741,7 +14741,16 @@
 
   <div class="impl">
 
-  <p>When called with two or fewer arguments, the method must act as
+  <p><code>Document</code> objects have an
+  <dfn>ignore-opens-during-unload counter</dfn>, which is used to
+  prevent scripts from invoking the <code
+  title="dom-document-open">document.open()</code> method (directly or
+  indirectly) while the document is <span title="unload a
+  document">being unloaded</span>. Initially, the counter must be set
+  to zero.</p> <!-- http://www.hixie.ch/tests/adhoc/dom/level0/document/open/unload/ -->
+
+  <p>When called with two or fewer arguments, the <code
+  title="dom-document-open">document.open()</code> method must act as
   follows:</p>
 
   <ol>
@@ -14761,13 +14770,13 @@
 
    <li>
 
-    <p>If the document has an <span>active parser</span> that isn't a
-    <span>script-created parser</span>, and the <span>insertion
-    point</span> associated with that parser's <span>input
-    stream</span> is not undefined (that is, it <em>does</em> point to
-    somewhere in the input stream), then the method does
-    nothing. Abort these steps and return the <code>Document</code>
-    object on which the method was invoked.</p>
+    <p>If the <code>Document</code> has an <span>active parser</span>
+    that isn't a <span>script-created parser</span>, and the
+    <span>insertion point</span> associated with that parser's
+    <span>input stream</span> is not undefined (that is, it
+    <em>does</em> point to somewhere in the input stream), then the
+    method does nothing. Abort these steps and return the
+    <code>Document</code> object on which the method was invoked.</p>
 
     <p class="note">This basically causes <code
     title="dom-document-open">document.open()</code> to be ignored
@@ -14778,6 +14787,24 @@
 
    </li>
 
+   <li>
+
+    <p>Similarly, if the <code>Document</code>'s
+    <span>ignore-opens-during-unload counter</span> is greater than
+    zero, then the method does nothing. Abort these steps and return
+    the <code>Document</code> object on which the method was
+    invoked.</p>
+
+    <p class="note">This basically causes <code
+    title="dom-document-open">document.open()</code> to be ignored
+    when it's called from a <code
+    title="event-beforeunload">beforeunload</code> <code
+    title="event-pagehide">pagehide</code>, or <code
+    title="event-unload">unload</code> event handler while the
+    <code>Document</code> is being unloaded.</p>
+
+   </li>
+
    <li><p>Release the <span>storage mutex</span>.</p></li>
 
    <li><p>Set the <code>Document</code>'s <var
@@ -14787,7 +14814,8 @@
    <li><p><span title="prompt to unload a document">Prompt to
    unload</span> the <code>Document</code> object. If the user
    <span>refused to allow the document to be unloaded</span>, then
-   these steps must be aborted.</p></li>
+   abort these steps and return the <code>Document</code> object on
+   which the method was invoked.</p></li>
 
    <li><p><span title="unload a document">Unload</span> the
    <code>Document</code> object, with the <var title="">recycle</var>
@@ -15069,9 +15097,11 @@
 
    <li>
 
-    <p>If the <span>insertion point</span> is undefined and the
-    <code>Document</code>'s <span>ignore-destructive-writes
-    counter</span> is greater than zero, then abort these steps.</p>
+    <p>If the <span>insertion point</span> is undefined and either the
+    <code>Document</code>'s <span>ignore-opens-during-unload
+    counter</span> is greater than zero or the <code>Document</code>'s
+    <span>ignore-destructive-writes counter</span> is greater than
+    zero, abort these steps.</p>
 
    </li>
 
@@ -83515,6 +83545,9 @@
    <li><p>Increase the <span>event loop</span>'s <span>termination
    nesting level</span> by one.</p></li>
 
+   <li><p>Increase the <code>Document</code>'s
+   <span>ignore-opens-during-unload counter</span> by one.</p></li>
+
    <li><p>Let <var title="">event</var> be a new
    <code>BeforeUnloadEvent</code> event object with the name <code
    title="event-beforeunload">beforeunload</code>, which does not
@@ -83559,7 +83592,7 @@
    <li><p>If this algorithm was invoked by another instance of the
    "prompt to unload a document" algorithm (i.e. through the steps
    below that invoke this algorithm for all descendant browsing
-   contexts), then abort these steps here.</p></li>
+   contexts), then jump to the step labeled <i>end</i>.</p></li>
 
    <li><p>Let <var title="">descendants</var> be the <span>list of the
    descendant browsing contexts</span> of the
@@ -83579,7 +83612,7 @@
      <span>refused to allow the document to be unloaded</span>, then
      the user implicitly also <span title="refused to allow the
      document to be unloaded">refused to allow <em>this</em> document
-     to be unloaded</span>; abort these steps.</p>
+     to be unloaded</span>; jump to the step labeled <i>end</i>.</p>
 
      <li><p>If <var
      title="concept-document-salvageable">salvageable</var> state of
@@ -83592,6 +83625,9 @@
 
    </li>
 
+   <li><p><i>End</i>: Decrease the <code>Document</code>'s
+   <span>ignore-opens-during-unload counter</span> by one.</p></li>
+
   </ol>
 
   <p>When a user agent is to <dfn>unload a document</dfn>, it must run
@@ -83606,6 +83642,9 @@
    <li><p>Increase the <span>event loop</span>'s <span>termination
    nesting level</span> by one.</p></li>
 
+   <li><p>Increase the <code>Document</code>'s
+   <span>ignore-opens-during-unload counter</span> by one.</p></li>
+
    <li><p>Fire a <code title="event-pagehide">pagehide</code> event at
    the <code>Window</code> object of the <code>Document</code>, but
    with its <code title="dom-event-target">target</code> set to the
@@ -83648,9 +83687,9 @@
    <span>other applicable specifications</span>.</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
-   invoke this algorithm for all descendant browsing contexts), then
-   abort these steps here.</p></li>
+   "unload a document" algorithm (i.e. by the steps below that invoke
+   this algorithm for all descendant browsing contexts), then jump to
+   the step labeled <i>end</i>.</p></li>
 
    <li><p>Let <var title="">descendants</var> be the <span>list of the
    descendant browsing contexts</span> of the
@@ -83687,6 +83726,9 @@
    title="discard a document">discard the
    <code>Document</code></span>.</p></li>
 
+   <li><p><i>End</i>: Decrease the <code>Document</code>'s
+   <span>ignore-opens-during-unload counter</span> by one.</p></li>
+
   </ol>
 
   <p>This specification defines the following <dfn>unloading document




More information about the Commit-Watchers mailing list