Skip to content

Commit

Permalink
[giow] (1) Once you close a BroadcastChannel, you can't use it to sen…
Browse files Browse the repository at this point in the history
…d anymore either

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26545
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8762 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 12, 2014
1 parent dae9e1f commit e0a2c96
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
9 changes: 5 additions & 4 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -68163,7 +68163,8 @@ <h3 id=broadcasting-to-other-browsing-contexts>9.6 <dfn>Broadcasting to other br
<ol><li><p>Let <var>source settings</var> be <var>source</var>'s
<a href=#broadcastchannel-settings-object id=broadcasting-to-other-browsing-contexts:broadcastchannel-settings-object-2><code>BroadcastChannel</code> settings object</a>.</p>

<li><p>Let <var>source channel</var> be <var>source</var>'s
<li><p>If <var>source</var>'s <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-2>closed flag</a> is
true, then throw an <code id=broadcasting-to-other-browsing-contexts:invalidstateerror><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these steps.<li><p>Let <var>source channel</var> be <var>source</var>'s
<a href=#channel-name id=broadcasting-to-other-browsing-contexts:channel-name-3>channel name</a>.</p>

<li><p>Let <var>cloned message</var> be a <a href=#structured-clone id=broadcasting-to-other-browsing-contexts:structured-clone>structured clone</a> of the <var>message</var> argument. If this throws an exception, then rethrow that exception and
Expand All @@ -68183,7 +68184,7 @@ <h3 id=broadcasting-to-other-browsing-contexts>9.6 <dfn>Broadcasting to other br

<li><p>Their <a href=#broadcastchannel-settings-object id=broadcasting-to-other-browsing-contexts:broadcastchannel-settings-object-4><code>BroadcastChannel</code> settings object</a> specifies an
<a href=#origin-2 id=broadcasting-to-other-browsing-contexts:origin-2-2>origin</a> that is the <a href=#same-origin id=broadcasting-to-other-browsing-contexts:same-origin>same origin</a> as the <a href=#origin-2 id=broadcasting-to-other-browsing-contexts:origin-2-3>origin</a> specified
by <var>source settings</var>.<li><p>Their <a href=#channel-name id=broadcasting-to-other-browsing-contexts:channel-name-4>channel name</a> is a <a href=#case-sensitive id=broadcasting-to-other-browsing-contexts:case-sensitive>case-sensitive</a> match for <var>source channel</var>.<li><p>Their <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-2>closed flag</a> is
by <var>source settings</var>.<li><p>Their <a href=#channel-name id=broadcasting-to-other-browsing-contexts:channel-name-4>channel name</a> is a <a href=#case-sensitive id=broadcasting-to-other-browsing-contexts:case-sensitive>case-sensitive</a> match for <var>source channel</var>.<li><p>Their <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-3>closed flag</a> is
false.</ul>

<li><p>Remove <var>source</var> from <var>destinations</var>.<li>
Expand Down Expand Up @@ -68214,14 +68215,14 @@ <h3 id=broadcasting-to-other-browsing-contexts>9.6 <dfn>Broadcasting to other br

</ol>

<p>While a <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-12><a href=#broadcastchannel>BroadcastChannel</a></code> object whose <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-3>closed flag</a> is false has an event listener
<p>While a <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-12><a href=#broadcastchannel>BroadcastChannel</a></code> object whose <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-4>closed flag</a> is false has an event listener
registered for <code id=broadcasting-to-other-browsing-contexts:event-message-2><a href=#event-message>message</a></code> events, there must be a strong
reference from <a href=#global-object id=broadcasting-to-other-browsing-contexts:global-object-3>global object</a> specified by the <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-13><a href=#broadcastchannel>BroadcastChannel</a></code> object's
<a href=#broadcastchannel-settings-object id=broadcasting-to-other-browsing-contexts:broadcastchannel-settings-object-7><code>BroadcastChannel</code> settings object</a> to the <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-14><a href=#broadcastchannel>BroadcastChannel</a></code>
object itself.</p>

<p>The <dfn id=dom-broadcastchannel-close><code>close()</code></dfn> method must set the
<a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-4>closed flag</a> of the
<a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-5>closed flag</a> of the
<code id=broadcasting-to-other-browsing-contexts:broadcastchannel-15><a href=#broadcastchannel>BroadcastChannel</a></code> object on which it was invoked to true.</p>

<p class=note>Authors are strongly encouraged to explicitly close <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-16><a href=#broadcastchannel>BroadcastChannel</a></code>
Expand Down
9 changes: 5 additions & 4 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -68163,7 +68163,8 @@ interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget
<ol><li><p>Let <var>source settings</var> be <var>source</var>'s
<a href=#broadcastchannel-settings-object id=broadcasting-to-other-browsing-contexts:broadcastchannel-settings-object-2><code>BroadcastChannel</code> settings object</a>.</p>

