Skip to content

Commit

Permalink
bootstrap: turn on FunctionCodeHandling::kKeep in the snapshot builder
Browse files Browse the repository at this point in the history
To improve startup performance.

PR-URL: #44104
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
joyeecheung authored and ruyadorno committed Aug 22, 2022
1 parent cb7a9e7 commit 123b2d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,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.
Expand Down

0 comments on commit 123b2d6

Please sign in to comment.