blob: 7adcb93d704a488f4b49bbc3d73dc62eb40d8594 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// 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 JSFinalizationRegistry extends JSObject {
native_context: NativeContext;
cleanup: Object;
active_cells: Undefined|WeakCell;
cleared_cells: Undefined|WeakCell;
key_map: Object;
// For the linked list of FinalizationRegistries that need cleanup. This
// link is weak.
next_dirty: Undefined|JSFinalizationRegistry;
flags: Smi;
}
@generateCppClass
extern class JSFinalizationRegistryCleanupIterator extends JSObject {
finalization_registry: JSFinalizationRegistry;
}
@generateCppClass
extern class WeakCell extends HeapObject {
finalization_registry: Undefined|JSFinalizationRegistry;
target: Undefined|JSReceiver;
unregister_token: Object;
holdings: Object;
// For storing doubly linked lists of WeakCells in JSFinalizationRegistry's
// "active_cells" and "cleared_cells" lists.
prev: Undefined|WeakCell;
next: Undefined|WeakCell;
// For storing doubly linked lists of WeakCells per key in
// JSFinalizationRegistry's key-based hashmap. The key is the identity hash
// of unregister_token. WeakCell also needs to know its token, so that we
// can remove its corresponding key from the key_map when we remove the last
// WeakCell associated with it or when the unregister_token dies. The
// unregister token is stored above, after target, as both are weak.
key_list_prev: Undefined|WeakCell;
key_list_next: Undefined|WeakCell;
}
@generateCppClass
extern class JSWeakRef extends JSObject {
target: Undefined|JSReceiver;
}
|