| // Copyright 2019 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| extern class JSFinalizationGroup extends JSObject { |
| native_context: NativeContext; |
| cleanup: Object; |
| active_cells: Undefined|WeakCell; |
| cleared_cells: Undefined|WeakCell; |
| key_map: Object; |
| next: Undefined|JSFinalizationGroup; |
| flags: Smi; |
| } |
| |
| @generateCppClass |
| extern class JSFinalizationGroupCleanupIterator extends JSObject { |
| finalization_group: JSFinalizationGroup; |
| } |
| |
| @generateCppClass |
| extern class WeakCell extends HeapObject { |
| finalization_group: Undefined|JSFinalizationGroup; |
| target: Undefined|JSReceiver; |
| holdings: Object; |
| |
| // For storing doubly linked lists of WeakCells in JSFinalizationGroup's |
| // "active_cells" and "cleared_cells" lists. |
| prev: Undefined|WeakCell; |
| next: Undefined|WeakCell; |
| |
| // For storing doubly linked lists of WeakCells per key in |
| // JSFinalizationGroup's key-based hashmap. WeakCell also needs to know its |
| // key, so that we can remove the key from the key_map when we remove the last |
| // WeakCell associated with it. |
| key: Object; |
| key_list_prev: Undefined|WeakCell; |
| key_list_next: Undefined|WeakCell; |
| } |
| |
| @generateCppClass |
| extern class JSWeakRef extends JSObject { |
| target: Undefined|JSReceiver; |
| } |