[html5] r8864 - [e] (0) Fix the mess I made of port message queues. I'm pretty sure originally t [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Nov 26 16:29:47 PST 2014


Author: ianh
Date: 2014-11-26 16:29:43 -0800 (Wed, 26 Nov 2014)
New Revision: 8864

Modified:
   complete.html
   index
   source
Log:
[e] (0) Fix the mess I made of port message queues. I'm pretty sure originally they weren't task sources and I corrupted them at some point to be that without changing what I was putting in them. Anyway at this point it's easier just to say that they're real task sources and thus have tasks, even if those tasks have to now be a little more complicated than ideal.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=27208
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2014-11-26 23:06:18 UTC (rev 8863)
+++ complete.html	2014-11-27 00:29:43 UTC (rev 8864)
@@ -9925,7 +9925,7 @@
      consisting of the value of the element's <code id=pragma-directives:attr-meta-content-11><a href=#attr-meta-content>content</a></code>
      attribute encoded as UTF-8. <a href=#refsCOOKIES>[COOKIES]</a> <a href=#refsENCODING>[ENCODING]</a></ol>
 
-   </dl>
+   </dl><div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27164" title="Is there any known or planned way for Javascript to read and/or change the refresh time or the desti [...]">27164</a></div>
 
   <p>There must not be more than one <code id=pragma-directives:the-meta-element-15><a href=#the-meta-element>meta</a></code> element with any particular state in the
   document at a time.</p>
@@ -15752,7 +15752,7 @@
   
 
 
-  <h4 id=the-wbr-element>4.5.28 The <dfn><code>wbr</code></dfn> element</h4>
+  <h4 id=the-wbr-element>4.5.28 The <dfn><code>wbr</code></dfn> element</h4><div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27450" title="Any content inside wbr elements must not be considered part of the surrounding text. Which content??? it is an ampty element">27450</a>, <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27451" title="<pre>... Heading heading = Helm.HeadingFactory(HeadingCoordinates[1], <wbr>HeadingCoordinates[2], <w [...]">27451</a></div>
 
   <dl class=element><dt><a href=#concept-element-categories id=the-wbr-element:concept-element-categories>Categories</a>:<dd><a href=#flow-content-2 id=the-wbr-element:flow-content-2>Flow content</a>.<dd><a href=#phrasing-content-2 id=the-wbr-element:phrasing-content-2>Phrasing content</a>.<dt><a href=#concept-element-contexts id=the-wbr-element:concept-element-contexts>Contexts in which this element can be used</a>:<dd>Where <a href=#phrasing-content-2 id=the-wbr-element:phrasing-content-2-2>phrasing content</a> is expected.<dt><a href=#concept-element-content-model id=the-wbr-element:concept-element-content-model>Content model</a>:<dd><a href=#concept-content-nothing id=the-wbr-element:concept-content-nothing>Nothing</a>.<dt><a href=#concept-element-tag-omission id=the-wbr-element:concept-element-tag-omission>Tag omission in text/html</a>:<dd>No <a href=#syntax-end-tag id=the-wbr-element:syntax-end-tag>end tag</a>.<dt><a href=#concept-element-attributes id=the-wbr-element:
 concept-element-attributes>Content attributes</a>:<dd><a href=#global-attributes id=the-wbr-element:global-attributes>Global attributes</a><dt><a href=#concept-element-dom id=the-wbr-element:concept-element-dom>DOM interface</a>:<dd>Uses <code id=the-wbr-element:htmlelement><a href=#htmlelement>HTMLElement</a></code>.</dl>
 
@@ -58953,7 +58953,7 @@
   void <a href=#dom-history-forward id=the-history-interface:dom-history-forward>forward</a>();
   void <a href=#dom-history-pushstate id=the-history-interface:dom-history-pushstate>pushState</a>(any data, DOMString title, optional DOMString? url = null);
   void <a href=#dom-history-replacestate id=the-history-interface:dom-history-replacestate>replaceState</a>(any data, DOMString title, optional DOMString? url = null);
-};</pre><div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27184" title="Undo mushrooms and rewrite sentence: "This is the entry or that Document that was most the recently traversed to."">27184</a></div>
+};</pre>
 
   <dl class=domintro><dt><var>window</var> . <code id=the-history-interface:dom-history><a href=#dom-history>history</a></code> . <code id=the-history-interface:dom-history-length-2><a href=#dom-history-length>length</a></code><dd>
 
