diff --git a/test/addons/worker-buffer-callback/binding.cc b/test/addons/worker-buffer-callback/binding.cc index f600f410c1ed18..ac4c0cb498b7c7 100644 --- a/test/addons/worker-buffer-callback/binding.cc +++ b/test/addons/worker-buffer-callback/binding.cc @@ -30,7 +30,7 @@ void Initialize(Local exports, node::Buffer::New( isolate, data, - sizeof(data), + sizeof(char), [](char* data, void* hint) { delete data; free_call_count++; diff --git a/test/node-api/test_worker_buffer_callback/test_worker_buffer_callback.c b/test/node-api/test_worker_buffer_callback/test_worker_buffer_callback.c index 3275551aee526a..b4f2e288ece31b 100644 --- a/test/node-api/test_worker_buffer_callback/test_worker_buffer_callback.c +++ b/test/node-api/test_worker_buffer_callback/test_worker_buffer_callback.c @@ -35,7 +35,7 @@ NAPI_MODULE_INIT() { NAPI_CALL(env, napi_create_external_arraybuffer( env, data, - sizeof(data), + sizeof(char), finalize_cb, NULL, &buffer));