Skip to content

Commit

Permalink
fixup! src: support configurable snapshot
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Henningsen <github@addaleax.net>
  • Loading branch information
joyeecheung and addaleax authored Nov 15, 2023
1 parent c146c18 commit feed446
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ enum Flags : uint64_t {
enum class SnapshotFlags : uint32_t {
kDefault = 0,
// Whether code cache should be generated as part of the snapshot.
// Code cache reduce the time spent on compiling functions included
// Code cache reduces the time spent on compiling functions included
// in the snapshot at the expense of a bigger snapshot size and
// potentially breaking portability of the snapshot.
kWithoutCodeCache = 1 << 0,
Expand All @@ -683,7 +683,7 @@ struct SnapshotConfig {
// LoadEnvironment() to run a script matching this path. In that case the
// snapshot is generated as a custom snapshot and the event loop is run, so
// the snapshot builder can execute asynchronous operations as long as they
// are run to completion when the snasphot is taken.
// are run to completion when the snapshot is taken.
std::optional<std::string> builder_script_path;
};

Expand Down
2 changes: 1 addition & 1 deletion test/embedding/embedtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform,
snapshot_config = node::SnapshotConfig{};
}
snapshot_config.value().flags = static_cast<node::SnapshotFlags>(
static_cast<uint32_t>(snapshot_config.value().flags) &
static_cast<uint32_t>(snapshot_config.value().flags) |
static_cast<uint32_t>(node::SnapshotFlags::kWithoutCodeCache));
} else if (arg == "--embedder-snapshot-blob") {
assert(i + 1 < args.size());
Expand Down

0 comments on commit feed446

Please sign in to comment.