diff --git a/spec.html b/spec.html index ba86adf64bf..f2561d1fe0f 100644 --- a/spec.html +++ b/spec.html @@ -8000,7 +8000,7 @@

Forward Progress

-

Processing model of WeakRef and FinalizationRegistry objects

+

Processing Model of WeakRef and FinalizationRegistry Objects

Objectives

@@ -8072,10 +8072,10 @@

Execution

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 @@ -8100,7 +8100,7 @@

Execution

Host Hooks

- +

HostEnqueueFinalizationRegistryCleanupJob ( _finalizationRegistry_ )

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.

@@ -8108,7 +8108,7 @@

HostEnqueueFinalizationRegistryCleanupJob ( _finalizationRegistry_ )

- +

ClearKeptObjects ( )

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:

@@ -8131,10 +8131,10 @@

AddToKeptObjects ( _object_ )

CleanupFinalizationRegistry ( _finalizationRegistry_ )

-

The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a finalization registry object). It performs the following steps when called:

+

The abstract operation CleanupFinalizationRegistry takes argument _finalizationRegistry_ (a FinalizationRegistry). It performs the following steps when called:

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]]. @@ -39038,8 +39038,8 @@

WeakRef ( _target_ )

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%"`, « [[WeakRefTarget]] »). - 1. Perfom ! AddToKeptObjects(_target_). + 1. Let _weakRef_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%WeakRef.prototype%"*, « [[WeakRefTarget]] »). + 1. Perform ! AddToKeptObjects(_target_). 1. Set _weakRef_.[[WeakRefTarget]] to _target_. 1. Return _weakRef_.