We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd0fc46 commit bce07f9Copy full SHA for bce07f9
src/node_api.cc
@@ -67,9 +67,12 @@ void node_napi_env__::EnqueueFinalizer(v8impl::RefTracker* finalizer) {
67
}
68
69
void node_napi_env__::DrainFinalizerQueue() {
70
+ // Process all pending finalizers. If new finalizers are added during
71
+ // Finalize() calls,
72
+ // they are handled in subsequent recursive calls.
73
decltype(pending_finalizers) current_finalizers;
74
current_finalizers.swap(pending_finalizers);
-
75
+
76
for (auto* ref_tracker : current_finalizers) {
77
ref_tracker->Finalize();
78
0 commit comments