Skip to content

Commit d4069b3

Browse files
jmdyckljharb
authored andcommitted
Editorial: Misc tweaks re PR #2089 (#2129)
- 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.)
1 parent 79ee196 commit d4069b3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8000,7 +8000,7 @@ <h1>Forward Progress</h1>
80008000
</emu-clause>
80018001

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

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

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

81068106
<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>
81078107
</emu-clause>
81088108
</emu-clause>
81098109
</emu-clause>
81108110

8111-
<emu-clause id="sec-clear-kept-objects" aoid=ClearKeptObjects>
8111+
<emu-clause id="sec-clear-kept-objects" aoid="ClearKeptObjects">
81128112
<h1>ClearKeptObjects ( )</h1>
81138113
<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>
81148114
<emu-alg>
@@ -8131,10 +8131,10 @@ <h1>AddToKeptObjects ( _object_ )</h1>
81318131

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

0 commit comments

Comments
 (0)