mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-28 04:00:33 +00:00
PerformanceTiming::monotonic_timestamp_to_wall_time_milliseconds assumes all DocumentLoadTimingInfo values are monotonic timestamps and converts them via wall_time = timestamp - epoch. This is correct for navigation_start_time (a true monotonic timestamp), but wrong for all other timing fields like load_event_end_time, dom_complete_time etc., which are stored as relative timestamps via current_high_resolution_time() (relative to time origin). The computed wall clock value ends up off by navigation_start_time, causing convert_name_to_timestamp() to return wrapped-around u64 values. This broke performance.measure() when using navigation timing attribute names as start/end marks. Add relative_timestamp_to_wall_time_milliseconds which adds back navigation_start_time before the epoch subtraction, producing correct UTC epoch ms for these fields. |
||
|---|---|---|
| .. | ||
| EntryNames.cpp | ||
| EntryNames.h | ||
| PerformanceExtensions.idl | ||
| PerformanceNavigation.cpp | ||
| PerformanceNavigation.h | ||
| PerformanceNavigation.idl | ||
| PerformanceTiming.cpp | ||
| PerformanceTiming.h | ||
| PerformanceTiming.idl | ||