diff --git a/spec.html b/spec.html index 8492e27505b..712e97b963f 100644 --- a/spec.html +++ b/spec.html @@ -12322,12 +12322,12 @@
This specification does not make any guarantees that any object will be garbage collected. Objects or symbols which are not live may be released after long periods of time, or never at all. For this reason, this specification uses the term "may" when describing behaviour triggered by garbage collection.
+This specification does not make any guarantees that any object or symbol will be garbage collected. Objects or symbols which are not live may be released after long periods of time, or never at all. For this reason, this specification uses the term "may" when describing behaviour triggered by garbage collection.
The semantics of WeakRefs and FinalizationRegistrys is based on two operations which happen at particular points in time:
@@ -12337,7 +12337,7 @@At any point during evaluation, a set of symbols and/or _S_ is considered live if either of the following conditions is met:
+At any point during evaluation, a set of symbols and/or objects _S_ is considered live if either of the following conditions is met:
Presence of a symbol or an object in a field, an internal slot, or a property does not imply that the reference is live. For example if the reference in question is never passed back to the program, then it cannot be observed.
@@ -12381,9 +12381,6 @@The above definition implies that, if a key in a WeakMap is not live, then its corresponding value is not necessarily live either.
Because calling HostEnqueueFinalizationRegistryCleanupJob is optional, registered objects in a FinalizationRegistry do not necessarily hold that FinalizationRegistry live. Implementations may omit FinalizationRegistry callbacks for any reason, e.g., if the FinalizationRegistry itself becomes dead, or if the application is shutting down.
Implementations are not obligated to empty WeakRefs for maximal sets of non-live objects ir symbols.
-If an implementation chooses a non-live set _S_ in which to empty WeakRefs, it must empty WeakRefs for all objects in _S_ simultaneously. In other words, an implementation must not empty a WeakRef pointing to an object _obj_ without emptying out other WeakRefs that, if not emptied, could result in an execution that observes the Object value of _obj_.
+Implementations are not obligated to empty WeakRefs for maximal sets of non-live objects or symbols.
+If an implementation chooses a non-live set _S_ in which to empty WeakRefs, it must empty WeakRefs for all values in _S_ simultaneously. In other words, an implementation must not empty a WeakRef pointing to a value _v_ without emptying out other WeakRefs that, if not emptied, could result in an execution that observes the value of _v_.
A WeakRef is an object that is used to refer to a target object without preserving it from garbage collection. WeakRefs can be dereferenced to allow access to the target object, if the target object hasn't been reclaimed by garbage collection.
+A WeakRef is an object that is used to refer to a target object or symbol without preserving it from garbage collection. WeakRefs can be dereferenced to allow access to the target value, if the target hasn't been reclaimed by garbage collection.
If the WeakRef returns a _target_ value that is not *undefined*, then this _target_ object should not be garbage collected until the current execution of ECMAScript code has completed. The AddToKeptObjects operation makes sure read consistency is maintained.
+If the WeakRef returns a _target_ value that is not *undefined*, then this _target_ value should not be garbage collected until the current execution of ECMAScript code has completed. The AddToKeptObjects operation makes sure read consistency is maintained.
target = { foo: function() {} };
@@ -42848,7 +42845,7 @@ Properties of WeakRef Instances
FinalizationRegistry Objects
- A FinalizationRegistry is an object that manages registration and unregistration of cleanup operations that are performed when target objects are garbage collected.
+ A FinalizationRegistry is an object that manages registration and unregistration of cleanup operations that are performed when target objects and symbols are garbage collected.
The FinalizationRegistry Constructor