<li><p>Let <var>source channel</var> be <var>source</var>'s
<li><p>If <var>source</var>'s <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-2>closed flag</a> is
true, then throw an <code id=broadcasting-to-other-browsing-contexts:invalidstateerror><a href=#invalidstateerror>InvalidStateError</a></code> exception and abort these steps.<li><p>Let <var>source channel</var> be <var>source</var>'s
<a href=#channel-name id=broadcasting-to-other-browsing-contexts:channel-name-3>channel name</a>.</p>

<li><p>Let <var>cloned message</var> be a <a href=#structured-clone id=broadcasting-to-other-browsing-contexts:structured-clone>structured clone</a> of the <var>message</var> argument. If this throws an exception, then rethrow that exception and
Expand All @@ -68183,7 +68184,7 @@ interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget

<li><p>Their <a href=#broadcastchannel-settings-object id=broadcasting-to-other-browsing-contexts:broadcastchannel-settings-object-4><code>BroadcastChannel</code> settings object</a> specifies an
<a href=#origin-2 id=broadcasting-to-other-browsing-contexts:origin-2-2>origin</a> that is the <a href=#same-origin id=broadcasting-to-other-browsing-contexts:same-origin>same origin</a> as the <a href=#origin-2 id=broadcasting-to-other-browsing-contexts:origin-2-3>origin</a> specified
by <var>source settings</var>.<li><p>Their <a href=#channel-name id=broadcasting-to-other-browsing-contexts:channel-name-4>channel name</a> is a <a href=#case-sensitive id=broadcasting-to-other-browsing-contexts:case-sensitive>case-sensitive</a> match for <var>source channel</var>.<li><p>Their <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-2>closed flag</a> is
by <var>source settings</var>.<li><p>Their <a href=#channel-name id=broadcasting-to-other-browsing-contexts:channel-name-4>channel name</a> is a <a href=#case-sensitive id=broadcasting-to-other-browsing-contexts:case-sensitive>case-sensitive</a> match for <var>source channel</var>.<li><p>Their <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-3>closed flag</a> is
false.</ul>

<li><p>Remove <var>source</var> from <var>destinations</var>.<li>
Expand Down Expand Up @@ -68214,14 +68215,14 @@ interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget

</ol>

<p>While a <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-12><a href=#broadcastchannel>BroadcastChannel</a></code> object whose <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-3>closed flag</a> is false has an event listener
<p>While a <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-12><a href=#broadcastchannel>BroadcastChannel</a></code> object whose <a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-4>closed flag</a> is false has an event listener
registered for <code id=broadcasting-to-other-browsing-contexts:event-message-2><a href=#event-message>message</a></code> events, there must be a strong
reference from <a href=#global-object id=broadcasting-to-other-browsing-contexts:global-object-3>global object</a> specified by the <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-13><a href=#broadcastchannel>BroadcastChannel</a></code> object's
<a href=#broadcastchannel-settings-object id=broadcasting-to-other-browsing-contexts:broadcastchannel-settings-object-7><code>BroadcastChannel</code> settings object</a> to the <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-14><a href=#broadcastchannel>BroadcastChannel</a></code>
object itself.</p>

<p>The <dfn id=dom-broadcastchannel-close><code>close()</code></dfn> method must set the
<a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-4>closed flag</a> of the
<a href=#concept-broadcastchannel-closed id=broadcasting-to-other-browsing-contexts:concept-broadcastchannel-closed-5>closed flag</a> of the
<code id=broadcasting-to-other-browsing-contexts:broadcastchannel-15><a href=#broadcastchannel>BroadcastChannel</a></code> object on which it was invoked to true.</p>

<p class=note>Authors are strongly encouraged to explicitly close <code id=broadcasting-to-other-browsing-contexts:broadcastchannel-16><a href=#broadcastchannel>BroadcastChannel</a></code>
Expand Down
3 changes: 3 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -92518,6 +92518,9 @@ interface <dfn>BroadcastChannel</dfn> : <span>EventTarget</span> {
<li><p>Let <var>source settings</var> be <var>source</var>'s
<span><code>BroadcastChannel</code> settings object</span>.</p>

<li><p>If <var>source</var>'s <span data-x="concept-BroadcastChannel-closed">closed flag</span> is
true, then throw an <code>InvalidStateError</code> exception and abort these steps.</p></li>

<li><p>Let <var>source channel</var> be <var>source</var>'s
<span>channel name</span>.</p>

Expand Down

0 comments on commit e0a2c96

Please sign in to comment.