Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[JS] Remove redundant cleanup_handle write to fix data race in TensorImpl (#37680)

Alicja Miloszewskac9a40ac0c7ed
diff --git a/src/bindings/js/node/src/tensor_impl.cpp b/src/bindings/js/node/src/tensor_impl.cpp
index 3866a35a6d5..0a8d0dd9a62 100644
--- a/src/bindings/js/node/src/tensor_impl.cpp
+++ b/src/bindings/js/node/src/tensor_impl.cpp
@@ -35,9 +35,8 @@ void TensorImpl::CleanupContext::remove_cleanup_hook() noexcept {
}
// Handles Node environment teardown by forcing TSFN shutdown through the cleanup hook path.
-void TensorImpl::CleanupContext::cleanup_hook(napi_async_cleanup_hook_handle handle, void* data) noexcept {
+void TensorImpl::CleanupContext::cleanup_hook(napi_async_cleanup_hook_handle /*handle*/, void* data) noexcept {
auto* cleanup_ctx = static_cast<TensorImpl::CleanupContext*>(data);
- cleanup_ctx->cleanup_handle = handle;
cleanup_ctx->release_tsfn();
cleanup_ctx->remove_cleanup_hook();
}