commit 31ed2996ff01f1dd7926ae4329be08ce1dc068f5
parent 5bd4eac454f43bb3bc78b76518ee6b99ada3794f
Author: Jens Stutte <jstutte@mozilla.com>
Date: Tue, 18 Nov 2025 08:13:07 +0000
Bug 1999986 - Use ToSeconds in UpdateStringsVectorInternal. r=gfx-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D272839
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
@@ -246,8 +246,10 @@ bool CrashStatsLogForwarder::UpdateStringsVectorInternal(
MOZ_ASSERT(index >= 0 && index < (int32_t)mMaxCapacity);
MOZ_ASSERT(index <= mIndex && index <= (int32_t)mBuffer.size());
- double tStamp = (TimeStamp::NowLoRes() - TimeStamp::ProcessCreation())
- .ToSecondsSigDigits();
+ // ToSeconds preserves the full precision of the TimeDuration. It is assumed
+ // that visualizations of this value will format/truncate it to their needs.
+ double tStamp =
+ (TimeStamp::NowLoRes() - TimeStamp::ProcessCreation()).ToSeconds();
// Checking for index >= mBuffer.size(), rather than index == mBuffer.size()
// just out of paranoia, but we know index <= mBuffer.size().