@@ -68389,17 +68389,25 @@
     array.</p>
 
    <li><p>If there is no <var>target port</var> (i.e. if <var>source port</var>
-   is not entangled), or if <var>doomed</var> is true, then abort these steps.<li><p>Create an event that uses the <code id=message-ports:messageevent><a href=#messageevent>MessageEvent</a></code> interface, with the name <code id=message-ports:event-message-2><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
-   default action.<li><p>Let the <code id=message-ports:dom-messageevent-data><a href=#dom-messageevent-data>data</a></code> attribute of the event be
-   initialised to the value of <var>message clone</var>.<li><p>Let the <code id=message-ports:dom-messageevent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute of the event be
-   initialised to the <var>new ports</var> array.<li><p>Add the event to the <a href=#port-message-queue id=message-ports:port-message-queue-12>port message queue</a> of <var>target
-   port</var>.</ol>
+   is not entangled), or if <var>doomed</var> is true, then abort these steps.<li><p>Create an event <var>e</var> that uses the <code id=message-ports:messageevent><a href=#messageevent>MessageEvent</a></code> interface, with the name <code id=message-ports:event-message-2><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
+   default action.<li><p>Let the <code id=message-ports:dom-messageevent-data><a href=#dom-messageevent-data>data</a></code> attribute of <var>e</var> be
+   initialised to the value of <var>message clone</var>.<li><p>Let the <code id=message-ports:dom-messageevent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute of <var>e</var> be
+   initialised to the <var>new ports</var> array.<li>
 
+    <p>Add a <a href=#concept-task id=message-ports:concept-task-6>task</a> that runs the following steps to the <a href=#port-message-queue id=message-ports:port-message-queue-12>port
+    message queue</a> of <var>target port</var>:</p>
 
+    <ol><li><p>Let <var>target</var> be the <code id=message-ports:messageport-13><a href=#messageport>MessagePort</a></code> in whose <a href=#port-message-queue id=message-ports:port-message-queue-13>port message
+     queue</a> the event <var>e</var> now finds itself.<div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27208" title=""Add the event to the port message queue of target port." This should actually be a task to fire the event. Now you are adding an event to something that expects a task, that seems bogus.">27208</a></div><li><p><a href=#concept-event-dispatch id=message-ports:concept-event-dispatch>Dispatch</a> <var>e</var> at
+     <var>target</var>.</ol>
+
+   </ol>
+
+
   <hr>
 
   <p>The <dfn id=dom-messageport-start><code>start()</code></dfn> method must enable its port's
-  <a href=#port-message-queue id=message-ports:port-message-queue-13>port message queue</a>, if it is not already enabled.<div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27208" title=""Add the event to the port message queue of target port." This should actually be a task to fire the event. Now you are adding an event to something that expects a task, that seems bogus.">27208</a></div>
+  <a href=#port-message-queue id=message-ports:port-message-queue-14>port message queue</a>, if it is not already enabled.</p>
 
   <hr>
 
@@ -68413,14 +68421,14 @@
   <hr>
 
   <p>The following are the <a href=#event-handlers id=message-ports:event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type id=message-ports:event-handler-event-type>event handler event types</a>) that must be supported, as <a href=#event-handler-idl-attributes id=message-ports:event-handler-idl-attributes>event
-  handler IDL attributes</a>, by all objects implementing the <code id=message-ports:messageport-13><a href=#messageport>MessagePort</a></code>
+  handler IDL attributes</a>, by all objects implementing the <code id=message-ports:messageport-14><a href=#messageport>MessagePort</a></code>
   interface:</p>
 
   <table><thead><tr><th><a href=#event-handlers id=message-ports:event-handlers-2>Event handler</a> <th><a href=#event-handler-event-type id=message-ports:event-handler-event-type-2>Event handler event type</a>
    <tbody><tr><td><dfn id=handler-messageport-onmessage><code>onmessage</code></dfn> <td> <code id=message-ports:event-message-3><a href=#event-message>message</a></code>
   </table>
 
