Skip to content

Commit

Permalink
[giow] (1) Allow shared workers to be isolated.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13373

git-svn-id: http://svn.whatwg.org/webapps@6744 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 25, 2011
1 parent 96a1d84 commit e70ec7e
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 59 deletions.
54 changes: 36 additions & 18 deletions complete.html
Expand Up @@ -79383,24 +79383,42 @@ <h5 id=shared-workers-and-the-sharedworker-interface><span class=secno>10.2.7.3
<li><p>Let <var title="">worker global scope</var> be
null.</li>

<li><p>If <var title="">name</var> is not the empty string and
there exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object whose
<a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag
is false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is
exactly equal to <var title="">name</var>, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> with the <a href=#same-origin>same
origin</a> as <var title="">scriptURL</var>, then let <var title="">worker global scope</var> be that
<code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object.</li>

<li><p>Otherwise, if <var title="">name</var> is the empty string
and there exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object
whose <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a>
flag is false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is the
empty string, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> that is exactly equal to
<var title="">scriptURL</var>, then let <var title="">worker
global scope</var> be that <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code>
object.</li>
<li>

<p>If <var title="">name</var> is not the empty string and there
exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object whose <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag is
false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is
exactly equal to <var title="">name</var>, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> with the <a href=#same-origin>same
origin</a> as <var title="">scriptURL</var>, then let <var title="">worker global scope</var> be that
<code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object.</p>

<p>Otherwise, if <var title="">name</var> is the empty string
and there exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object
whose <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a>
flag is false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is the
empty string, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> that is exactly equal to
<var title="">scriptURL</var>, then let <var title="">worker
global scope</var> be that <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code>
object.</p>

</li>

<li>

<p>If <var title="">worker global scope</var> is not null, but
the user agent has been configured to disallow communication
between the <a href=#concept-script title=concept-script>script</a> that
invoked the constructor and the worker represented by the <var title="">worker global scope</var>, then set <var title="">worker global scope</var> to null.</p>

<p class=note>For example, a user agent could have a
development mode that isolates a particular <a href=#top-level-browsing-context>top-level
browsing context</a> from all other pages, and scripts in
that development mode could be blocked from connecting to shared
workers running in the normal browser mode.</p>

</li>

<li>

Expand Down
54 changes: 36 additions & 18 deletions index
Expand Up @@ -79383,24 +79383,42 @@ interface <dfn id=sharedworker>SharedWorker</dfn> : <a href=#abstractworker>Abst
<li><p>Let <var title="">worker global scope</var> be
null.</li>

<li><p>If <var title="">name</var> is not the empty string and
there exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object whose
<a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag
is false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is
exactly equal to <var title="">name</var>, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> with the <a href=#same-origin>same
origin</a> as <var title="">scriptURL</var>, then let <var title="">worker global scope</var> be that
<code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object.</li>

<li><p>Otherwise, if <var title="">name</var> is the empty string
and there exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object
whose <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a>
flag is false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is the
empty string, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> that is exactly equal to
<var title="">scriptURL</var>, then let <var title="">worker
global scope</var> be that <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code>
object.</li>
<li>

<p>If <var title="">name</var> is not the empty string and there
exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object whose <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag is
false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is
exactly equal to <var title="">name</var>, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> with the <a href=#same-origin>same
origin</a> as <var title="">scriptURL</var>, then let <var title="">worker global scope</var> be that
<code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object.</p>

<p>Otherwise, if <var title="">name</var> is the empty string
and there exists a <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code> object
whose <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a>
flag is false, whose <code title=dom-WorkerGlobalScope-name>name</code> attribute is the
empty string, and whose <code title=dom-WorkerGlobalScope-location><a href=#dom-workerglobalscope-location>location</a></code> attribute
represents an <a href=#absolute-url>absolute URL</a> that is exactly equal to
<var title="">scriptURL</var>, then let <var title="">worker
global scope</var> be that <code><a href=#sharedworkerglobalscope>SharedWorkerGlobalScope</a></code>
object.</p>

