Skip to content

Commit

Permalink
src: lock the thread properly in snapshot builder
Browse files Browse the repository at this point in the history
Otherwise it can crash DCHECK when V8 expects that at least someone
is locking the current thread.
  • Loading branch information
joyeecheung committed Dec 20, 2024
1 parent fd8de67 commit 056befb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,8 @@ ExitCode BuildSnapshotWithoutCodeCache(
}

Isolate* isolate = setup->isolate();
v8::Locker locker(isolate);

{
HandleScope scope(isolate);
TryCatch bootstrapCatch(isolate);
Expand Down

0 comments on commit 056befb

Please sign in to comment.