diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2021-07-09 20:54:09 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2021-11-17 06:46:30 +0300 |
commit | e6d8ae05b2cba68594d6ffd7cce721f19b1722bd (patch) | |
tree | c7de05c7401b1d5fd5ce570c86a03433c707dfe9 /src/node_snapshotable.cc | |
parent | 4265f2769bf91c0edb002da675fce98bbf61de04 (diff) |
process: support hrtime in the snapshot
Put the hrtime backing store in the process methods binding data
so that it can be integrated into the snapshot builder. For
now we simply discard the contents of the hrtime buffer during
serialization and create new buffers upon deserialization because
the contents are only useful in a synchronous call.
This also moves the helper function for creating V8 FastAPI methods
into `Environment::SetFastMethod()` for code reuse. The v8::CFunction
need to be created before the Environment is created so that we
have the CTypeInfo address available for external reference
registration.
PR-URL: https://github.com/nodejs/node/pull/40649
Refs: https://github.com/nodejs/node/issues/35711
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_snapshotable.cc')
-rw-r--r-- | src/node_snapshotable.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 6e284bb66a0..6f45ce53790 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -11,6 +11,7 @@ #include "node_file.h" #include "node_internals.h" #include "node_main_instance.h" +#include "node_process.h" #include "node_v8.h" #include "node_v8_platform-inl.h" |