Skip to content

Commit

Permalink
Editorial: Misc tweaks re PR #2089
Browse files Browse the repository at this point in the history
- Use title-case in clause heading

- Tweak some algorithm syntax

- Put 2 emu-clause attributes in quotes
  (We always quote element attributes -- see PR #1868)

- Change "a finalization registry object" to "a FinalizationRegistry"
  (The former term isn't defined.)
  • Loading branch information
jmdyck committed Aug 11, 2020
1 parent f34e4f6 commit d439634
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8000,7 +8000,7 @@ <h1>Forward Progress</h1>
</emu-clause>

<emu-clause id="sec-weakref-processing-model">
<h1>Processing model of WeakRef and FinalizationRegistry objects</h1>
<h1>Processing Model of WeakRef and FinalizationRegistry Objects</h1>
<emu-clause id="sec-weakref-invariants">
<h1>Objectives</h1>

Expand Down Expand Up @@ -8072,10 +8072,10 @@ <h1>Execution</h1>
1. For each _obj_ of _S_, do
1. For each WeakRef _ref_ such that _ref_.[[WeakRefTarget]] is _obj_, do
1. Set _ref_.[[WeakRefTarget]] to ~empty~.
1. For each FinalizationRegistry _fg_ such that _fg_.[[Cells]] contains _cell_, and _cell_.[[WeakRefTarget]] is _obj_, do
1. For each FinalizationRegistry _fg_ such that _fg_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is _obj_, do
1. Set _cell_.[[WeakRefTarget]] to ~empty~.
1. Optionally, perform ! HostEnqueueFinalizationRegistryCleanupJob(_fg_).
1. For each WeakMap _map_ such that _map_.[[WeakMapData]] contains a Record value _r_ such that _r_.[[Key]] is _obj_, do
1. For each WeakMap _map_ such that _map_.[[WeakMapData]] contains a Record _r_ such that _r_.[[Key]] is _obj_, do
1. Set _r_.[[Key]] to ~empty~.
1. Set _r_.[[Value]] to ~empty~.
1. For each WeakSet _set_ such that _set_.[[WeakSetData]] contains _obj_, do
Expand All @@ -8100,15 +8100,15 @@ <h1>Execution</h1>
<emu-clause id="sec-weakref-host-hooks">
<h1>Host Hooks</h1>

<emu-clause id="sec-host-cleanup-finalization-registry" aoid=HostEnqueueFinalizationRegistryCleanupJob>
<emu-clause id="sec-host-cleanup-finalization-registry" aoid="HostEnqueueFinalizationRegistryCleanupJob">
<h1>HostEnqueueFinalizationRegistryCleanupJob ( _finalizationRegistry_ )</h1>

<p>The abstract operation HostEnqueueFinalizationRegistryCleanupJob takes argument _finalizationRegistry_ (a FinalizationRegistry). HostEnqueueFinalizationRegistryCleanupJob is an implementation-defined abstract operation that is expected to call CleanupFinalizationRegistry(_finalizationRegistry_) at some point in the future, if possible. The host's responsibility is to make this call at a time which does not interrupt synchronous ECMAScript code execution.</p>
</emu-clause>
</emu-clause>
</emu-clause>

<emu-clause id="sec-clear-kept-objects" aoid=ClearKeptObjects>
<emu-clause id="sec-clear-kept-objects" aoid="ClearKeptObjects">
<h1>ClearKeptObjects ( )</h1>
<p>The abstract operation ClearKeptObjects takes no arguments. ECMAScript implementations are expected to call ClearKeptObjects when a synchronous sequence of ECMAScript executions completes. It performs the following steps when called:</p>
<emu-alg>
Expand All @@ -8131,10 +8131,10 @@ <h1>AddToKeptObjects ( _object_ )</h1>

<emu-clause id="sec-cleanup-finalization-registry" aoid="CleanupFinalizationRegistry">
<h1>CleanupFinalizationRegistry ( _finalizationRegistry_ )</h1>
<p>The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a finalization registry object). It performs the following steps when called:</p>
<p>The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a FinalizationRegistry). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _finalizationRegistry_ has [[Cells]] and [[CleanupCallback]] internal slots.
1. Set _callback_ to _finalizationRegistry_.[[CleanupCallback]].
1. Let _callback_ be _finalizationRegistry_.[[CleanupCallback]].
1. While _finalizationRegistry_.[[Cells]] contains a Record _cell_ such that _cell_.[[WeakRefTarget]] is ~empty~, an implementation may perform the following steps:
1. Choose any such _cell_.
1. Remove _cell_ from _finalizationRegistry_.[[Cells]].
Expand Down Expand Up @@ -39038,8 +39038,8 @@ <h1>WeakRef ( _target_ )</h1>
<emu-alg>
1. If NewTarget is *undefined*, throw a *TypeError* exception.
1. If Type(_target_) is not Object, throw a *TypeError* exception.
1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, `"%WeakRef.prototype%"`, &laquo; [[WeakRefTarget]] &raquo;).
1. Perfom ! AddToKeptObjects(_target_).
1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakRef.prototype%"*, &laquo; [[WeakRefTarget]] &raquo;).
1. Perform ! AddToKeptObjects(_target_).
1. Set _weakRef_.[[WeakRefTarget]] to _target_.
1. Return _weakRef_.
</emu-alg>
Expand Down

0 comments on commit d439634

Please sign in to comment.