Skip to content

Commit 500f3cc

Browse files
joyeecheungmarco-ippolito
authored andcommitted
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 589d0ae commit 500f3cc

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
@@ -982,6 +982,8 @@ ExitCode BuildSnapshotWithoutCodeCache(
982982
}
983983

984984
Isolate* isolate = setup->isolate();
985+
v8::Locker locker(isolate);
986+
985987
{
986988
HandleScope scope(isolate);
987989
TryCatch bootstrapCatch(isolate);

0 commit comments

Comments
 (0)