-  <p>The first time a <code id=message-ports:messageport-14><a href=#messageport>MessagePort</a></code> object's <code id=message-ports:handler-messageport-onmessage-2><a href=#handler-messageport-onmessage>onmessage</a></code> IDL attribute is set, the port's <a href=#port-message-queue id=message-ports:port-message-queue-14>port
+  <p>The first time a <code id=message-ports:messageport-15><a href=#messageport>MessagePort</a></code> object's <code id=message-ports:handler-messageport-onmessage-2><a href=#handler-messageport-onmessage>onmessage</a></code> IDL attribute is set, the port's <a href=#port-message-queue id=message-ports:port-message-queue-15>port
   message queue</a> must be enabled, as if the <code id=message-ports:dom-messageport-start-3><a href=#dom-messageport-start>start()</a></code>
   method had been called.</p>
 
@@ -68533,9 +68541,9 @@
   </div>
 
   <p>Furthermore, a <code id=ports-and-garbage-collection:messageport-3><a href=#messageport>MessagePort</a></code> object must not be garbage collected while there exists
-  an event in a <a href=#task-queue id=ports-and-garbage-collection:task-queue>task queue</a> that is to be dispatched on that <code id=ports-and-garbage-collection:messageport-4><a href=#messageport>MessagePort</a></code>
+  an event referenced by a <a href=#concept-task id=ports-and-garbage-collection:concept-task>task</a> in a <a href=#task-queue id=ports-and-garbage-collection:task-queue>task queue</a> that is to be dispatched on that <code id=ports-and-garbage-collection:messageport-4><a href=#messageport>MessagePort</a></code>
   object, or while the <code id=ports-and-garbage-collection:messageport-5><a href=#messageport>MessagePort</a></code> object's <a href=#port-message-queue id=ports-and-garbage-collection:port-message-queue>port message queue</a> is enabled
-  and there exists a <code id=ports-and-garbage-collection:event-message><a href=#event-message>message</a></code> event in that queue.</p> 
+  and not empty.</p> 
 
   
 

Modified: index
===================================================================
--- index	2014-11-26 23:06:18 UTC (rev 8863)
+++ index	2014-11-27 00:29:43 UTC (rev 8864)
@@ -9925,7 +9925,7 @@
      consisting of the value of the element's <code id=pragma-directives:attr-meta-content-11><a href=#attr-meta-content>content</a></code>
      attribute encoded as UTF-8. <a href=#refsCOOKIES>[COOKIES]</a> <a href=#refsENCODING>[ENCODING]</a></ol>
 
-   </dl>
+   </dl><div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27164" title="Is there any known or planned way for Javascript to read and/or change the refresh time or the desti [...]">27164</a></div>
 
   <p>There must not be more than one <code id=pragma-directives:the-meta-element-15><a href=#the-meta-element>meta</a></code> element with any particular state in the
   document at a time.</p>
@@ -15752,7 +15752,7 @@
   
 
 
-  <h4 id=the-wbr-element>4.5.28 The <dfn><code>wbr</code></dfn> element</h4>
+  <h4 id=the-wbr-element>4.5.28 The <dfn><code>wbr</code></dfn> element</h4><div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27450" title="Any content inside wbr elements must not be considered part of the surrounding text. Which content??? it is an ampty element">27450</a>, <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27451" title="<pre>... Heading heading = Helm.HeadingFactory(HeadingCoordinates[1], <wbr>HeadingCoordinates[2], <w [...]">27451</a></div>
 
   <dl class=element><dt><a href=#concept-element-categories id=the-wbr-element:concept-element-categories>Categories</a>:<dd><a href=#flow-content-2 id=the-wbr-element:flow-content-2>Flow content</a>.<dd><a href=#phrasing-content-2 id=the-wbr-element:phrasing-content-2>Phrasing content</a>.<dt><a href=#concept-element-contexts id=the-wbr-element:concept-element-contexts>Contexts in which this element can be used</a>:<dd>Where <a href=#phrasing-content-2 id=the-wbr-element:phrasing-content-2-2>phrasing content</a> is expected.<dt><a href=#concept-element-content-model id=the-wbr-element:concept-element-content-model>Content model</a>:<dd><a href=#concept-content-nothing id=the-wbr-element:concept-content-nothing>Nothing</a>.<dt><a href=#concept-element-tag-omission id=the-wbr-element:concept-element-tag-omission>Tag omission in text/html</a>:<dd>No <a href=#syntax-end-tag id=the-wbr-element:syntax-end-tag>end tag</a>.<dt><a href=#concept-element-attributes id=the-wbr-element:
 concept-element-attributes>Content attributes</a>:<dd><a href=#global-attributes id=the-wbr-element:global-attributes>Global attributes</a><dt><a href=#concept-element-dom id=the-wbr-element:concept-element-dom>DOM interface</a>:<dd>Uses <code id=the-wbr-element:htmlelement><a href=#htmlelement>HTMLElement</a></code>.</dl>
 
