From aeda0c3d3575cf10bd7c7dae767a0fa56ffcf56b Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 12 Jun 2019 02:37:44 +0800 Subject: [PATCH] tools: assert that the snapshot can be rehashed in node_mksnapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28181 Refs: https://github.com/nodejs/node/pull/27365 Refs: https://github.com/nodejs/node/issues/17058 Reviewed-By: Michaël Zasso Reviewed-By: Gus Caplan Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann (רפאל פלחי) Reviewed-By: Ben Noordhuis Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Rich Trott --- tools/snapshot/snapshot_builder.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/snapshot/snapshot_builder.cc b/tools/snapshot/snapshot_builder.cc index 54a4a2e73da249..0fd2c49d2845a8 100644 --- a/tools/snapshot/snapshot_builder.cc +++ b/tools/snapshot/snapshot_builder.cc @@ -96,6 +96,7 @@ std::string SnapshotBuilder::Generate( // Must be out of HandleScope StartupData blob = creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kClear); + CHECK(blob.CanBeRehashed()); // Must be done while the snapshot creator isolate is entered i.e. the // creator is still alive. main_instance->Dispose();