</li>

<li>

<p>If <var title="">worker global scope</var> is not null, but
the user agent has been configured to disallow communication
between the <a href=#concept-script title=concept-script>script</a> that
invoked the constructor and the worker represented by the <var title="">worker global scope</var>, then set <var title="">worker global scope</var> to null.</p>

<p class=note>For example, a user agent could have a
development mode that isolates a particular <a href=#top-level-browsing-context>top-level
browsing context</a> from all other pages, and scripts in
that development mode could be blocked from connecting to shared
workers running in the normal browser mode.</p>

</li>

<li>

Expand Down
67 changes: 44 additions & 23 deletions source
Expand Up @@ -89795,29 +89795,50 @@ interface <dfn>SharedWorker</dfn> : <span>AbstractWorker</span> {
<li><p>Let <var title="">worker global scope</var> be
null.</p></li>

<li><p>If <var title="">name</var> is not the empty string and
there exists a <code>SharedWorkerGlobalScope</code> object whose
<span title="dom-WorkerGlobalScope-closing">closing</span> flag
is false, whose <code
title="dom-WorkerGlobalScope-name">name</code> attribute is
exactly equal to <var title="">name</var>, and whose <code
title="dom-WorkerGlobalScope-location">location</code> attribute
represents an <span>absolute URL</span> with the <span>same
origin</span> as <var title="">scriptURL</var>, then let <var
title="">worker global scope</var> be that
<code>SharedWorkerGlobalScope</code> object.</p></li>

<li><p>Otherwise, if <var title="">name</var> is the empty string
and there exists a <code>SharedWorkerGlobalScope</code> object
whose <span title="dom-WorkerGlobalScope-closing">closing</span>
flag is false, whose <code
title="dom-WorkerGlobalScope-name">name</code> attribute is the
empty string, and whose <code
title="dom-WorkerGlobalScope-location">location</code> attribute
represents an <span>absolute URL</span> that is exactly equal to
<var title="">scriptURL</var>, then let <var title="">worker
global scope</var> be that <code>SharedWorkerGlobalScope</code>
object.</p></li>
<li>

<p>If <var title="">name</var> is not the empty string and there
exists a <code>SharedWorkerGlobalScope</code> object whose <span
title="dom-WorkerGlobalScope-closing">closing</span> flag is
false, whose <code
title="dom-WorkerGlobalScope-name">name</code> attribute is
exactly equal to <var title="">name</var>, and whose <code
title="dom-WorkerGlobalScope-location">location</code> attribute
represents an <span>absolute URL</span> with the <span>same
origin</span> as <var title="">scriptURL</var>, then let <var
title="">worker global scope</var> be that
<code>SharedWorkerGlobalScope</code> object.</p>

<p>Otherwise, if <var title="">name</var> is the empty string
and there exists a <code>SharedWorkerGlobalScope</code> object
whose <span title="dom-WorkerGlobalScope-closing">closing</span>
flag is false, whose <code
title="dom-WorkerGlobalScope-name">name</code> attribute is the
empty string, and whose <code
title="dom-WorkerGlobalScope-location">location</code> attribute
represents an <span>absolute URL</span> that is exactly equal to
<var title="">scriptURL</var>, then let <var title="">worker
global scope</var> be that <code>SharedWorkerGlobalScope</code>
object.</p>

</li>

<li>

<p>If <var title="">worker global scope</var> is not null, but
the user agent has been configured to disallow communication
between the <span title="concept-script">script</span> that
invoked the constructor and the worker represented by the <var
title="">worker global scope</var>, then set <var
title="">worker global scope</var> to null.</p>

<p class="note">For example, a user agent could have a
development mode that isolates a particular <span>top-level
browsing context</span> from all other pages, and scripts in
that development mode could be blocked from connecting to shared
workers running in the normal browser mode.</p>

</li>

<li>

Expand Down

0 comments on commit e70ec7e

Please sign in to comment.