Skip to content

Commit

Permalink
Remove step 4 of invoke idle callbacks algorithm.
Browse files Browse the repository at this point in the history
Now that the event loop directly calls the start an idle period algorithm
each time it spins and the idle period conditions true, we no longer need
to call after having invoked idle callbacks.
  • Loading branch information
rmcilroy committed Oct 29, 2019
1 parent e2773c9 commit a1fb6ec
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ <h2>The <code><dfn>IdleDeadline</dfn></code> interface</h2>
<p>When the <code><dfn>timeRemaining</dfn>()</code> method is invoked on
an <a>IdleDeadline</a> object it MUST return the remaining duration before
the deadline expires as a <a>DOMHighResTimeStamp</a>, which SHOULD be
enough to allow measurement while preventing timing attack - see
"Privacy and Security" section of [[HR-TIME]]. This value is calculated
enough to allow measurement while preventing timing attack - see
"Privacy and Security" section of [[HR-TIME]]. This value is calculated
by performing the following steps:</p>
<ol>
<li>Let <var>now</var> be a <a>DOMHighResTimeStamp</a> representing
Expand Down Expand Up @@ -551,9 +551,9 @@ <h2>Invoke idle callbacks algorithm</h2>
<p>The <dfn>invoke idle callbacks algorithm</dfn>:</p>
<ol>
<li>If the user-agent believes it should end the idle period early due
to newly scheduled high-priority work, skip to step 4.
to newly scheduled high-priority work, return from the algorithm.
<li>Let <var>now</var> be the current time.</li>
<li>If <var>now</var> is less than <var>deadline</var> and the
<li>If <var>now</var> is less than <var>deadline</var> and the
<var>window</var>'s <a>list of runnable idle callbacks</a> is not empty:
<ol>
<li>Pop the top <var>callback</var> from <var>window</var>'s
Expand All @@ -572,16 +572,11 @@ <h2>Invoke idle callbacks algorithm</h2>
algorithm</li>
</ol>
</li>
<li>Otherwise, if either the <var>window</var>'s <a>list of idle request
callbacks</a> or it's <a>list of runnable idle callbacks</a> are
not empty, <a>queue a task</a> which performs the steps in the <a>start
an idle period algorithm</a> algorithm with <var>window</var> and as a
parameter.</li>
</ol>
<p class="note">The user agent is free to end an idle period early, even
if <var>deadline</var> has not yet occurred, by deciding to skip from step
1 directly to step 4. For example, the user agent may decide to do
this if it determines that higher priority work has become runnable.</p>
if <var>deadline</var> has not yet occurred, by deciding return from the
algorithm in step 1. For example, the user agent may decide to do this
if it determines that higher priority work has become runnable.</p>
</section>
<section>
<h2>Invoke idle callback timeout algorithm</h2>
Expand Down

0 comments on commit a1fb6ec

Please sign in to comment.