[html5] r1884 - [] (0) Making garbage collection fire an event was a stupid idea. Let's only mak [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jul 16 17:11:56 PDT 2008
Author: ianh
Date: 2008-07-16 17:11:56 -0700 (Wed, 16 Jul 2008)
New Revision: 1884
Modified:
index
source
Log:
[] (0) Making garbage collection fire an event was a stupid idea. Let's only make an explicit .close() cause unload to be fired.
Modified: index
===================================================================
--- index 2008-07-16 21:11:48 UTC (rev 1883)
+++ index 2008-07-17 00:11:56 UTC (rev 1884)
@@ -25,7 +25,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft>Draft Recommendation — 16 July
+ <h2 class="no-num no-toc" id=draft>Draft Recommendation — 17 July
2008</h2>
<p>You can take part in this work. <a
@@ -1645,13 +1645,10 @@
<li><a href="#message0"><span class=secno>7.5.3 </span>Message
ports</a>
<ul class=toc>
- <li><a href="#unentangling"><span class=secno>7.5.3.1.
- </span>Unentangling</a>
-
- <li><a href="#ports"><span class=secno>7.5.3.2. </span>Ports and
+ <li><a href="#ports"><span class=secno>7.5.3.1. </span>Ports and
browsing contexts</a>
- <li><a href="#ports0"><span class=secno>7.5.3.3. </span>Ports and
+ <li><a href="#ports0"><span class=secno>7.5.3.2. </span>Ports and
garbage collection</a>
</ul>
</ul>
@@ -35219,8 +35216,8 @@
message ports</a>, if the document is the <a href="#active">active
document</a>, or otherwise any ports in that document's <a
href="#list-of3">list of message ports</a>, if the document is not the <a
- href="#active">active document</a>, must be <span>unentangled with
- prejudice</span>.
+ href="#active">active document</a>, must be <span>deactivated</span> and
+ unentangled..
<p class=big-issue>Also, <code title=event-unload>unload</code> events
should fire.
@@ -42765,10 +42762,28 @@
<p>The <dfn id=close2
title=dom-MessagePort-close><code>close()</code></dfn> method, when called
on a port <var title="">local port</var> that is entangled with another
- port, must cause the <var title="">local port</var> to be
- <span>unentangled with prejudice</span>. If the method is called on a port
- that is not entangled, then the method must do nothing.
+ port, must cause the user agents to run the following steps:
+ <ol>
+ <li>
+ <p>Unentangle the two ports.
+
+ <li>
+ <p>Set both ports' <code title=dom-messageport-active><a
+ href="#active0">active</a></code> attribute to false.
+
+ <li>
+ <p>At the next available opportunity, after any scripts have finished
+ executing<!-- XXX queue -->, <a href="#firing2">fire a simple event</a>
+ called <code title=event-unload>unload</code> at each of the message
+ ports. If the two message ports are in the same <a href="#unit-of">unit
+ of related browsing contexts</a>, then the port on which the method was
+ called must receive the event first.
+ </ol>
+
+ <p>If the method is called on a port that is not entangled, then the method
+ must do nothing.
+
<hr>
<p>The following are the <a href="#event4">event handler DOM attributes</a>
@@ -42817,33 +42832,8 @@
object. Those features are intended for use with Workers. <a
href="#refsWORKERS">[WORKERS]</a>
- <h5 id=unentangling><span class=secno>7.5.3.1. </span>Unentangling</h5>
+ <h5 id=ports><span class=secno>7.5.3.1. </span>Ports and browsing contexts</h5>
- <p>A message port is entangled and unentangled as part of the normal
- processing of message channels. When a channel is closed permanently but
- in a controlled fashion, however, the user agent will be required to <dfn
- id=unentangle title="unentangle with prejudice">unentangle a port with
- prejudice</dfn>, which means it must run the following steps:
-
- <ol>
- <li>
- <p>Unentangle the two ports.
-
- <li>
- <p>Set both ports' <code title=dom-messageport-active><a
- href="#active0">active</a></code> attribute to false.
-
- <li>
- <p>At the next available opportunity, after any scripts have finished
- executing<!-- XXX queue -->, <a href="#firing2">fire a simple event</a>
- called <code title=event-unload>unload</code> at each of the message
- ports. If the two message ports are in the same <a href="#unit-of">unit
- of related browsing contexts</a>, then the port being unentangled with
- prejudice must receive the event first.
- </ol>
-
- <h5 id=ports><span class=secno>7.5.3.2. </span>Ports and browsing contexts</h5>
-
<p>During <a href="#traverse" title="traverse the history">session history
traversal</a> (e.g. when a user <a href="#navigate"
title=navigate>navigates</a> a <a href="#browsing1">browsing context</a>
@@ -42875,7 +42865,7 @@
href="#active0">active</a></code> attribute of the port's entangled port,
not its own attribute.
- <h5 id=ports0><span class=secno>7.5.3.3. </span>Ports and garbage
+ <h5 id=ports0><span class=secno>7.5.3.2. </span>Ports and garbage
collection</h5>
<p>User agents must act as if <code><a
@@ -42897,7 +42887,7 @@
</div>
<p>When an entangled message port is about to be garbage collected, it must
- be <span>unentangled with prejudice</span>, so that the two ports are no
+ be <span>deactivated</span> and unentangled, so that the two ports are no
longer related and so that the other port's <code
title=dom-MessagePort-active><a href="#active0">active</a></code>
attribute is set to false.
Modified: source
===================================================================
--- source 2008-07-16 21:11:48 UTC (rev 1883)
+++ source 2008-07-17 00:11:56 UTC (rev 1884)
@@ -32861,8 +32861,8 @@
message ports</span>, if the document is the <span>active
document</span>, or otherwise any ports in that document's
<span>list of message ports</span>, if the document is not the
- <span>active document</span>, must be <span>unentangled with
- prejudice</span>.</p>
+ <span>active document</span>, must be <span>deactivated</span> and
+ unentangled..</p>
<p class="big-issue">Also, <code title="event-unload">unload</code>
events should fire.</p>
@@ -40428,11 +40428,29 @@
<p>The <dfn title="dom-MessagePort-close"><code>close()</code></dfn>
method, when called on a port <var title="">local port</var> that is
- entangled with another port, must cause the <var title="">local
- port</var> to be <span>unentangled with prejudice</span>. If the
- method is called on a port that is not entangled, then the method
- must do nothing.</p>
+ entangled with another port, must cause the user agents to run the
+ following steps:</p>
+ <ol>
+
+ <li><p>Unentangle the two ports.</p></li>
+
+ <li><p>Set both ports' <code
+ title="dom-messageport-active">active</code> attribute to
+ false.</p></li>
+
+ <li><p>At the next available opportunity, after any scripts have
+ finished executing<!-- XXX queue -->, <span>fire a simple
+ event</span> called <code title="event-unload">unload</code> at
+ each of the message ports. If the two message ports are in the same
+ <span>unit of related browsing contexts</span>, then the port on
+ which the method was called must receive the event first.</p></li>
+
+ </ol>
+
+ <p>If the method is called on a port that is not entangled, then the
+ method must do nothing.</p>
+
<hr>
<p>The following are the <span>event handler DOM attributes</span>
@@ -40475,34 +40493,8 @@
- <h5>Unentangling</h5>
- <p>A message port is entangled and unentangled as part of the normal
- processing of message channels. When a channel is closed permanently
- but in a controlled fashion, however, the user agent will be
- required to <dfn title="unentangle with prejudice">unentangle a port
- with prejudice</dfn>, which means it must run the following
- steps:</p>
- <ol>
-
- <li><p>Unentangle the two ports.</p></li>
-
- <li><p>Set both ports' <code
- title="dom-messageport-active">active</code> attribute to
- false.</p></li>
-
- <li><p>At the next available opportunity, after any scripts have
- finished executing<!-- XXX queue -->, <span>fire a simple
- event</span> called <code title="event-unload">unload</code> at
- each of the message ports. If the two message ports are in the same
- <span>unit of related browsing contexts</span>, then the port being
- unentangled with prejudice must receive the event first.</p></li>
-
- </ol>
-
-
-
<h5>Ports and browsing contexts</h5>
<p>During <span title="traverse the history">session history
@@ -40561,7 +40553,7 @@
</div>
<p>When an entangled message port is about to be garbage collected,
- it must be <span>unentangled with prejudice</span>, so that the two
+ it must be <span>deactivated</span> and unentangled, so that the two
ports are no longer related and so that the other port's <code
title="dom-MessagePort-active">active</code> attribute is set to
false.</p>
More information about the Commit-Watchers
mailing list