Skip to content

Commit 255e837

Browse files
annevkinikulin
authored andcommitted
Meta: remove "ILLFATED" MessagePort design
1 parent 29cb20a commit 255e837

File tree

1 file changed

+2
-53
lines changed

1 file changed

+2
-53
lines changed

source

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -95844,8 +95844,7 @@ interface <dfn>MessagePort</dfn> : <span>EventTarget</span> {
9584495844
// event handlers
9584595845
attribute <span>EventHandler</span> <span data-x="handler-MessagePort-onmessage">onmessage</span>;
9584695846
attribute <span>EventHandler</span> <span data-x="handler-MessagePort-onmessageerror">onmessageerror</span>;
95847-
<!--ILLFATED attribute <span>EventHandler</span> <span data-x="handler-MessagePort-onerror">onerror</span>;
95848-
-->};</pre>
95847+
};</pre>
9584995848

9585095849
<dl class="domintro">
9585195850

@@ -96101,55 +96100,6 @@ interface <dfn>MessagePort</dfn> : <span>EventTarget</span> {
9610196100
disentangle the two ports. If the method is called on a port that is not entangled, then the
9610296101
method must do nothing.</p>
9610396102

96104-
<!--ILLFATED (search for '- -')
96105-
<hr>
96106-
96107-
<p>In some circumstances, an entangled <code>MessagePort</code> <var>source port</var>
96108-
that is not <a href="#ports-and-garbage-collection">eligible for garbage collection</a> will
96109-
nonetheless find itself prematurely destroyed, for example if the user manually terminates the
96110-
user agent's host process. Under such circumstances, user agents should attempt to following these
96111-
steps:</p>
96112-
96113-
<!- - don't fire this for navigation, it would break bfcache - ->
96114-
<!- - for consistency, we don't fire this for worker termination - ->
96115-
<!- - we don't fire it on .close() because that would let you probe GC behavior also - ->
96116-
96117-
<ol>
96118-
96119-
<li><p>Let <var>target port</var> be the port with which the ill-fated <var>source port</var> is entangled.</p></li>
96120-
96121-
<li><p>If there is no <var>target port</var> (i.e. if <var>source port</var>
96122-
is not entangled), or if <var>target port</var> is suffering the same fate as <var>source port</var> (e.g. if both ports are in the same host process), then abort these
96123-
steps.</p></li>
96124-
96125-
<li><p>Mark <var>target port</var> as being a <dfn>related to an ill-fated
96126-
port</dfn>.</p></li>
96127-
96128-
<li><p>Create a <span data-x="concept-task">task</span> that <span
96129-
data-x="concept-event-fire">fires an event</span> named <code data-x="event-error">error</code>
96130-
at <var>target port</var>, and add the <span data-x="concept-task">task</span> to the <span>port
96131-
message queue</span> of <var>target port</var>. If the <var>new port</var>'s <span
96132-
data-x="concept-port-owner">owner</span> specifies a <span>responsible event loop</span> that is
96133-
a <span>browsing context</span> <span>event loop</span>, the <span
96134-
data-x="concept-task">task</span> must be associated with the <span>responsible document</span>
96135-
specified by <var>source port</var>'s <span
96136-
data-x="concept-port-owner">owner</span>.</p></li>
96137-
96138-
<!- - X X X if this port can ever itself be transferred, we should update the previous step to
96139-
fire the event not on the current target port, but on the port of the port message queue it finds
96140-
itself on when executed - - >
96141-
96142-
<li><p>Disentangle the two ports.</p></li>
96143-
96144-
</ol>
96145-
96146-
<p class="note">This does not happen if the port is garbage collected or closed using the <code
96147-
data-x="dom-messageport-close">close()</code> method. It is intended only as a way for Web
96148-
applications that operate across multiple browser processes (e.g. using workers or communicating
96149-
across multiple tabs) to gracefully handle a catastrophic failure in one process. A strictly
96150-
conforming user agent would never fail unexpectedly, and thus would never send this event!</p>
96151-
-->
96152-
9615396103
<hr>
9615496104

9615596105
<p>The following are the <span>event handlers</span> (and their corresponding <span data-x="event
@@ -96163,8 +96113,7 @@ interface <dfn>MessagePort</dfn> : <span>EventTarget</span> {
9616396113
<tbody>
9616496114
<tr><td><dfn><code data-x="handler-MessagePort-onmessage">onmessage</code></dfn> <td> <code data-x="event-message">message</code>
9616596115
<tr><td><dfn><code data-x="handler-MessagePort-onmessageerror">onmessageerror</code></dfn> <td> <code data-x="event-messageerror">messageerror</code>
96166-
<!--ILLFATED <tr><td><dfn><code data-x="handler-MessagePort-onerror">onerror</code></dfn> <td> <code data-x="event-error">error</code>
96167-
--> </table>
96116+
</table>
9616896117

9616996118
<p>The first time a <code>MessagePort</code> object's <code
9617096119
data-x="handler-MessagePort-onmessage">onmessage</code> IDL attribute is set, the port's <span>port

0 commit comments

Comments
 (0)