Bug 1378586 P4 Clamp setInterval() based on nesting value instead of always. r=farre
authorBen Kelly <ben@wanderview.com>
Tue, 25 Jul 2017 08:35:12 -0700
changeset 419597 fbccc5bd7c145968efd0903e087172be38a0e8ae
parent 419596 9d1d8507fc97fde906fff564a29e85981526f246
child 419598 81c36a4d6b3651579dc6bc3f4e562bf082f09813
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre
bugs1378586
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1378586 P4 Clamp setInterval() based on nesting value instead of always. r=farre
dom/base/TimeoutManager.cpp
--- a/dom/base/TimeoutManager.cpp
+++ b/dom/base/TimeoutManager.cpp
@@ -311,18 +311,17 @@ TimeoutManager::IsInvalidFiringId(uint32
 // uses 5.
 #define DOM_CLAMP_TIMEOUT_NESTING_LEVEL 5u
 
 TimeDuration
 TimeoutManager::CalculateDelay(Timeout* aTimeout) const {
   MOZ_DIAGNOSTIC_ASSERT(aTimeout);
   TimeDuration result = aTimeout->mInterval;
 
-  if (aTimeout->mIsInterval ||
-      aTimeout->mNestingLevel >= DOM_CLAMP_TIMEOUT_NESTING_LEVEL) {
+  if (aTimeout->mNestingLevel >= DOM_CLAMP_TIMEOUT_NESTING_LEVEL) {
     result = TimeDuration::Max(
       result, TimeDuration::FromMilliseconds(gMinClampTimeoutValue));
   }
 
   if (aTimeout->mIsTracking && mThrottleTrackingTimeouts) {
     result = TimeDuration::Max(
       result, TimeDuration::FromMilliseconds(gMinTrackingTimeoutValue));
   }