@@ -58953,7 +58953,7 @@
   void <a href=#dom-history-forward id=the-history-interface:dom-history-forward>forward</a>();
   void <a href=#dom-history-pushstate id=the-history-interface:dom-history-pushstate>pushState</a>(any data, DOMString title, optional DOMString? url = null);
   void <a href=#dom-history-replacestate id=the-history-interface:dom-history-replacestate>replaceState</a>(any data, DOMString title, optional DOMString? url = null);
-};</pre><div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27184" title="Undo mushrooms and rewrite sentence: "This is the entry or that Document that was most the recently traversed to."">27184</a></div>
+};</pre>
 
   <dl class=domintro><dt><var>window</var> . <code id=the-history-interface:dom-history><a href=#dom-history>history</a></code> . <code id=the-history-interface:dom-history-length-2><a href=#dom-history-length>length</a></code><dd>
 
@@ -68389,17 +68389,25 @@
     array.</p>
 
    <li><p>If there is no <var>target port</var> (i.e. if <var>source port</var>
-   is not entangled), or if <var>doomed</var> is true, then abort these steps.<li><p>Create an event that uses the <code id=message-ports:messageevent><a href=#messageevent>MessageEvent</a></code> interface, with the name <code id=message-ports:event-message-2><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
-   default action.<li><p>Let the <code id=message-ports:dom-messageevent-data><a href=#dom-messageevent-data>data</a></code> attribute of the event be
-   initialised to the value of <var>message clone</var>.<li><p>Let the <code id=message-ports:dom-messageevent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute of the event be
-   initialised to the <var>new ports</var> array.<li><p>Add the event to the <a href=#port-message-queue id=message-ports:port-message-queue-12>port message queue</a> of <var>target
-   port</var>.</ol>
+   is not entangled), or if <var>doomed</var> is true, then abort these steps.<li><p>Create an event <var>e</var> that uses the <code id=message-ports:messageevent><a href=#messageevent>MessageEvent</a></code> interface, with the name <code id=message-ports:event-message-2><a href=#event-message>message</a></code>, which does not bubble, is not cancelable, and has no
+   default action.<li><p>Let the <code id=message-ports:dom-messageevent-data><a href=#dom-messageevent-data>data</a></code> attribute of <var>e</var> be
+   initialised to the value of <var>message clone</var>.<li><p>Let the <code id=message-ports:dom-messageevent-ports><a href=#dom-messageevent-ports>ports</a></code> attribute of <var>e</var> be
+   initialised to the <var>new ports</var> array.<li>
 
+    <p>Add a <a href=#concept-task id=message-ports:concept-task-6>task</a> that runs the following steps to the <a href=#port-message-queue id=message-ports:port-message-queue-12>port
+    message queue</a> of <var>target port</var>:</p>
 
+    <ol><li><p>Let <var>target</var> be the <code id=message-ports:messageport-13><a href=#messageport>MessagePort</a></code> in whose <a href=#port-message-queue id=message-ports:port-message-queue-13>port message
+     queue</a> the event <var>e</var> now finds itself.<div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27208" title=""Add the event to the port message queue of target port." This should actually be a task to fire the event. Now you are adding an event to something that expects a task, that seems bogus.">27208</a></div><li><p><a href=#concept-event-dispatch id=message-ports:concept-event-dispatch>Dispatch</a> <var>e</var> at
+     <var>target</var>.</ol>
+
+   </ol>
+
+
   <hr>
 
   <p>The <dfn id=dom-messageport-start><code>start()</code></dfn> method must enable its port's
-  <a href=#port-message-queue id=message-ports:port-message-queue-13>port message queue</a>, if it is not already enabled.<div class=status><input onclick=toggleStatus(this) value=⋰ type=button><p class=bugs><strong>Spec bugs:</strong> <a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=27208" title=""Add the event to the port message queue of target port." This should actually be a task to fire the event. Now you are adding an event to something that expects a task, that seems bogus.">27208</a></div>
+  <a href=#port-message-queue id=message-ports:port-message-queue-14>port message queue</a>, if it is not already enabled.</p>
 
   <hr>
 
