/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/objects/js-weak-refs.tq
45 строк
2 KB
Michaël Zasso
deps: update V8 to 14.2.231.9
23 окт 2025, 08:36
Не верифицирован
23 окт 2025, 08:36
c2843b7
Код
Авторство
О чём код?
// 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. bitfield struct FinalizationRegistryFlags extends uint31 { scheduled_for_cleanup: bool: 1 bit; } extern class JSFinalizationRegistry extends JSObject { native_context: NativeContext; cleanup: Callable; 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: SmiTagged<FinalizationRegistryFlags>; } @cppObjectLayoutDefinition extern class WeakCell extends HeapObject { finalization_registry: JSFinalizationRegistry; holdings: JSAny; target: Undefined|JSReceiver|Symbol; unregister_token: Undefined|JSReceiver|Symbol; // 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; } extern class JSWeakRef extends JSObject { target: Undefined|JSReceiver|Symbol; }