Skip to content

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.

This is split from https://github.com/nodejs/node/pull/38905

Refs: https://github.com/nodejs/node/issues/35711 Refs: https://github.com/nodejs/node/issues/37476

Merge request reports

Loading