W3C home > Mailing lists > Public > public-html-commits@w3.org > December 2008

html5/spec Overview.html,1.1702,1.1703

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 16 Dec 2008 01:34:00 +0000
To: public-html-commits@w3.org
Message-Id: <E1LCOoy-0000TU-9U@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv1805

Modified Files:
	Overview.html 
Log Message:
Drop MessagePort.onclose. Make MessagePort's message queue actually plug straight into the event loop so you can't lost events when sending ports across to other event loops. (whatwg r2532)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1702
retrieving revision 1.1703
diff -u -d -r1.1702 -r1.1703
--- Overview.html	16 Dec 2008 01:01:42 -0000	1.1702
+++ Overview.html	16 Dec 2008 01:33:57 -0000	1.1703
@@ -34383,11 +34383,7 @@
   must be the empty string, the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be the
   empty string, the <code title=dom-MessageEvent-source><a href=#dom-messageevent-source>source</a></code> attribute must be
   null, and the <code title=dom-MessageEvent-messagePort><a href=#dom-messageevent-messageport>messagePort</a></code>
-  attribute must be null.</p><hr><p><a href=#concept-task title=concept-task>Tasks</a> in <a href=#server-sent-events>server-sent
-  events</a> and <a href=#network>Web Sockets</a> use their own <a href=#task-source title="task source">task sources</a>, but the <a href=#task-source>task
-  source</a> for the <a href=#concept-task title=concept-task>tasks</a> in
-  <a href=#crossDocumentMessages>cross-document messaging</a> and <a href=#channel-messaging>channel
-  messaging</a> is the <dfn id=posted-message-task-source>posted message task source</dfn>.<h3 id=server-sent-events><span class=secno>7.2 </span><dfn>Server-sent events</dfn></h3><!-- eventsource --><p>This section describes a mechanism for allowing servers to
+  attribute must be null.<h3 id=server-sent-events><span class=secno>7.2 </span><dfn>Server-sent events</dfn></h3><!-- eventsource --><p>This section describes a mechanism for allowing servers to
   dispatch DOM events into documents that expect it. The
   <code><a href=#the-eventsource-element>eventsource</a></code> element provides a simple interface to
   this mechanism.<h4 id=the-remoteeventtarget-interface><span class=secno>7.2.1 </span>The <code><a href=#remoteeventtarget>RemoteEventTarget</a></code> interface</h4><p>Any object that implements the <code>EventTarget</code> interface
@@ -35474,7 +35470,8 @@
   not hostile. This section introduces a messaging system that allows
   documents to communicate with each other regardless of their source
   domain, in a way designed to not enable cross-site scripting
-  attacks.<h4 id=introduction-5><span class=secno>7.4.1 </span>Introduction</h4><p><em>This section is non-normative.</em><div class=example>
+  attacks.<p>The <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> in <a href=#crossDocumentMessages>cross-document
+  messaging</a> is the <dfn id=posted-message-task-source>posted message task source</dfn>.<h4 id=introduction-5><span class=secno>7.4.1 </span>Introduction</h4><p><em>This section is non-normative.</em><div class=example>
 
    <p>For example, if document A contains an <code><a href=#the-iframe-element>iframe</a></code>
    element that contains document B, and script in document A calls
@@ -35723,13 +35720,12 @@
 
   // event handler attributes
            attribute <span>EventListener</span> <a href=#handler-messageport-onmessage title=handler-MessagePort-onmessage>onmessage</a>;
-           attribute <span>EventListener</span> <a href=#handler-messageport-onclose title=handler-MessagePort-onclose>onclose</a>;
 };</pre><p>Objects implementing the <code><a href=#messageport>MessagePort</a></code> interface must
   also implement the <code>EventTarget</code> interface.<p>Each <code><a href=#messageport>MessagePort</a></code> object can be entangled with
   another (a symmetric relationship). Each <code><a href=#messageport>MessagePort</a></code>
-  object also has a <dfn id=port-message-queue>port message queue</dfn>, initial empty. A
-  <a href=#port-message-queue>port message queue</a> can be open or closed, and is
-  initially closed.<p>When the user agent is to <dfn id=create-a-new-messageport-object>create a new
+  object also has a <a href=#task-source>task source</a> called the <dfn id=port-message-queue>port
+  message queue</dfn>, initial empty. A <a href=#port-message-queue>port message
+  queue</a> can be open or closed, and is initially closed.<p>When the user agent is to <dfn id=create-a-new-messageport-object>create a new
   <code>MessagePort</code> object</dfn> owned by a <a href=#script-s-global-object>script's
   global object</a> object <var title="">owner</var>, it must
   instantiate a new <code><a href=#messageport>MessagePort</a></code> object, and let its owner
@@ -35791,9 +35787,8 @@
    <li><p>If the <var title="">source port</var> is not entangled with
    another port, then return and abort these steps.</li>
    <!-- we don't raise an exception because this can happen moment's
-   notice. listen to onclose if you want to know when things start
-   going wonky. (We don't return false because if the port is _about_
-   to be closed, the message might not be listened for anyway.) -->
+   notice. we don't return false because if the port is _about_
+   to be closed, the message might not be listened for anyway. -->
 
    <li><p>Let <var title="">target port</var> be the port with which
    <var title="">source port</var> is entangled.</li>
@@ -35854,10 +35849,9 @@
    another port, then return <var title="">port1</var> and abort these
    steps.</p></li>
    <!- - we don't raise an exception because this can happen moment's
-   notice. listen to onclose if you want to know when things start
-   going wonky. (We don't return null because then we'd end up with
+   notice. we don't return null because then we'd end up with
    null derefs. better to just let the likely next postMessage call
-   fall on the floor) - ->
+   fall on the floor. - ->
 
    <li><p>Let <var title="">target port</var> be the port with which
    <var title="">source port</var> is entangled.</p></li>
@@ -35891,30 +35885,14 @@
   </ol>
 --><hr><p>The <dfn id=dom-messageport-start title=dom-MessagePort-start><code>start()</code></dfn>
   method must open its port's <a href=#port-message-queue>port message queue</a>, if it
-  is not already open.<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 class=note>If the <a href=#script-group>script group</a> of the port's event
+  is not already open.<p>When a port's <a href=#port-message-queue>port message queue</a> is open, the
+  <a href=#event-loop>event loop</a> must use it as one of its <a href=#task-source title="task
+  source">task sources</a>.<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><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
-  following steps:<ol><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 the
-   port on which the method was called.</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 the
-   other port.</li>
-
-  </ol><p>The <a href=#task-source>task source</a> for the two <a href=#concept-task title=concept-task>tasks</a> above is the <a href=#posted-message-task-source>posted message
-  task source</a>.
-
-  <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 <a href=#event-handler-dom-attributes>event handler DOM attributes</a>
+  entangled with another port, must cause the user agents to
+  unentangle the two ports. 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 <a href=#event-handler-dom-attributes>event handler DOM attributes</a>
   that must be supported by objects implementing the
   <code><a href=#messageport>MessagePort</a></code> interface:<dl><dt><dfn id=handler-messageport-onmessage title=handler-MessagePort-onmessage><code>onmessage</code></dfn></dt>
 
@@ -35930,11 +35908,6 @@
 
    </dd>
 
-   <dt><dfn id=handler-messageport-onclose title=handler-MessagePort-onclose><code>onclose</code></dfn></dt>
-
-   <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=ports-and-garbage-collection><span class=secno>7.5.3.1 </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.<div class=note>
Received on Tuesday, 16 December 2008 01:34:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 16 December 2008 01:34:11 GMT