From 056befb2a2896df995e67774ddbac7a9f56e04f2 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 20 Dec 2024 18:43:01 +0100 Subject: [PATCH] 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. --- src/node_snapshotable.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index fe04a8ee8d708b..9e0aea0bbba2fe 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -962,6 +962,8 @@ ExitCode BuildSnapshotWithoutCodeCache( } Isolate* isolate = setup->isolate(); + v8::Locker locker(isolate); + { HandleScope scope(isolate); TryCatch bootstrapCatch(isolate);