Skip to content

src: fix negative nodeTiming milestone values

Although the performance.timeOrigin is a Web API, Node.js specific extension performance.nodeTiming exposes the process performance milestones in the main thread and the worker threads. In order to avoid exposing negative values in performance.nodeTiming, set the performance.timeOrigin to the start time of the process both in the main thread and worker threads.

Refs: https://github.com/nodejs/node/pull/43781 Fixes https://github.com/nodejs/node/issues/45958, with regression test cases.

Merge request reports

Loading