[html5] r2531 - [gow] (2) Simplify the way messages in ports are handled when the destination's [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Dec 15 17:01:38 PST 2008
Author: ianh
Date: 2008-12-15 17:01:37 -0800 (Mon, 15 Dec 2008)
New Revision: 2531
Modified:
index
source
Log:
[gow] (2) Simplify the way messages in ports are handled when the destination's document is not available.
Modified: index
===================================================================
--- index 2008-12-16 00:55:33 UTC (rev 2530)
+++ index 2008-12-16 01:01:37 UTC (rev 2531)
@@ -874,8 +874,7 @@
<li><a href=#message-channels><span class=secno>7.5.2 </span>Message channels</a></li>
<li><a href=#message-ports><span class=secno>7.5.3 </span>Message ports</a>
<ol>
- <li><a href=#message-port-discarding><span class=secno>7.5.3.1 </span>Ports and browsing contexts</a></li>
- <li><a href=#ports-and-garbage-collection><span class=secno>7.5.3.2 </span>Ports and garbage collection</a></ol></ol></ol></li>
+ <li><a href=#ports-and-garbage-collection><span class=secno>7.5.3.1 </span>Ports and garbage collection</a></ol></ol></ol></li>
<li><a href=#syntax><span class=secno>8 </span>The HTML syntax</a>
<ol>
<li><a href=#writing-html-documents><span class=secno>8.1 </span>Writing HTML documents</a>
@@ -44634,32 +44633,16 @@
method must open its port's <a href=#port-message-queue>port message queue</a>, if it
is not already open.</p>
- <p>When a port's <a href=#port-message-queue>port message queue</a> is open, contains
- an event, and its owner is <a href=#port-owner-available title="port owner
- available">available</a>, the user agent must <a href=#queue-a-task>queue a
- task</a> in the <a href=#event-loop>event loop</a> to dispatch the first
- event in the queue on the <code><a href=#messageport>MessagePort</a></code> object, and
- remove the event from the queue. The <a href=#task-source>task source</a> for
- this <a href=#concept-task title=concept-task>task</a> is the <a href=#posted-message-task-source>posted
- message task source</a>.</p>
+ <p>When a port's <a href=#port-message-queue>port message queue</a> is open and
+ contains an event, the user agent must <a href=#queue-a-task>queue a task</a> in
+ the <a href=#event-loop>event loop</a> to dispatch the first event in the queue
+ on the <code><a href=#messageport>MessagePort</a></code> object, and remove the event from
+ the queue. The <a href=#task-source>task source</a> for this <a href=#concept-task title=concept-task>task</a> is the <a href=#posted-message-task-source>posted message task
+ source</a>.</p>
- <p>A <code><a href=#messageport>MessagePort</a></code>'s owner is <dfn id=port-owner-available title="port owner
- available">available</dfn> if the <code><a href=#messageport>MessagePort</a></code> is owned
- by an object other than a <code><a href=#window>Window</a></code> object, or if it is
- owned by a <code><a href=#window>Window</a></code> object and the <code>Document</code>
- that was the <a href=#active-document>active document</a> in that <a href=#browsing-context>browsing
- context</a> when the <code><a href=#messageport>MessagePort</a></code> was created is
- <a href=#fully-active>fully active</a>. If that <code>Document</code> is
- discarded before the port's owner becomes available, then the events
- are lost.</p>
+ <p class=note>If the <a href=#script-group>script group</a> of the port's event
+ handlers is <i>frozen</i>, then the messages are lost.</p>
- <!-- XXX when we have sorted out the global object mess, if that
- makes this easier to fix, then fix it better. (e.g. maybe just say
- that callback tasks aren't processed if they involve firing a
- callback that wouldn't fire because the code is swapped out? not
- sure how you'd handle prioritisation, i guess you'd just pretend
- those events weren't there for the time being) -->
-
<hr><p>The <dfn id=dom-messageport-close 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 user agents to run the
@@ -44701,36 +44684,11 @@
<dt><dfn id=handler-messageport-onclose title=handler-MessagePort-onclose><code>onclose</code></dfn></dt>
- <dd><p>Must be invoked whenever an <code title=event-close>close</code> event is targeted at or bubbles
+ <dd><p>Must be invoked whenever a <code title=event-close>close</code> event is targeted at or bubbles
through the <code><a href=#messageport>MessagePort</a></code> object.</dd>
- </dl><h5 id=message-port-discarding><span class=secno>7.5.3.1 </span>Ports and browsing contexts</h5>
+ </dl><h5 id=ports-and-garbage-collection><span class=secno>7.5.3.1 </span>Ports and garbage collection</h5>
- <p>When a <code>Document</code> is <a href=#discard-a-document title="discard a
- document">discarded</a>, if there are any
- <code><a href=#messageport>MessagePort</a></code> objects that:</p>
-
- <ul class=brief><li>are entangled, and</li>
- <li>are owned by the <a href=#browsing-context>browsing context</a> that contained that <code>Document</code>, and</li>
- <li>were created while that <code>Document</code> was the <a href=#active-document>active document</a> of that <a href=#browsing-context>browsing context</a>, and</li>
- <li>are entangled with a port that is either not owned by that <a href=#browsing-context>browsing context</a>, or were not created while that <code>Document</code> was the <a href=#active-document>active document</a> of that <a href=#browsing-context>browsing context</a>,</li>
- </ul><p>...then the user agent must run the following steps for each such
- port:</p>
-
- <ol><li><p>Let <var title="">surviving port</var> be the port with
- which the <code><a href=#messageport>MessagePort</a></code> object in question is
- entangled.</li>
-
- <li><p>Unentangle the two ports.</li>
-
- <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> called <code title=event-close>close</code> at
- <var title="">surviving port</var>. The <a href=#task-source>task source</a>
- for this <a href=#concept-task title=concept-task>task</a> is the <a href=#posted-message-task-source>posted
- message task source</a>.</li>
-
- </ol><h5 id=ports-and-garbage-collection><span class=secno>7.5.3.2 </span>Ports and garbage collection</h5>
-
<p>User agents must act as if <code><a href=#messageport>MessagePort</a></code> objects have
a strong reference to their entangled <code><a href=#messageport>MessagePort</a></code>
object.</p>
Modified: source
===================================================================
--- source 2008-12-16 00:55:33 UTC (rev 2530)
+++ source 2008-12-16 01:01:37 UTC (rev 2531)
@@ -50979,32 +50979,17 @@
method must open its port's <span>port message queue</span>, if it
is not already open.</p>
- <p>When a port's <span>port message queue</span> is open, contains
- an event, and its owner is <span title="port owner
- available">available</span>, the user agent must <span>queue a
- task</span> in the <span>event loop</span> to dispatch the first
- event in the queue on the <code>MessagePort</code> object, and
- remove the event from the queue. The <span>task source</span> for
- this <span title="concept-task">task</span> is the <span>posted
- message task source</span>.</p>
+ <p>When a port's <span>port message queue</span> is open and
+ contains an event, the user agent must <span>queue a task</span> in
+ the <span>event loop</span> to dispatch the first event in the queue
+ on the <code>MessagePort</code> object, and remove the event from
+ the queue. The <span>task source</span> for this <span
+ title="concept-task">task</span> is the <span>posted message task
+ source</span>.</p>
- <p>A <code>MessagePort</code>'s owner is <dfn title="port owner
- available">available</dfn> if the <code>MessagePort</code> is owned
- by an object other than a <code>Window</code> object, or if it is
- owned by a <code>Window</code> object and the <code>Document</code>
- that was the <span>active document</span> in that <span>browsing
- context</span> when the <code>MessagePort</code> was created is
- <span>fully active</span>. If that <code>Document</code> is
- discarded before the port's owner becomes available, then the events
- are lost.</p>
+ <p class="note">If the <span>script group</span> of the port's event
+ handlers is <i>frozen</i>, then the messages are lost.</p>
- <!-- XXX when we have sorted out the global object mess, if that
- makes this easier to fix, then fix it better. (e.g. maybe just say
- that callback tasks aren't processed if they involve firing a
- callback that wouldn't fire because the code is swapped out? not
- sure how you'd handle prioritisation, i guess you'd just pretend
- those events weren't there for the time being) -->
-
<hr>
<p>The <dfn title="dom-MessagePort-close"><code>close()</code></dfn>
@@ -51059,7 +51044,7 @@
<dt><dfn title="handler-MessagePort-onclose"><code>onclose</code></dfn></dt>
- <dd><p>Must be invoked whenever an <code
+ <dd><p>Must be invoked whenever a <code
title="event-close">close</code> event is targeted at or bubbles
through the <code>MessagePort</code> object.</p></dd>
@@ -51067,42 +51052,6 @@
-
-
- <h5 id="message-port-discarding">Ports and browsing contexts</h5>
-
- <p>When a <code>Document</code> is <span title="discard a
- document">discarded</span>, if there are any
- <code>MessagePort</code> objects that:</p>
-
- <ul class="brief">
- <li>are entangled, and</li>
- <li>are owned by the <span>browsing context</span> that contained that <code>Document</code>, and</li>
- <li>were created while that <code>Document</code> was the <span>active document</span> of that <span>browsing context</span>, and</li>
- <li>are entangled with a port that is either not owned by that <span>browsing context</span>, or were not created while that <code>Document</code> was the <span>active document</span> of that <span>browsing context</span>,</li>
- </ul>
-
- <p>...then the user agent must run the following steps for each such
- port:</p>
-
- <ol>
-
- <li><p>Let <var title="">surviving port</var> be the port with
- which the <code>MessagePort</code> object in question is
- entangled.</p></li>
-
- <li><p>Unentangle the two ports.</p></li>
-
- <li><p><span>Queue a task</span> to <span>fire a simple
- event</span> called <code title="event-close">close</code> at
- <var title="">surviving port</var>. The <span>task source</span>
- for this <span title="concept-task">task</span> is the <span>posted
- message task source</span>.</p></li>
-
- </ol>
-
-
-
<h5>Ports and garbage collection</h5>
<p>User agents must act as if <code>MessagePort</code> objects have
More information about the Commit-Watchers
mailing list