Skip to content

Commit 9592eb5

Browse files
mfalkendomenic
authored andcommitted
Add "environment discarding steps" hook
These are run when navigation or worker start fails, and will be used by w3c/ServiceWorker#1315.
1 parent b3c7c89 commit 9592eb5

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

source

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82197,7 +82197,9 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
8219782197
<p>If any of the following are true, then <span data-x="navigate-ua-inline">display the inline
8219882198
content with an appropriate error shown to the user</span>, with the newly created
8219982199
<code>Document</code> object's <span>origin</span> set to a new <span
82200-
data-x="concept-origin-opaque">opaque origin</span>, and return.</p>
82200+
data-x="concept-origin-opaque">opaque origin</span>, run the <span data-x="environment
82201+
discarding steps">environment discarding steps</span> for <var>reservedEnvironment</var>, and
82202+
return.</p>
8220182203

8220282204
<ul>
8220382205
<li><p><var>response</var> is a network error.</p></li>
@@ -86352,6 +86354,13 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
8635286354
unset.</p></dd>
8635386355
</dl>
8635486356

86357+
<p>Specifications may define <dfn data-export="">environment discarding steps</dfn> for
86358+
environments. The steps take an <span>environment</span> as input.</p>
86359+
86360+
<p class="note">The <span data-x="environment discarding steps">environment discarding
86361+
steps</span> are run for only a select few environments: the ones that will
86362+
never become execution ready because, for example, they failed to load.</p>
86363+
8635586364
<p>An <dfn data-export="">environment settings object</dfn> is an <span>environment</span> that
8635686365
additionally specifies algorithms for:</p>
8635786366

@@ -97241,11 +97250,17 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
9724197250
fetch</span> steps with <var>response</var>.</p></li>
9724297251
</ol>
9724397252

97244-
<p>If the algorithm asynchronously completes with null, <span>queue a task</span> to <span
97245-
data-x="concept-event-fire">fire an event</span> named <code data-x="event-error">error</code>
97246-
at <var>worker</var>, and return. Otherwise, continue the rest of these steps after
97247-
the algorithm's asynchronous completion, with <var>script</var> being the asynchronous
97248-
completion value.</p>
97253+
<p>If the algorithm asynchronously completes with null, then:</p>
97254+
<ol>
97255+
<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
97256+
<code data-x="event-error">error</code> at <var>worker</var>.</p></li>
97257+
<li><p>Run the <span data-x="environment discarding steps">environment discarding steps</span>
97258+
for <var>inside settings</var>.</p></li>
97259+
<li><p>Return.</p></li>
97260+
</ol>
97261+
97262+
<p>Otherwise, continue the rest of these steps after the algorithm's asynchronous completion,
97263+
with <var>script</var> being the asynchronous completion value.</p>
9724997264
</li>
9725097265

9725197266
<li><p>Associate <var>worker</var> with <var>worker global scope</var>.</p></li>

0 commit comments

Comments
 (0)