Skip to content
Permalink
Browse files

[giow] (0) Clarify that you can transfer a port more than once by avo…

…iding confusing terminology that suggested otherwise.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13717

git-svn-id: http://svn.whatwg.org/webapps@6653 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 7, 2011
1 parent a1c6b5c commit 864984ab2021458520b59b002d1dd4678136ae28
Showing with 41 additions and 32 deletions.
  1. +12 −10 complete.html
  2. +12 −10 index
  3. +17 −12 source
<p>To <dfn id=transfer-a-transferable-object>transfer a <code>Transferable</code> object</dfn> to a
new owner, the user agent must run the steps defined for the type of
object in question. The steps will return a new object of the same
type, and will permanently neuter the original object. (This is an
irreversible and non-idempotent operation; once an object has been
transferred, it cannot be transferred, or indeed used, again.)</p>
type, and will permanently <dfn id=concept-transferable-neutered title=concept-Transferable-neutered>neuter</dfn> the original
object. (This is an irreversible and non-idempotent operation; once
an object has been transferred, it cannot be transferred, or indeed
used, again.)</p>

</div>


<p>If any object is listed in <var title="">transfer</var> more
than once, or any of the <code><a href=#transferable>Transferable</a></code> objects
listed in <var title="">transfer</var> have already been <a href=#transfer-a-transferable-object title="transfer a Transferable object">transfered</a> once
before, then throw a <code><a href=#datacloneerror>DataCloneError</a></code> exception and
abort these steps.</p>
listed in <var title="">transfer</var> are marked as <a href=#concept-transferable-neutered title=concept-Transferable-neutered>neutered</a>, then
throw a <code><a href=#datacloneerror>DataCloneError</a></code> exception and abort these
steps.</p>

</li>

object">transferring</a> the object to the
<code><a href=#window>Window</a></code> object on which the method was invoked, and
add a mapping from the old object to the new transferred object
to <var title="">transfer map</var>. If the objects are
<code><a href=#messageport>MessagePort</a></code> objects, also append the new
transferred object to the <var title="">new ports</var>
to <var title="">transfer map</var>. For each new
<code><a href=#messageport>MessagePort</a></code> object obtained in this manner, append
the new transferred object to the <var title="">new ports</var>
array.</p>

</li>

</ol><p id=transferMessagePort>To <a href=#transfer-a-transferable-object title="transfer a Transferable
object">transfer</a> a <code><a href=#messageport>MessagePort</a></code> object <var title="">old</var> to a new owner <var title="">owner</var>, a user
agent must <a href=#clone-a-port title="clone a port">clone</a> the <var title="">old</var> object with the cloned being owned by <var title="">owner</var>, and must return the resulting object.</p>
agent must <a href=#clone-a-port title="clone a port">clone</a> the <var title="">old</var> object with the clone being owned by <var title="">owner</var>, thus obtaining <var title="">new</var>, must
<a href=#concept-transferable-neutered title=concept-Transferable-neutered>neuter</a> the <var title="">old</var> port, and must finally return <var title="">new</var>.</p>

<hr><!-- v2-onclose
<p>The <dfn title="dom-MessagePort-active"><code>active</code></dfn>
22 index
<p>To <dfn id=transfer-a-transferable-object>transfer a <code>Transferable</code> object</dfn> to a
new owner, the user agent must run the steps defined for the type of
object in question. The steps will return a new object of the same
type, and will permanently neuter the original object. (This is an
irreversible and non-idempotent operation; once an object has been
transferred, it cannot be transferred, or indeed used, again.)</p>
type, and will permanently <dfn id=concept-transferable-neutered title=concept-Transferable-neutered>neuter</dfn> the original
object. (This is an irreversible and non-idempotent operation; once
an object has been transferred, it cannot be transferred, or indeed
used, again.)</p>

</div>


