Skip to content

Commit

Permalink
[e] (0) Fix the mess I made of port message queues. I'm pretty sure o…
Browse files Browse the repository at this point in the history
…riginally 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

git-svn-id: https://svn.whatwg.org/webapps@8864 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 27, 2014
1 parent 156337e commit cffe1c4
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 40 deletions.
34 changes: 21 additions & 13 deletions complete.html
Expand Up @@ -9925,7 +9925,7 @@ <h5 id=pragma-directives>4.2.5.3 Pragma directives</h5>
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>
Expand Down Expand Up @@ -15752,7 +15752,7 @@ <h4 id=the-br-element>4.5.27 The <dfn><code>br</code></dfn> element</h4>



<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>

Expand Down Expand Up @@ -58953,7 +58953,7 @@ <h4 id=the-history-interface>7.5.2 The <code id=the-history-interface:history-3>
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: &quot;This is the entry or that Document that was most the recently traversed to.&quot;">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>

Expand Down Expand Up @@ -68389,17 +68389,25 @@ <h4 id=message-ports>9.5.3 Message ports</h4>
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="&quot;Add the event to the port message queue of target port.&quot; 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="&quot;Add the event to the port message queue of target port.&quot; 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>

Expand All @@ -68413,14 +68421,14 @@ <h4 id=message-ports>9.5.3 Message ports</h4>
<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>

Expand Down Expand Up @@ -68533,9 +68541,9 @@ <h4 id=ports-and-garbage-collection>9.5.5 Ports and garbage collection</h4>
</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>



Expand Down

0 comments on commit cffe1c4

Please sign in to comment.