- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 16 Jul 2008 21:11:55 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv10900 Modified Files: Overview.html Log Message: Fire 'unload' on a message port if it is .close()d or if its other end is garbage collected. (whatwg r1883) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1071 retrieving revision 1.1072 diff -u -d -r1.1071 -r1.1072 --- Overview.html 16 Jul 2008 20:03:37 -0000 1.1071 +++ Overview.html 16 Jul 2008 21:11:52 -0000 1.1072 @@ -1707,10 +1707,13 @@ <li><a href="#message0"><span class=secno>7.5.3 </span>Message ports</a> <ul class=toc> - <li><a href="#ports"><span class=secno>7.5.3.1. </span>Ports and + <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 browsing contexts</a> - <li><a href="#ports0"><span class=secno>7.5.3.2. </span>Ports and + <li><a href="#ports0"><span class=secno>7.5.3.3. </span>Ports and garbage collection</a> </ul> </ul> @@ -35278,8 +35281,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>deactivated</span> and - unentangled. + href="#active">active document</a>, must be <span>unentangled with + prejudice</span>. <p class=big-issue>Also, <code title=event-unload>unload</code> events should fire. @@ -42379,7 +42382,7 @@ <li> <p>Wait for all scripts in the <a href="#unit-of">unit of related - browsing contexts</a> to which the the <code><a + browsing contexts</a> to which the <code><a href="#window">Window</a></code> object on which the method was invoked belongs to have finished executing any pending scripts.</p> <!-- XXX define this in terms of the @@ -42466,7 +42469,7 @@ <li> <p>Wait for all scripts in the <a href="#unit-of">unit of related - browsing contexts</a> to which the the <code><a + browsing contexts</a> to which the <code><a href="#window">Window</a></code> object on which the method was invoked belongs to have finished executing any pending scripts.</p> <!-- XXX define this in terms of the @@ -42808,7 +42811,7 @@ <li> <p>Wait for all scripts in the <a href="#unit-of">unit of related - browsing contexts</a> to which the the <a href="#ownerwindow" + browsing contexts</a> to which the <a href="#ownerwindow" title=dom-MessagePort-ownerWindow>owner</a> of the <var title="">target port</var> belongs to have executed to completion, and then dispatch the event at the <var title="">target port</var> object. If this never @@ -42823,34 +42826,10 @@ <p>The <dfn id=close2 title=dom-MessagePort-close><code>close()</code></dfn> method, when called - on a port <var title="">local port</var>, must cause the user agent to run - the following steps: - - <ol> - <li> - <p>If <var title="">local port</var> is entangled with another port, then - let <var title="">remote port</var> be that port and run these substeps:</p> - - <ol> - <li> - <p>Unentangle <var title="">remote port</var>, so that it is no longer - entangled with any ports. - - <li> - <p>Set the <code title=dom-MessagePort-active><a - href="#active0">active</a></code> attribute of <var title="">remote - port</var> to false. - - <li> - <p>Unentangle <var title="">local port</var>, so that it is no longer - entangled with any ports. - </ol> - - <li> - <p>Set the <code title=dom-MessagePort-active><a - href="#active0">active</a></code> attribute of <var title="">local - port</var> to false. - </ol> + 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. <hr> @@ -42894,13 +42873,38 @@ </dl> <p class=note>Nothing in this specification causes any <code - title=event-load><a href="#load0">load</a></code>, <code - title=event-error><a href="#error1">error</a></code>, or <code - title=event-unload>unload</code> events to be targetted at a <code><a - href="#messageport0">MessagePort</a></code> object. This feature is - intended for use with Workers. <a href="#references">[WORKERS]</a> + title=event-load><a href="#load0">load</a></code> or <code + title=event-error><a href="#error1">error</a></code> events to be + targetted at a <code><a href="#messageport0">MessagePort</a></code> + object. Those features are intended for use with Workers. <a + href="#references">[WORKERS]</a> - <h5 id=ports><span class=secno>7.5.3.1. </span>Ports and browsing contexts</h5> + <h5 id=unentangling><span class=secno>7.5.3.1. </span>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 + 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" @@ -42933,7 +42937,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.2. </span>Ports and garbage + <h5 id=ports0><span class=secno>7.5.3.3. </span>Ports and garbage collection</h5> <p>User agents must act as if <code><a @@ -42955,10 +42959,10 @@ </div> <p>When an entangled message port is about to be garbage collected, it must - be <a href="#deactivate" title="deactivate a port">deactivated</a> and - then 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. + be <span>unentangled with prejudice</span>, 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. <h2 id=syntax><span class=secno>8. </span>The HTML syntax</h2>
Received on Wednesday, 16 July 2008 21:12:29 UTC