HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2020Make MessagePort objects not be owned by Windows necessarily, and remove ownerWindow.2008-08-06 00:25
@@ -41216,25 +41216,25 @@ interface <dfn>MessageChannel</dfn> {
   readonly attribute <span>MessagePort</span> <span title="dom-channel-port2">port2</span>;
 };</pre>
 
   <p>When the <dfn
   title="dom-MessageChannel"><code>MessageChannel()</code></dfn>
   constructor is called, it must run the following algorithm:</p>
 
   <ol>
 
    <li><p><span>Create a new <code>MessagePort</code> object</span>
-   owned by the <span>script browsing context</span>, and let <var
+   owned by the <span>script execution context</span>, and let <var
    title="">port1</var> be that object.</p></li>
 
    <li><p><span>Create a new <code>MessagePort</code> object</span>
-   owned by the <span>script browsing context</span>, and let <var
+   owned by the <span>script execution context</span>, and let <var
    title="">port2</var> be that object.</p></li>
 
    <li><p><span>Entangle</span> the <var title="">port1</var> and <var
    title="">port2</var> objects.</p></li>
 
    <li><p>Set the <code title="dom-MessagePort-active">active</code>
    attribute of the two ports to true.</p></li>
 
    <li><p>Instantiate a new <code>MessageChannel</code> object, and
    let <var title="">channel</var> be that object.</p></li>
