author | Randell Jesup <rjesup@wgate.com> |
Tue, 19 Feb 2019 08:40:14 -0500 | |
changeset 459843 | eb69f933e5722f078bf75845118ee8e161e16953 |
parent 459842 | 69e0ccbd95d115ff21fc48925d29628e1bbaca44 |
child 459844 | dd188d3b0907198c15d2ec517d3c53ffc4f69450 |
push id | 112014 |
push user | rjesup@wgate.com |
push date | Tue, 19 Feb 2019 13:43:38 +0000 |
treeherder | mozilla-inbound@eb69f933e572 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | smaug |
bugs | 1528349 |
milestone | 67.0a1 |
backs out | f8058a73d119bb9cb1cd4634b779516dece2c6ff |
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
|
--- a/dom/base/Timeout.h +++ b/dom/base/Timeout.h @@ -84,17 +84,17 @@ class Timeout final : public LinkedListE // Returned as value of setTimeout() uint32_t mTimeoutId; // Identifies which firing level this Timeout is being processed in // when sync loops trigger nested firing. uint32_t mFiringId; -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED +#ifdef DEBUG int64_t mFiringIndex; #endif // The popup state at timeout creation time if not created from // another timeout PopupBlocker::PopupControlState mPopupState; // Used to allow several reasons for setting a timeout, where each
--- a/dom/base/TimeoutManager.cpp +++ b/dom/base/TimeoutManager.cpp @@ -449,17 +449,17 @@ int32_t gDisableOpenClickDelay; TimeoutManager::TimeoutManager(nsGlobalWindowInner& aWindow, uint32_t aMaxIdleDeferMS) : mWindow(aWindow), mExecutor(new TimeoutExecutor(this, false, 0)), mIdleExecutor(new TimeoutExecutor(this, true, aMaxIdleDeferMS)), mTimeouts(*this), mTimeoutIdCounter(1), mNextFiringId(InvalidFiringId + 1), -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED +#ifdef DEBUG mFiringIndex(0), mLastFiringIndex(-1), #endif mRunningTimeout(nullptr), mIdleTimeouts(*this), mIdleCallbackTimeoutCounter(1), mLastBudgetUpdate(TimeStamp::Now()), mExecutionBudget(GetMaxBudget(mWindow.IsBackgroundInternal())), @@ -558,17 +558,17 @@ nsresult TimeoutManager::SetTimeout(nsIT // code can handle. (Note: we already forced |interval| to be non-negative, // so the uint32_t cast (to avoid compiler warnings) is ok.) uint32_t maxTimeoutMs = PR_IntervalToMilliseconds(DOM_MAX_TIMEOUT_VALUE); if (static_cast<uint32_t>(interval) > maxTimeoutMs) { interval = maxTimeoutMs; } RefPtr<Timeout> timeout = new Timeout(); -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED +#ifdef DEBUG timeout->mFiringIndex = -1; #endif timeout->mWindow = &mWindow; timeout->mIsInterval = aIsInterval; timeout->mInterval = TimeDuration::FromMilliseconds(interval); timeout->mScriptHandler = aHandler; timeout->mReason = aReason; @@ -894,17 +894,17 @@ void TimeoutManager::RunTimeout(const Ti // retain compliance with the spec language // (https://html.spec.whatwg.org/#dom-settimeout) specifically items // 15 ("If method context is a Window object, wait until the Document // associated with method context has been fully active for a further // timeout milliseconds (not necessarily consecutively)") and item 16 // ("Wait until any invocations of this algorithm that had the same // method context, that started before this one, and whose timeout is // equal to or less than this one's, have completed."). -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED +#ifdef DEBUG if (timeout->mFiringIndex == -1) { timeout->mFiringIndex = mFiringIndex++; } #endif if (mIsLoading && !aProcessIdle) { // Any timeouts that would fire during a load will be deferred // until the load event occurs, but if there's an idle time, @@ -934,18 +934,18 @@ void TimeoutManager::RunTimeout(const Ti if (!scx) { // No context means this window was closed or never properly // initialized for this language. This timer will never fire // so just remove it. timeout->remove(); continue; } -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED - MOZ_DIAGNOSTIC_ASSERT(timeout->mFiringIndex > mLastFiringIndex); +#ifdef DEBUG + MOZ_ASSERT(timeout->mFiringIndex > mLastFiringIndex); mLastFiringIndex = timeout->mFiringIndex; #endif // This timeout is good to run bool timeout_was_cleared = mWindow.RunTimeoutHandler(timeout, scx); #if MOZ_GECKO_PROFILER if (profiler_is_active()) { TimeDuration elapsed = now - timeout->SubmitTime(); TimeDuration target = timeout->When() - timeout->SubmitTime(); @@ -1063,17 +1063,17 @@ bool TimeoutManager::RescheduleTimeout(T // Compute time to next timeout for interval timer. // Make sure nextInterval is at least CalculateDelay(). TimeDuration nextInterval = CalculateDelay(aTimeout); TimeStamp firingTime = aLastCallbackTime + nextInterval; TimeDuration delay = firingTime - aCurrentNow; -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED +#ifdef DEBUG aTimeout->mFiringIndex = -1; #endif // And make sure delay is nonnegative; that might happen if the timer // thread is firing our timers somewhat early or if they're taking a long // time to run the callback. if (delay < TimeDuration(0)) { delay = TimeDuration(0); }
--- a/dom/base/TimeoutManager.h +++ b/dom/base/TimeoutManager.h @@ -198,17 +198,17 @@ class TimeoutManager final { // it must be a separate ref-counted object. RefPtr<TimeoutExecutor> mExecutor; // For timeouts run off the idle queue RefPtr<TimeoutExecutor> mIdleExecutor; // The list of timeouts coming from non-tracking scripts. Timeouts mTimeouts; uint32_t mTimeoutIdCounter; uint32_t mNextFiringId; -#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED +#ifdef DEBUG int64_t mFiringIndex; int64_t mLastFiringIndex; #endif AutoTArray<uint32_t, 2> mFiringIdStack; mozilla::dom::Timeout* mRunningTimeout; // Timeouts that would have fired but are being deferred until MainThread // is idle (because we're loading)