diff --git a/tools/snapshot/node_mksnapshot.cc b/tools/snapshot/node_mksnapshot.cc index 29f9e1cbcbb096..0ea21990081fea 100644 --- a/tools/snapshot/node_mksnapshot.cc +++ b/tools/snapshot/node_mksnapshot.cc @@ -33,12 +33,18 @@ int main(int argc, char* argv[]) { return 1; } +// Windows needs conversion from wchar_t to char. See node_main.cc +#ifdef _WIN32 int node_argc = 1; char argv0[] = "node"; char* node_argv[] = {argv0, nullptr}; - node::InitializationResult result = node::InitializeOncePerProcess(node_argc, node_argv); +#else + node::InitializationResult result = + node::InitializeOncePerProcess(argc, argv); +#endif + CHECK(!result.early_return); CHECK_EQ(result.exit_code, 0); diff --git a/tools/snapshot/snapshot_builder.cc b/tools/snapshot/snapshot_builder.cc index 34070e1f6087ec..854edf9c09161f 100644 --- a/tools/snapshot/snapshot_builder.cc +++ b/tools/snapshot/snapshot_builder.cc @@ -169,7 +169,7 @@ std::string SnapshotBuilder::Generate( // Must be out of HandleScope StartupData blob = creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kClear); - // CHECK(blob.CanBeRehashed()); + CHECK(blob.CanBeRehashed()); // Must be done while the snapshot creator isolate is entered i.e. the // creator is still alive. env->set_stopping(true);