@@ -41256,46 +41256,44 @@ interface <dfn>MessageChannel</dfn> {
   must return the values they were assigned when the
   <code>MessageChannel</code> object was created.</p>
 
 
   <h4>Message ports</h4>
 
   <p>Each channel has two message ports. Data sent through one port is
   received by the other port, and vice versa.</p>
 
   <pre class="idl">interface <dfn>MessagePort</dfn> {
-  readonly attribute <span>Window</span> <span title="dom-MessagePort-ownerWindow">ownerWindow</span>;
   readonly attribute boolean <span title="dom-MessagePort-active">active</span>;
   boolean <span title="dom-MessagePort-postMessage">postMessage</span>(in DOMString message);
   boolean <span title="dom-MessagePort-postMessage">postMessage</span>(in DOMString message, in <span>MessagePort</span> messagePort);
   void <span title="dom-MessagePort-close">close</span>();
 
   // event handler attributes
            attribute <span>EventListener</span> <span title="handler-MessagePort-onmessage">onmessage</span>;
            attribute <span>EventListener</span> <span title="handler-MessagePort-onload">onload</span>;
            attribute <span>EventListener</span> <span title="handler-MessagePort-onerror">onerror</span>;
            attribute <span>EventListener</span> <span title="handler-MessagePort-onunload">onunload</span>;
 };</pre>
 
   <p>When the user agent is to <dfn>create a new
-  <code>MessagePort</code> object</dfn> owned by a <code>Window</code>
-  object <var title="">owner</var>, it must run the following
-  steps:</p>
+  <code>MessagePort</code> object</dfn> owned by a <span>script
+  execution context</span> object <var title="">owner</var>, it must
+  run the following steps:</p>
 
   <ol>
 
    <li><p>Instantiate a new <code>MessagePort</code> object, and let
    <var title="">port</var> be that object.</p></li>
 
-   <li><p>Set the <code
-   title="dom-MessagePort-ownerWindow">ownerWindow</code> attribute of
-   <var title="">port</var> to <var title="">owner</var>.</p></li>
+   <li><p>Let <var title="">port</var>'s owner be <var
+   title="">owner</var>.</p></li>
 
    <li><p>Set the <code title="dom-MessagePort-active">active</code>
    attribute of <var title="">port</var> be false.</p></li>
 
   </ol>
 
   <hr>
 
   <p>When the user agent is to <dfn>entangle</dfn> two
   <code>MessagePort</code> objects, it must run the following
@@ -41376,25 +41374,20 @@ interface <dfn>MessageChannel</dfn> {
    associated with a document that's currently not the active document
    of its iframe, but which hasn't been discarded yet -->
 
    <li><p>Return <var title="">new port</var>. It is the
    clone.</p></li>
 
   </ol>
 
   <hr>
 
-  <p>The <dfn
-  title="dom-MessagePort-ownerWindow"><code>ownerWindow</code></dfn>
-  attribute must return the value it was assigned when the
-  <code>MessagePort</code> object was created.</p>
-
   <p>The <dfn title="dom-MessagePort-active"><code>active</code></dfn>
   attribute must return the last value that it was set to according to
   the rules of this specification.</p>
 
   <hr>
 
   <p>The <dfn
   title="dom-MessagePort-postMessage"><code>postMessage()</code></dfn>
   method, when called on a port <var title="">source port</var>, must
   cause the user agent to run the following steps:</p>
@@ -41433,46 +41426,45 @@ interface <dfn>MessageChannel</dfn> {
 
     <ol>
 
      <li><p>If the <var title="">data port</var> is the <var
      title="">source port</var> or the <var title="">target
      port</var>, then throw an <code>INVALID_ACCESS_ERR</code>
      exception and abort all these steps.</p></li>
 
      <li><p>Try to obtain a <var title="">new data port</var> by <span
      title="clone a port">cloning</span> the <var title="">data
-     port</var> with the <span
-     title="dom-MessagePort-ownerWindow">owner</span> of the <var
-     title="">target port</var> as the owner of the clone. If this
-     returns an exception, then throw that exception and abort these
-     steps.</p></li>
+     port</var> with the owner of the <var title="">target port</var>
+     as the owner of the clone. If this returns an exception, then
+     throw that exception and abort these steps.</p></li>
  
      <li><p>Let the <code
      title="dom-MessageEvent-messagePort">messagePort</code> attribute
      of the event be the <var title="">new data port</var>.</p></li>
 
     </ol>
 
    </li>
 
    <li><p>Return true from the method, but continue with these
    steps.</p></li>
 
-   <li><p>Wait for all scripts in the <span>unit of related browsing
-   contexts</span> to which the <span
-   title="dom-MessagePort-ownerWindow">owner</span> of the <var
-   title="">target port</var> belongs to have executed to completion,
-   and then dispatch the event at the <var title="">target port</var>
-   object. If this never happens (e.g. the relevant <span>browsing
+   <li><p>Wait for all scripts in the conceptual thread that the
+   <span>script execution context</span> that owns the <var
+   title="">target port</var> belongs to have executed to
+   completion. If this never happens (e.g. the relevant <span>browsing
    context</span> is closed by the user before the event can be
    dispatched), then discard the event.</p></li><!-- XXX queue -->
 
+   <li><p>Dispatch the event at the <var title="">target port</var>
+   object.</p></li>
+
   </ol>
 
   <p class="big-issue">People often request the ability to send
   name/value pairs, arrays, and numbers using postMessage() instead of
   just strings.</p>
 
   <hr>
 
   <p>The <dfn title="dom-MessagePort-close"><code>close()</code></dfn>
   method, when called on a port <var title="">local port</var> that is
@@ -41549,23 +41541,22 @@ interface <dfn>MessageChannel</dfn> {
   traversal</span> (e.g. when a user <span
   title="navigate">navigates</span> a <span>browsing context</span> to
   another page, or goes back to a previous page), the user agent will
   have to <a href="#port-traversal-deactivation">deactivate</a> and/or
   <a href="#port-traversal-reactivation">reactivate</a> some
   ports.</p>
 
   <p>Ports are deactivated and unentangled when the
   <code>Document</code> that was the <span>active document</span> of
   the <span>browsing context</span> corresponding to the
-  <code>Window</code> object that <span
-  title="dom-MessagePort-ownerWindow">owns</span> them is <span
-  title="discard a document">discarded</span>.</p>
+  <code>Window</code> object that owns them is <span title="discard a
+  document">discarded</span>.</p>
 
   <p>To <dfn>deactivate a port</dfn> <var title="">local port</var>
   that is entangled with a second port <var title="">remote
   port</var>, the user agent must set the <code
   title="dom-MessagePort-active">active</code> attribute of the <var
   title="">remote port</var> to false.</p>
 
   <p>To <dfn>reactivate a port</dfn> <var title="">local port</var>
   that is entangled with a second port <var title="">remote
   port</var>, the user agent must set the <code

|