Skip to content

Commit 872b502

Browse files
committed
tools: re-enable CanBeRehashed() check
1 parent 3d52c32 commit 872b502

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tools/snapshot/node_mksnapshot.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,18 @@ int main(int argc, char* argv[]) {
3333
return 1;
3434
}
3535

36+
// Windows needs conversion from wchar_t to char. See node_main.cc
37+
#ifdef _WIN32
3638
int node_argc = 1;
3739
char argv0[] = "node";
3840
char* node_argv[] = {argv0, nullptr};
39-
4041
node::InitializationResult result =
4142
node::InitializeOncePerProcess(node_argc, node_argv);
43+
#else
44+
node::InitializationResult result =
45+
node::InitializeOncePerProcess(argc, argv);
46+
#endif
47+
4248
CHECK(!result.early_return);
4349
CHECK_EQ(result.exit_code, 0);
4450

tools/snapshot/snapshot_builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ std::string SnapshotBuilder::Generate(
169169
// Must be out of HandleScope
170170
StartupData blob =
171171
creator.CreateBlob(SnapshotCreator::FunctionCodeHandling::kClear);
172-
// CHECK(blob.CanBeRehashed());
172+
CHECK(blob.CanBeRehashed());
173173
// Must be done while the snapshot creator isolate is entered i.e. the
174174
// creator is still alive.
175175
env->set_stopping(true);

0 commit comments

Comments
 (0)