Skip to content

Commit 9085412

Browse files
joyeecheungBridgeAR
authored andcommitted
tools: assert that the snapshot can be rehashed in node_mksnapshot
PR-URL: #28181 Refs: #27365 Refs: #17058 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 833d3d5 commit 9085412

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/snapshot/snapshot_builder.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ std::string SnapshotBuilder::Generate(
9696
// Must be out of HandleScope
9797
StartupData blob =
9898
creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kClear);
99+
CHECK(blob.CanBeRehashed());
99100
// Must be done while the snapshot creator isolate is entered i.e. the
100101
// creator is still alive.
101102
main_instance->Dispose();

0 commit comments

Comments
 (0)