Skip to content

Commit

Permalink
tools: re-enable CanBeRehashed() check
Browse files Browse the repository at this point in the history
  • Loading branch information
joyeecheung committed May 5, 2020
1 parent 3d52c32 commit 872b502
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tools/snapshot/node_mksnapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion tools/snapshot/snapshot_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 872b502

Please sign in to comment.