Skip to content
Merged
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
2 changes: 2 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@
'deps/googletest/googletest.gyp:gtest_prod',
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
'tools/v8_gypfiles/abseil.gyp:abseil',
'node_js2c#host',
],

Expand Down Expand Up @@ -1159,6 +1160,7 @@
'deps/googletest/googletest.gyp:gtest_main',
'deps/histogram/histogram.gyp:histogram',
'deps/nbytes/nbytes.gyp:nbytes',
'tools/v8_gypfiles/abseil.gyp:abseil',
],

'includes': [
Expand Down
7 changes: 7 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
#include <unistd.h> // STDIN_FILENO, STDERR_FILENO
#endif

#include "absl/synchronization/mutex.h"

// ========== global C++ headers ==========

#include <cerrno>
Expand Down Expand Up @@ -1211,6 +1213,11 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,

if (!(flags & ProcessInitializationFlags::kNoInitializeV8)) {
V8::Initialize();

// Disable absl deadlock detection in V8 as it reports false-positive cases.
// TODO(legendecas): Replace this global disablement with case suppressions.
// https://github.com/nodejs/node-v8/issues/301
absl::SetMutexDeadlockDetectionMode(absl::OnDeadlockCycle::kIgnore);
}

if (!(flags & ProcessInitializationFlags::kNoInitializeCppgc)) {
Expand Down
6 changes: 6 additions & 0 deletions test/cctest/node_test_fixture.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "node_test_fixture.h"
#include "absl/synchronization/mutex.h"
#include "cppgc/platform.h"

ArrayBufferUniquePtr NodeZeroIsolateTestFixture::allocator{nullptr, nullptr};
Expand Down Expand Up @@ -31,6 +32,11 @@ void NodeTestEnvironment::SetUp() {
v8::V8::SetFlagsFromString("--no-freeze-flags-after-init");

v8::V8::Initialize();

// Disable absl deadlock detection in V8 as it reports false-positive cases.
// TODO(legendecas): Replace this global disablement with case suppressions.
// https://github.com/nodejs/node-v8/issues/301
absl::SetMutexDeadlockDetectionMode(absl::OnDeadlockCycle::kIgnore);
}

void NodeTestEnvironment::TearDown() {
Expand Down
Loading