Skip to content

Commit

Permalink
Reject if active worker is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Dec 2, 2016
1 parent 5aed94b commit 296bfcc
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -156,21 +156,8 @@ spec: WebIDL; urlPrefix: https://heycam.github.io/webidl/#
Let <var>serviceWorkerRegistration</var> be the {{SyncManager}}'s associated <a>service worker registration</a>.
</li>
<li>
If <var>serviceWorkerRegistration</var>'s <a>active worker</a> is null:
<ol>
<li>
If <var>serviceWorkerRegistration</var>'s <a>installing worker</a> is null and <var>serviceWorkerRegistration</var>'s <a>waiting worker</a> is null, <a>reject</a> <var>promise</var> with an {{InvalidStateError}} and abort these steps.
</li>
<li>
Wait for the <a>installing worker</a> or the <a>waiting worker</a> of <var>serviceWorkerRegistration</var> to become its <a>active worker</a>.
</li>
<li>
If <var>serviceWorkerRegistration</var> fails to activate either worker, <a>reject</a> <var>promise</var> with an {{InvalidStateError}} and abort these steps.
</li>
<li>
Once <var>serviceWorkerRegistration</var>'s <a>active worker</a> is not null, proceed with the steps below.
</li>
</ol>
If |serviceWorkerRegistration|'s [=active worker=] is null, [=reject=] |promise| with an {{InvalidStateError}} and abort these steps.
</li>
<li>
If the <a>global object</a> specified by the <a>incumbent settings object</a> is a {{WorkerGlobalScope}} instance, and there are no <a>window clients</a> for the <var>serviceWorkerRegistration</var>'s origin, <a>reject</a> <var>promise</var> with an {{InvalidAccessError}} and abort these steps.
</li>
Expand Down

0 comments on commit 296bfcc

Please sign in to comment.