Debian Codegraph @

js/public/friend/CycleCollector.h

raw
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 /*
6 * APIs for integration with the cycle collector.
7 */
8
9 #ifndef js_friend_CycleCollector_h
10 #define js_friend_CycleCollector_h
11
12 #include "jstypes.h"
13
14 #include "js/HeapAPI.h" // JS::GCCellPtr
15
16 namespace JS {
17
18 using ShouldClearWeakRefTargetCallback = bool (*)(GCCellPtr ptr, void* data);
19
20 extern JS_PUBLIC_API void MaybeClearWeakRefTargets(
21 JSRuntime* runtime, ShouldClearWeakRefTargetCallback callback, void* data);
22
23 } // namespace JS
24
25 #endif // js_friend_CycleCollector_h