Skip to content

Commit 7c3aa9f

Browse files
authoredJan 7, 2025··
src: lock the thread properly in snapshot builder
Otherwise it can crash DCHECK when V8 expects that at least someone is locking the current thread. PR-URL: #56327 Fixes: nodejs/node-v8#294 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 75b9c1c commit 7c3aa9f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/node_snapshotable.cc

+2
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,8 @@ ExitCode BuildSnapshotWithoutCodeCache(
962962
}
963963

964964
Isolate* isolate = setup->isolate();
965+
v8::Locker locker(isolate);
966+
965967
{
966968
HandleScope scope(isolate);
967969
TryCatch bootstrapCatch(isolate);

0 commit comments

Comments
 (0)
Please sign in to comment.