Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 11d1eca

Browse files
laverdetbnoordhuis
authored andcommitted
Add explicit v8 locker
v8 requires a lock of each thread using the vm, but if none is explicitly is created it will implicitly create one for you. This creates issues when trying to build modules which use v8's multi-threading features because there's no lock to unlock.
1 parent f64989e commit 11d1eca

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/node.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2633,6 +2633,7 @@ int Start(int argc, char *argv[]) {
26332633
argv = Init(argc, argv);
26342634

26352635
v8::V8::Initialize();
2636+
v8::Locker locker;
26362637
v8::HandleScope handle_scope;
26372638

26382639
// Create the one and only Context.

0 commit comments

Comments
 (0)