Skip to content

Commit

Permalink
Get a reference to the response correctly in worker initialization
Browse files Browse the repository at this point in the history
Fixes #853.
  • Loading branch information
domenic committed Apr 5, 2016
1 parent a996f3b commit 3a85366
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -94666,6 +94666,24 @@ interface <dfn>WorkerGlobalScope</dfn> : <span>EventTarget</span> {
<var>settings object</var>.</dd>
</dl>

<p>In both cases, to <span data-x="fetching-scripts-validate-response">validate the
response</span> <var>response</var>, perform the following steps:</p>

<ol>
<li><p>Set <var>worker global scope</var>'s <span
data-x="concept-WorkerGlobalScope-url">url</span> to <var>response</var>'s <span
data-x="concept-response-url">url</span>.</p></li>

<li><p>Set <var>worker global scope</var>'s <span
data-x="concept-WorkerGlobalScope-https-state">HTTPS state</span> to <var>response</var>'s
<span data-x="concept-response-https-state">HTTPS state</span>.</p></li>

<li><p>Execute the <span>Initialize a <code data-x="">global object</code>'s CSP list</span>
algorithm on <var>worker global scope</var> and <var>response</var>. <ref spec="CSP"></p></li>

<li><p>Return true.</p></li>
</ol>

<p>If the algorithm asynchronously completes with null, <span>queue a task</span> to <span>fire
a simple event</span> named <code data-x="event-error">error</code> at <var>worker</var>, and
abort these steps. Otherwise, continue the rest of these steps after the algorithm's
Expand All @@ -94690,21 +94708,10 @@ interface <dfn>WorkerGlobalScope</dfn> : <span>EventTarget</span> {
to the list of <span>the worker's workers</span> of <var>parent worker global
scope</var>.</p></li>

<li><p>Set <var>worker global scope</var>'s <span
data-x="concept-WorkerGlobalScope-url">url</span> to <var>response</var>'s <span
data-x="concept-response-url">url</span>.</p></li>

<li><p>Set <var>worker global scope</var>'s <span
data-x="concept-WorkerGlobalScope-https-state">HTTPS state</span> to <var>response</var>'s <span
data-x="concept-response-https-state">HTTPS state</span>.</p></li>

<li><p>Set <var>worker global scope</var>'s <span
data-x="concept-WorkerGlobalScope-type">type</span> to the value of the <code
data-x="">type</code> member of <var>options</var>.</p></li>

<li><p>Execute the <span>Initialize a <code data-x="">global object</code>'s CSP list</span>
algorithm on <var>worker global scope</var> and <var>response</var>. <ref spec="CSP"></p>

<li><p>If <var>is shared</var> is true, and there are any <span data-x="relevant application
cache">relevant application caches</span> that are identified by a manifest URL with the
<span>same origin</span> as <var>url</var> and that have <var>url</var> as one of their
Expand Down

0 comments on commit 3a85366

Please sign in to comment.