- From: poot <cvsmail@w3.org>
- Date: Thu, 17 Jul 2008 06:15:32 +0900 (JST)
- To: public-html-diffs@w3.org
Fire 'unload' on a message port if it is .close()d or if its other end is garbage collected. (whatwg r1883) (changed by: Ian Hickson) Diffs for this change per section: postMessage(message, targetOrigin) http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#postmessage close() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#close2 reactivate a port http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#reactivate onunload http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#onunload0 8. The HTML syntax http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#syntax 7.5.3.2. Ports and browsing contexts http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#ports 7.5.3.1. Unentangling http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#unentangling discard a Document http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#discard unentangle a port with prejudice http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#unentangle postMessage() http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#postmessage1 postMessage(message, messagePort, targetOrigin) http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#postmessage0 7.5.3.3. Ports and garbage collection http://people.w3.org/mike/diffs/html5/spec/Overview.1.1072.html#ports0 Current content per affected section: http://dev.w3.org/html5/spec/Overview.html#postmessage http://dev.w3.org/html5/spec/Overview.html#close2 http://dev.w3.org/html5/spec/Overview.html#reactivate http://dev.w3.org/html5/spec/Overview.html#onunload0 http://dev.w3.org/html5/spec/Overview.html#syntax http://dev.w3.org/html5/spec/Overview.html#ports http://dev.w3.org/html5/spec/Overview.html#unentangling http://dev.w3.org/html5/spec/Overview.html#discard http://dev.w3.org/html5/spec/Overview.html#unentangle http://dev.w3.org/html5/spec/Overview.html#postmessage1 http://dev.w3.org/html5/spec/Overview.html#postmessage0 http://dev.w3.org/html5/spec/Overview.html#ports0 Previously published WD content per affected section: http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#postmessage http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#close2 http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#reactivate http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#onunload0 http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#syntax http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#ports http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#unentangling http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#discard http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#unentangle http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#postmessage1 http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#postmessage0 http://www.w3.org/TR/2008/WD-html5-20080610/single-page/#ports0 Cumulative diff: http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1071&r2=1.1072&f=h http://html5.org/tools/web-apps-tracker?from=1882&to=1883 =================================================================== 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:16:09 UTC