[html5] r8762 - [giow] (1) Once you close a BroadcastChannel, you can't use it to send anymore e [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Sep 12 10:37:12 PDT 2014
Author: ianh
Date: 2014-09-12 10:37:08 -0700 (Fri, 12 Sep 2014)
New Revision: 8762
Modified:
complete.html
index
source
Log:
[giow] (1) Once you close a BroadcastChannel, you can't use it to send anymore either
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26545
Affected topics: DOM APIs
Modified: complete.html
===================================================================
--- complete.html 2014-09-12 16:54:15 UTC (rev 8761)
+++ complete.html 2014-09-12 17:37:08 UTC (rev 8762)
@@ -68163,7 +68163,8 @@
<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
@@ -68183,7 +68184,7 @@
<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>
@@ -68214,14 +68215,14 @@
</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>
Modified: index
===================================================================
--- index 2014-09-12 16:54:15 UTC (rev 8761)
+++ index 2014-09-12 17:37:08 UTC (rev 8762)
@@ -68163,7 +68163,8 @@
<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
@@ -68183,7 +68184,7 @@
<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>
@@ -68214,14 +68215,14 @@
</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>
Modified: source
===================================================================
--- source 2014-09-12 16:54:15 UTC (rev 8761)
+++ source 2014-09-12 17:37:08 UTC (rev 8762)
@@ -92518,6 +92518,9 @@
<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>
More information about the Commit-Watchers
mailing list