Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2021-01-28 19:04:22 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2021-02-16 17:12:40 +0300
commit337b4e754042f8ea68eb236d6572361ccfb4aa47 (patch)
tree592569ecd379d50e4e0b9c230f60c6ea01e48440 /tools
parent2a5f67b3812a531f2bfed3330d827da165283163 (diff)
src: put (de)serialization code into node_snapshotable.h/cc
So that it's easier to find the corresponding code. PR-URL: https://github.com/nodejs/node/pull/37114 Refs: https://github.com/nodejs/node/pull/36943 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/snapshot/snapshot_builder.cc18
1 files changed, 1 insertions, 17 deletions
diff --git a/tools/snapshot/snapshot_builder.cc b/tools/snapshot/snapshot_builder.cc
index eb755b7d29e..f97c646dfa1 100644
--- a/tools/snapshot/snapshot_builder.cc
+++ b/tools/snapshot/snapshot_builder.cc
@@ -6,6 +6,7 @@
#include "node_external_reference.h"
#include "node_internals.h"
#include "node_main_instance.h"
+#include "node_snapshotable.h"
#include "node_v8_platform-inl.h"
namespace node {
@@ -14,7 +15,6 @@ using v8::Context;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
-using v8::Object;
using v8::SnapshotCreator;
using v8::StartupData;
@@ -75,22 +75,6 @@ const EnvSerializeInfo* NodeMainInstance::GetEnvSerializeInfo() {
return ss.str();
}
-static StartupData SerializeNodeContextInternalFields(Local<Object> holder,
- int index,
- void* env) {
- void* ptr = holder->GetAlignedPointerFromInternalField(index);
- if (ptr == nullptr || ptr == env) {
- return StartupData{nullptr, 0};
- }
- if (ptr == env && index == ContextEmbedderIndex::kEnvironment) {
- return StartupData{nullptr, 0};
- }
-
- // No embedder objects in the builtin snapshot yet.
- UNREACHABLE();
- return StartupData{nullptr, 0};
-}
-
std::string SnapshotBuilder::Generate(
const std::vector<std::string> args,
const std::vector<std::string> exec_args) {