From ff3ed25603d70f45fdce6c6063bdf1515316773f Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Mon, 11 Jun 2018 22:11:16 +0300 Subject: [PATCH] Bug 1467920, ensure only non-negative values are reported to telemetry, r=mccr8 --HG-- extra : rebase_source : 09a804d5a4ee753c32a09c79c7bebe1ed85a5713 --- dom/base/nsJSEnvironment.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 025b767d7d01..2586aabcd4cc 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -1281,7 +1281,9 @@ FireForgetSkippable(uint32_t aSuspected, bool aRemoveChildless, if (!aDeadline.IsNull()) { if (aDeadline < now) { // This slice overflowed the idle period. - idleDuration = aDeadline - startTimeStamp; + if (aDeadline > startTimeStamp) { + idleDuration = aDeadline - startTimeStamp; + } } else { idleDuration = duration; }