ECMAScript® 2024 Language Specification

Draft ECMA-262 / February 15, 2024

9.12 AddToKeptObjects ( value )

The abstract operation AddToKeptObjects takes argument value (an Object or a Symbol) and returns unused. It performs the following steps when called:

  1. Let agentRecord be the surrounding agent's Agent Record.
  2. Append value to agentRecord.[[KeptAlive]].
  3. Return unused.
Note
When the abstract operation AddToKeptObjects is called with a target object or symbol, it adds the target to a list that will point strongly at the target until ClearKeptObjects is called.