<p>If any object is listed in <var title="">transfer</var> more
than once, or any of the <code><a href=#transferable>Transferable</a></code> objects
listed in <var title="">transfer</var> have already been <a href=#transfer-a-transferable-object title="transfer a Transferable object">transfered</a> once
before, then throw a <code><a href=#datacloneerror>DataCloneError</a></code> exception and
abort these steps.</p>
listed in <var title="">transfer</var> are marked as <a href=#concept-transferable-neutered title=concept-Transferable-neutered>neutered</a>, then
throw a <code><a href=#datacloneerror>DataCloneError</a></code> exception and abort these
steps.</p>

</li>

object">transferring</a> the object to the
<code><a href=#window>Window</a></code> object on which the method was invoked, and
add a mapping from the old object to the new transferred object
to <var title="">transfer map</var>. If the objects are
<code><a href=#messageport>MessagePort</a></code> objects, also append the new
transferred object to the <var title="">new ports</var>
to <var title="">transfer map</var>. For each new
<code><a href=#messageport>MessagePort</a></code> object obtained in this manner, append
the new transferred object to the <var title="">new ports</var>
array.</p>

</li>

</ol><p id=transferMessagePort>To <a href=#transfer-a-transferable-object title="transfer a Transferable
object">transfer</a> a <code><a href=#messageport>MessagePort</a></code> object <var title="">old</var> to a new owner <var title="">owner</var>, a user
agent must <a href=#clone-a-port title="clone a port">clone</a> the <var title="">old</var> object with the cloned being owned by <var title="">owner</var>, and must return the resulting object.</p>
agent must <a href=#clone-a-port title="clone a port">clone</a> the <var title="">old</var> object with the clone being owned by <var title="">owner</var>, thus obtaining <var title="">new</var>, must
<a href=#concept-transferable-neutered title=concept-Transferable-neutered>neuter</a> the <var title="">old</var> port, and must finally return <var title="">new</var>.</p>

<hr><!-- v2-onclose
<p>The <dfn title="dom-MessagePort-active"><code>active</code></dfn>
29 source
@@ -8895,9 +8895,11 @@ interface <dfn>Transferable</dfn> { };</pre>
<p>To <dfn>transfer a <code>Transferable</code> object</dfn> to a
new owner, the user agent must run the steps defined for the type of
object in question. The steps will return a new object of the same
type, and will permanently neuter the original object. (This is an
irreversible and non-idempotent operation; once an object has been
transferred, it cannot be transferred, or indeed used, again.)</p>
type, and will permanently <dfn
title="concept-Transferable-neutered">neuter</dfn> the original
object. (This is an irreversible and non-idempotent operation; once
an object has been transferred, it cannot be transferred, or indeed
used, again.)</p>

</div>


<p>If any object is listed in <var title="">transfer</var> more
than once, or any of the <code>Transferable</code> objects
listed in <var title="">transfer</var> have already been <span
title="transfer a Transferable object">transfered</span> once
before, then throw a <code>DataCloneError</code> exception and
abort these steps.</p>
listed in <var title="">transfer</var> are marked as <span
title="concept-Transferable-neutered">neutered</span>, then
throw a <code>DataCloneError</code> exception and abort these
steps.</p>

</li>

object">transferring</span> the object to the
<code>Window</code> object on which the method was invoked, and
add a mapping from the old object to the new transferred object
to <var title="">transfer map</var>. If the objects are
<code>MessagePort</code> objects, also append the new
transferred object to the <var title="">new ports</var>
to <var title="">transfer map</var>. For each new
<code>MessagePort</code> object obtained in this manner, append
the new transferred object to the <var title="">new ports</var>
array.</p>

</li>
object">transfer</span> a <code>MessagePort</code> object <var
title="">old</var> to a new owner <var title="">owner</var>, a user
agent must <span title="clone a port">clone</span> the <var
title="">old</var> object with the cloned being owned by <var
title="">owner</var>, and must return the resulting object.</p>
title="">old</var> object with the clone being owned by <var
title="">owner</var>, thus obtaining <var title="">new</var>, must
<span title="concept-Transferable-neutered">neuter</span> the <var
title="">old</var> port, and must finally return <var
title="">new</var>.</p>

<hr>
<!-- v2-onclose

0 comments on commit 864984a

Please sign in to comment.
You can’t perform that action at this time.