@@ -68413,14 +68421,14 @@
   <hr>
 
   <p>The following are the <a href=#event-handlers id=message-ports:event-handlers>event handlers</a> (and their corresponding <a href=#event-handler-event-type id=message-ports:event-handler-event-type>event handler event types</a>) that must be supported, as <a href=#event-handler-idl-attributes id=message-ports:event-handler-idl-attributes>event
-  handler IDL attributes</a>, by all objects implementing the <code id=message-ports:messageport-13><a href=#messageport>MessagePort</a></code>
+  handler IDL attributes</a>, by all objects implementing the <code id=message-ports:messageport-14><a href=#messageport>MessagePort</a></code>
   interface:</p>
 
   <table><thead><tr><th><a href=#event-handlers id=message-ports:event-handlers-2>Event handler</a> <th><a href=#event-handler-event-type id=message-ports:event-handler-event-type-2>Event handler event type</a>
    <tbody><tr><td><dfn id=handler-messageport-onmessage><code>onmessage</code></dfn> <td> <code id=message-ports:event-message-3><a href=#event-message>message</a></code>
   </table>
 
-  <p>The first time a <code id=message-ports:messageport-14><a href=#messageport>MessagePort</a></code> object's <code id=message-ports:handler-messageport-onmessage-2><a href=#handler-messageport-onmessage>onmessage</a></code> IDL attribute is set, the port's <a href=#port-message-queue id=message-ports:port-message-queue-14>port
+  <p>The first time a <code id=message-ports:messageport-15><a href=#messageport>MessagePort</a></code> object's <code id=message-ports:handler-messageport-onmessage-2><a href=#handler-messageport-onmessage>onmessage</a></code> IDL attribute is set, the port's <a href=#port-message-queue id=message-ports:port-message-queue-15>port
   message queue</a> must be enabled, as if the <code id=message-ports:dom-messageport-start-3><a href=#dom-messageport-start>start()</a></code>
   method had been called.</p>
 
@@ -68533,9 +68541,9 @@
   </div>
 
   <p>Furthermore, a <code id=ports-and-garbage-collection:messageport-3><a href=#messageport>MessagePort</a></code> object must not be garbage collected while there exists
-  an event in a <a href=#task-queue id=ports-and-garbage-collection:task-queue>task queue</a> that is to be dispatched on that <code id=ports-and-garbage-collection:messageport-4><a href=#messageport>MessagePort</a></code>
+  an event referenced by a <a href=#concept-task id=ports-and-garbage-collection:concept-task>task</a> in a <a href=#task-queue id=ports-and-garbage-collection:task-queue>task queue</a> that is to be dispatched on that <code id=ports-and-garbage-collection:messageport-4><a href=#messageport>MessagePort</a></code>
   object, or while the <code id=ports-and-garbage-collection:messageport-5><a href=#messageport>MessagePort</a></code> object's <a href=#port-message-queue id=ports-and-garbage-collection:port-message-queue>port message queue</a> is enabled
-  and there exists a <code id=ports-and-garbage-collection:event-message><a href=#event-message>message</a></code> event in that queue.</p> 
+  and not empty.</p> 
 
   
 

Modified: source
===================================================================
--- source	2014-11-26 23:06:18 UTC (rev 8863)
+++ source	2014-11-27 00:29:43 UTC (rev 8864)
@@ -92711,19 +92711,33 @@
    algorithm runs scripts). We don't throw an exception for 'doomed' being true, because this can't
    necessarily be detected right now every time -->
 
-   <li><p>Create an event that uses the <code>MessageEvent</code> interface, with the name <code
+   <li><p>Create an event <var>e</var> that uses the <code>MessageEvent</code> interface, with the name <code
    data-x="event-message">message</code>, which does not bubble, is not cancelable, and has no
    default action.</p></li>
 
-   <li><p>Let the <code data-x="dom-MessageEvent-data">data</code> attribute of the event be
+   <li><p>Let the <code data-x="dom-MessageEvent-data">data</code> attribute of <var>e</var> be
    initialised to the value of <var>message clone</var>.</p></li>
 
