Revert "n-api: detect deadlocks in thread-safe function"

This reverts commit d26ca06c16 because
it breaks running the tests in debug mode, as
`v8::Isolate::GetCurrent()` is not allowed if no `Isolate` is active
on the current thread.

Refs: https://github.com/nodejs/node/pull/33276
Refs: https://github.com/nodejs/node/pull/32860

PR-URL: https://github.com/nodejs/node/pull/33453
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
This commit is contained in:
Anna Henningsen 2020-05-18 06:50:14 +02:00 committed by Ruben Bridgewater
parent f14229e704
commit b18d8dde84
6 changed files with 18 additions and 109 deletions

View file

@ -210,13 +210,8 @@ new Promise(function testWithoutJSMarshaller(resolve) {
}))
.then((result) => assert.strictEqual(result.indexOf(0), -1))
// Start a child process to test rapid teardown.
// Start a child process to test rapid teardown
.then(() => testUnref(binding.MAX_QUEUE_SIZE))
// Start a child process with an infinite queue to test rapid teardown.
.then(() => testUnref(0))
// Test deadlock prevention.
.then(() => assert.deepStrictEqual(binding.TestDeadlock(), {
deadlockTest: 'Main thread would deadlock'
}));
// Start a child process with an infinite queue to test rapid teardown
.then(() => testUnref(0));