Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/js_native_api_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ class RefBase : protected Finalizer, RefTracker {
finalize_hint);
}

~RefBase() { Unlink(); }

inline void* Data() {
return _finalize_data;
}
Expand All @@ -240,7 +242,6 @@ class RefBase : protected Finalizer, RefTracker {
// the finalizer and _delete_self is set. In this case we
// know we need to do the deletion so just do it.
static inline void Delete(RefBase* reference) {
reference->Unlink();
if ((reference->RefCount() != 0) ||
(reference->_delete_self) ||
(reference->_finalize_ran)) {
Expand Down
2 changes: 0 additions & 2 deletions test/node-api/test_worker_terminate_finalization/test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
'use strict';
const common = require('../../common');

// TODO(addaleax): Run this test once it stops failing under ASAN/valgrind.
// Refs: https://github.com/nodejs/node/issues/34731
// Refs: https://github.com/nodejs/node/pull/35777
// Refs: https://github.com/nodejs/node/issues/35778
common.skip('Reference management in N-API leaks memory');

const { Worker, isMainThread } = require('worker_threads');

Expand Down