mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
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: https://github.com/nodejs/node/pull/56327 Fixes: https://github.com/nodejs/node-v8/issues/294 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
589d0ae8ea
commit
500f3ccc66
1 file changed
+2
@@ -982,6 +982,8 @@ ExitCode BuildSnapshotWithoutCodeCache(
|
||||
}
|
||||
|
||||
Isolate* isolate = setup->isolate();
|
||||
v8::Locker locker(isolate);
|
||||
|
||||
{
|
||||
HandleScope scope(isolate);
|
||||
TryCatch bootstrapCatch(isolate);
|
||||
|
||||
Reference in new issue
Block a user