-   <li><p>Let the <code data-x="dom-MessageEvent-ports">ports</code> attribute of the event be
+   <li><p>Let the <code data-x="dom-MessageEvent-ports">ports</code> attribute of <var>e</var> be
    initialised to the <var>new ports</var> array.</p></li>
 
-   <li><p>Add the event to the <span>port message queue</span> of <var>target
-   port</var>.</p></li>
+   <li>
 
+    <p>Add a <span data-x="concept-task">task</span> that runs the following steps to the <span>port
+    message queue</span> of <var>target port</var>:</p>
+
+    <ol>
+
+     <li><p>Let <var>target</var> be the <code>MessagePort</code> in whose <span>port message
+     queue</span> the event <var>e</var> now finds itself.</p></li>
+
+     <li><p><span data-x="concept-event-dispatch">Dispatch</span> <var>e</var> at
+     <var>target</var>.</p></li>
+    
+    </ol>
+
+   </li>
+
   </ol>
 
 <!--
@@ -92757,21 +92771,35 @@
    <li><p><span>Entangle</span> the <var>port1</var> and <var>port2</var>
    objects.</p></li>
 
-   <li><p>Create an event that uses the <code>MessageEvent</code> interface, with the name <code
+   <li><p>Create an event <var>e</var> that uses the <code>MessageEvent</code> interface, with the name <code
    data-x="event-message">message</code>, which does not bubble, is not cancelable, and has no
    default action.</p></li>
 
-   <li><p>Let the <code data-x="dom-MessageEvent-data">data</code> attribute of the event be
+   <li><p>Let the <code data-x="dom-MessageEvent-data">data</code> attribute of <var>e</var> be
    initialised to the value of <var>message</var>, the method's first argument.</p></li>
 
-   <li><p>Let the <code data-x="dom-MessageEvent-ports">ports</code> attribute of the event be
+   <li><p>Let the <code data-x="dom-MessageEvent-ports">ports</code> attribute of <var>e</var> be
    initialised to a <span data-x="dfn-read-only-array">read only</span> array containing only <var>port2</var>.</p></li>
 
    <li><p>Return <var>port1</var> from the method, but continue with these steps.</p></li>
 
-   <li><p>Add the event to the <span>port message queue</span> of <var>target
-   port</var>.</p></li>
+   <li>
 
+    <p>Add a <span data-x="concept-task">task</span> that runs the following steps to the <span>port
+    message queue</span> of <var>target port</var>:</p>
+
+    <ol>
+
+     <li><p>Let <var>target</var> be the <code>MessagePort</code> in whose <span>port message
+     queue</span> the event <var>e</var> now finds itself.</p></li>
+
+     <li><p><span data-x="concept-event-dispatch">Dispatch</span> <var>e</var> at
+     <var>target</var>.</p></li>
+    
+    </ol>
+
+   </li>
+
   </ol>
 -->
   <hr>
@@ -92819,6 +92847,10 @@
    specified by <var>source port</var>'s <span
    data-x="concept-port-owner">owner</span>.</p></li>
 
+   <!- - X X X if this port can ever itself be transferred, we should update the previous step to
+   fire the event not on the current target port, but on the port of the port message queue it finds
+   itself on when executed - - >
+
    <li><p>Disentangle the two ports.</p></li>
 
   </ol>
@@ -92986,12 +93018,11 @@
   </div>
 
   <p>Furthermore, a <code>MessagePort</code> object must not be garbage collected while there exists
-  an event in a <span>task queue</span> that is to be dispatched on that <code>MessagePort</code>
+  an event referenced by a <span data-x="concept-task">task</span> in a <span>task queue</span> that is to be dispatched on that <code>MessagePort</code>
   object, or while the <code>MessagePort</code> object's <span>port message queue</span> is enabled
-  and there exists a <code data-x="event-message">message</code> event in that queue.</p> <!-- we
+  and not empty.</p> <!-- we
   might not need to explicitly say the first part if DOM Events is fixed to say that events on a
-  task queue prevent GC, and the second part really is pretty redundant so maybe we don't need that
-  either -->
+  task queue prevent GC -->
 
   <!-- ports in the ports attribute of a MessageEvent that isn't dispatched yet are safe because the
   MessageEvent is safe -->



More information about the Commit-Watchers mailing list