Skip to content

Commit

Permalink
Depend on tc39/ecma262#2316 for incumbent machinery
Browse files Browse the repository at this point in the history
  • Loading branch information
syg committed Feb 19, 2021
1 parent de05849 commit 4ae3f86
Showing 1 changed file with 7 additions and 26 deletions.
33 changes: 7 additions & 26 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -90474,20 +90474,20 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
data-x="concept-task">tasks</span>. This section defines the scheduling of calling
<code>FinalizationRegistry</code> cleanup callbacks.</p>

<h6><dfn>HostCleanupFinalizationRegistry</dfn>(<var>finalizationRegistry</var>)</h6>
<h6><dfn>HostEnqueueFinalizationRegistryCleanupJob</dfn>(<var>finalizationRegistry</var>)</h6>

<p>The <cite>WeakRef</cite> proposal contains an <span>implementation-defined</span>
<span data-x="js-HostCleanupFinalizationRegistry">HostCleanupFinalizationRegistry</span
>(<var>finalizationRegistry</var>) abstract operation.
User agents must use the following implementation: <ref spec=JSWEAKREF></p>
<p>The <cite>WeakRef</cite> proposal contains an <span>implementation-defined</span> <span
data-x="js-HostEnqueueFinalizationRegistryCleanupJob">HostEnqueueFinalizationRegistryCleanupJob</span
>(<var>finalizationRegistry</var>) abstract operation. User agents must use the following
implementation:</p>

<ol>
<li>
<p><span>Queue a task</span> on the <dfn>garbage collection task source</dfn> to perform the
<p><span>Queue a task</span> on the <dfn>JavaScript engine task source</dfn> to perform the
following steps:</p>
<ol>
<li>
<p>Let <var>entry</var> be <var>finalizationRegistry</var>.[[CleanupCallback]].[[Realm]]'s
<p>Let <var>entry</var> be <var>finalizationRegistry</var>.[[CleanupCallback]].[[Callback]].[[Realm]]'s
<span data-x="concept-realm-settings-object">environment settings object</span>.</p>
</li>

Expand All @@ -90503,30 +90503,11 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
while the cleanup callback runs.</p>
</li>

<li>
<p>Let <var>incumbent</var> be some appropriate <span>environment settings object</span>.</p>

<p class="warning">It is not yet clear how to specify the <span>environment settings
object</span> that should be used here. In practice, this means that the <span
data-x="concept-incumbent-everything">incumbent</span> concept is not correctly specified
while executing a cleanup callback. See <a
href="https://github.com/whatwg/html/pull/4571#pullrequestreview-342188911">discussion in pull
request #4571</a>.</p>
</li>

<li>
<p><span>Prepare to run a callback</span> with <var>incumbent</var>.</p>
</li>

<li>
<p>Let <var>result</var> be the result of performing
<span>CleanupFinalizationRegistry</span>(<var>finalizationRegistry</var>).</p>
</li>

<li>
<p><span>Clean up after running a callback</span> with <var>incumbent</var>.</p>
</li>

<li>
<p><span>Clean up after running script</span> with <var>entry</var>.</p>
</li>
Expand Down

0 comments on commit 4ae3f86

Please sign in to comment.