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
Prev Previous commit
address PR feedback
  • Loading branch information
vmoroz committed Sep 28, 2023
commit 25bfcaf9024b1ac3bcea78f60497e14ea4718784
2 changes: 1 addition & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5453,7 +5453,7 @@ napi_status node_api_post_finalizer(napi_env env,

Returns `napi_ok` if the API succeeded.

Schedules `napi_finalize` callback to be called asynchronously in the
Schedules a `napi_finalize` callback to be called asynchronously in the
event loop.

Normally, finalizers are called while the GC (garbage collector) collects
Expand Down
8 changes: 2 additions & 6 deletions test/js-native-api/test_finalizer/test_fatal_finalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,5 @@ const { spawnSync } = require('child_process');
const child = spawnSync(process.execPath, [
'--expose-gc', __filename, 'child',
]);
if (common.isWindows) {
assert.strictEqual(child.signal, null);
assert.match(child.stderr.toString(), /Finalizer is calling a function that may affect GC state/);
} else {
assert.strictEqual(child.signal, 'SIGABRT');
}
assert.strictEqual(child.signal, common.isWindows ? null : 'SIGABRT');
assert.match(child.stderr.toString(), /Finalizer is calling a function that may affect GC state/);