node/src/node_snapshot_stub.cc
Joyee Cheung 30e8b5e2a2
tools: refactor snapshot builder
This patch:

- Moves the snapshot building code to src/ so that we can reuse it
  later when generating custom snapshots from an entry point accepted
  by the node binary.
- Create a SnapshotData struct that incorporates all the data useful
  for a snapshot blob, including both the V8 data and the Node.js
  data.

PR-URL: https://github.com/nodejs/node/pull/38902
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2021-06-10 14:17:49 +08:00

22 lines
501 B
C++

// This file is part of the embedder test, which is intentionally built without
// NODE_WANT_INTERNALS, so we define it here manually.
#define NODE_WANT_INTERNALS 1
#include "node_main_instance.h"
namespace node {
v8::StartupData* NodeMainInstance::GetEmbeddedSnapshotBlob() {
return nullptr;
}
const std::vector<size_t>* NodeMainInstance::GetIsolateDataIndices() {
return nullptr;
}
const EnvSerializeInfo* NodeMainInstance::GetEnvSerializeInfo() {
return nullptr;
}
} // namespace node