Skip to content

Commit 25bfcaf

Browse files
committed
address PR feedback
1 parent 03d16c7 commit 25bfcaf

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

doc/api/n-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5453,7 +5453,7 @@ napi_status node_api_post_finalizer(napi_env env,
54535453

54545454
Returns `napi_ok` if the API succeeded.
54555455

5456-
Schedules `napi_finalize` callback to be called asynchronously in the
5456+
Schedules a `napi_finalize` callback to be called asynchronously in the
54575457
event loop.
54585458

54595459
Normally, finalizers are called while the GC (garbage collector) collects

test/js-native-api/test_finalizer/test_fatal_finalize.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,5 @@ const { spawnSync } = require('child_process');
2727
const child = spawnSync(process.execPath, [
2828
'--expose-gc', __filename, 'child',
2929
]);
30-
if (common.isWindows) {
31-
assert.strictEqual(child.signal, null);
32-
assert.match(child.stderr.toString(), /Finalizer is calling a function that may affect GC state/);
33-
} else {
34-
assert.strictEqual(child.signal, 'SIGABRT');
35-
}
30+
assert.strictEqual(child.signal, common.isWindows ? null : 'SIGABRT');
31+
assert.match(child.stderr.toString(), /Finalizer is calling a function that may affect GC state/);

0 commit comments

Comments
 (0)