Bug 1922494 - Profiler markers inserted by performance.measure should use an unclamped value when no end value is submitted r=sefeng

A clamped value was used incorrectly when no end timestamp or end mark
was given by the caller.

Differential Revision: https://phabricator.services.mozilla.com/D224455
This commit is contained in:
Julien Wajsberg 2024-10-09 11:57:46 +00:00
parent 2c18a8608a
commit 0ebcc934a6

View File

@ -524,6 +524,9 @@ DOMHighResTimeStamp Performance::ResolveEndTimeForMeasure(
}
endTime = start + duration;
} else if (aReturnUnclamped) {
MOZ_DIAGNOSTIC_ASSERT(profiler_thread_is_being_profiled_for_markers());
endTime = NowUnclamped();
} else {
endTime = Now();
}