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 danielleadams committed Aug 11, 2022
1 parent f461d79 commit bd27b8b
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 @@ -1014,7 +1014,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 bd27b8b

Please sign in to comment.