From ef44fe7aaf1658c6755999f288fc1adc96d67ee2 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 3 Aug 2022 02:22:53 +0800 Subject: [PATCH] bootstrap: turn on FunctionCodeHandling::kKeep in the snapshot builder To improve startup performance. --- src/node_snapshotable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 0fb298814f4457..7bd52bf1b96f31 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -1013,7 +1013,7 @@ int SnapshotBuilder::Generate(SnapshotData* out, // Must be out of HandleScope out->v8_snapshot_blob_data = - creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kClear); + creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kKeep); // We must be able to rehash the blob when we restore it or otherwise // the hash seed would be fixed by V8, introducing a vulnerability.