diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2021-01-28 19:04:22 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2021-02-05 15:18:47 +0300 |
commit | 2e769a92ff1e600f56deb3a65ff9823816aff330 (patch) | |
tree | 2711607c7aac8798151f3e35b2791d9a38421f40 /src/node_snapshotable.h | |
parent | 9aeb83643486328cbdffb55a23efe953f6ee54e0 (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 'src/node_snapshotable.h')
-rw-r--r-- | src/node_snapshotable.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/node_snapshotable.h b/src/node_snapshotable.h new file mode 100644 index 00000000000..c45c1381b55 --- /dev/null +++ b/src/node_snapshotable.h @@ -0,0 +1,21 @@ + +#ifndef SRC_NODE_SNAPSHOTABLE_H_ +#define SRC_NODE_SNAPSHOTABLE_H_ + +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + +#include "v8.h" +namespace node { + +v8::StartupData SerializeNodeContextInternalFields(v8::Local<v8::Object> holder, + int index, + void* env); +void DeserializeNodeInternalFields(v8::Local<v8::Object> holder, + int index, + v8::StartupData payload, + void* env); +} // namespace node + +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + +#endif // SRC_NODE_SNAPSHOTABLE_H_ |