From feed446bacd273c27db2a26b95bde5b0430d18ab Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Wed, 15 Nov 2023 19:37:51 +0100 Subject: [PATCH] fixup! src: support configurable snapshot Co-authored-by: Anna Henningsen --- src/node.h | 4 ++-- test/embedding/embedtest.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node.h b/src/node.h index bdc61efde16973..bf3382f4c952ca 100644 --- a/src/node.h +++ b/src/node.h @@ -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, @@ -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 builder_script_path; }; diff --git a/test/embedding/embedtest.cc b/test/embedding/embedtest.cc index 07ad34ef430cec..43965b6056e455 100644 --- a/test/embedding/embedtest.cc +++ b/test/embedding/embedtest.cc @@ -94,7 +94,7 @@ int RunNodeInstance(MultiIsolatePlatform* platform, snapshot_config = node::SnapshotConfig{}; } snapshot_config.value().flags = static_cast( - static_cast(snapshot_config.value().flags) & + static_cast(snapshot_config.value().flags) | static_cast(node::SnapshotFlags::kWithoutCodeCache)); } else if (arg == "--embedder-snapshot-blob") { assert(i + 1 < args.size());