diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 5b00b61ec0463..6bac48da4a4ac 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -88766,56 +88766,6 @@ mirror : always # -ifdef -XP_WIN -# -Controls -whether -or -not -TimerThread -will -automatically -increase -the -Windows -timer -# -resolution -when -appropriate -conditions -are -met -. -- -name -: -timer -. -auto_increase_timer_resolution -type -: -RelaxedAtomicBool -# -ifdef -NIGHTLY_BUILD -value -: -true -# -else -value -: -false -# -endif -mirror -: -always -# -endif -# - - - diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index a9f3ef5c4ec06..c35a22dc27d33 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -36,13 +36,6 @@ h # include " -nsIPropertyBag2 -. -h -" -# -include -" mozilla / Services @@ -112,180 +105,6 @@ math . h > -# -ifdef -XP_WIN -# -include -< -windows -. -h -> -# -include -< -mmsystem -. -h -> -static -constexpr -UINT -kTimerPeriodHiRes -= -1 -; -static -constexpr -UINT -kTimerPeriodLowRes -= -16 -; -static -constexpr -UINT -GetDesiredTimerPeriod -( -const -bool -aOnBatteryPower -const -bool -aLowProcessPriority -) -{ -const -bool -useLowResTimer -= -aOnBatteryPower -| -| -aLowProcessPriority -; -return -useLowResTimer -? -kTimerPeriodLowRes -: -kTimerPeriodHiRes -; -} -static_assert -( -GetDesiredTimerPeriod -( -true -false -) -= -= -kTimerPeriodLowRes -) -; -static_assert -( -GetDesiredTimerPeriod -( -false -true -) -= -= -kTimerPeriodLowRes -) -; -static_assert -( -GetDesiredTimerPeriod -( -true -true -) -= -= -kTimerPeriodLowRes -) -; -static_assert -( -GetDesiredTimerPeriod -( -false -false -) -= -= -kTimerPeriodHiRes -) -; -UINT -TimerThread -: -: -ComputeDesiredTimerPeriod -( -) -const -{ -const -bool -lowPriorityProcess -= -mCachedPriority -. -load -( -std -: -: -memory_order_relaxed -) -< -hal -: -: -PROCESS_PRIORITY_FOREGROUND -; -SYSTEM_POWER_STATUS -status -; -const -bool -onBatteryPower -= -! -lowPriorityProcess -& -& -GetSystemPowerStatus -( -& -status -) -& -& -( -status -. -ACLineStatus -= -= -0 -) -; -return -GetDesiredTimerPeriod -( -onBatteryPower -lowPriorityProcess -) -; -} -# -endif using namespace mozilla @@ -1006,24 +825,6 @@ resume_process_notification false ) ; -observerService -- -> -AddObserver -( -mObserver -" -ipc -: -process -- -priority -- -changed -" -false -) -; } return NS_OK @@ -3600,73 +3401,6 @@ SetLengthAndRetainStorage kMaxQueuedTimerFired ) ; -# -ifdef -XP_WIN -static -constexpr -float -kTimerPeriodEvalIntervalSec -= -2 -. -0f -; -const -TimeDuration -timerPeriodEvalInterval -= -TimeDuration -: -: -FromSeconds -( -kTimerPeriodEvalIntervalSec -) -; -TimeStamp -nextTimerPeriodEval -= -TimeStamp -: -: -Now -( -) -+ -timerPeriodEvalInterval -; -const -bool -adjustTimerPeriod -= -StaticPrefs -: -: -timer_auto_increase_timer_resolution -( -) -; -UINT -lastTimePeriodSet -= -ComputeDesiredTimerPeriod -( -) -; -if -( -adjustTimerPeriod -) -{ -timeBeginPeriod -( -lastTimePeriodSet -) -; -} -# -endif uint64_t timersFiredThisWakeup = @@ -3767,63 +3501,6 @@ Now ) ; # -ifdef -XP_WIN -if -( -now -> -= -nextTimerPeriodEval -) -{ -const -UINT -newTimePeriod -= -ComputeDesiredTimerPeriod -( -) -; -if -( -newTimePeriod -! -= -lastTimePeriodSet -) -{ -if -( -adjustTimerPeriod -) -{ -timeEndPeriod -( -lastTimePeriodSet -) -; -timeBeginPeriod -( -newTimePeriod -) -; -} -lastTimePeriodSet -= -newTimePeriod -; -} -nextTimerPeriodEval -= -now -+ -timerPeriodEvalInterval -; -} -# -endif -# if TIMER_THREAD_STATISTICS if @@ -4510,22 +4187,6 @@ queuedTimersFiredPerWakeup ) ; } -# -ifdef -XP_WIN -if -( -adjustTimerPeriod -) -{ -timeEndPeriod -( -lastTimePeriodSet -) -; -} -# -endif return NS_OK ; @@ -6111,7 +5772,6 @@ Observe ( nsISupports * -aSubject const char * @@ -6119,99 +5779,10 @@ aTopic const char16_t * -aData ) { if ( -strcmp -( -aTopic -" -ipc -: -process -- -priority -- -changed -" -) -= -= -0 -) -{ -nsCOMPtr -< -nsIPropertyBag2 -> -props -= -do_QueryInterface -( -aSubject -) -; -MOZ_ASSERT -( -props -! -= -nullptr -) -; -int32_t -priority -= -static_cast -< -int32_t -> -( -hal -: -: -PROCESS_PRIORITY_UNKNOWN -) -; -props -- -> -GetPropertyAsInt32 -( -u -" -priority -" -_ns -& -priority -) -; -mCachedPriority -. -store -( -static_cast -< -hal -: -: -ProcessPriority -> -( -priority -) -std -: -: -memory_order_relaxed -) -; -} -if -( StaticPrefs : : diff --git a/xpcom/threads/TimerThread.h b/xpcom/threads/TimerThread.h index 0f171ab0d7e6e..59f412d23756e 100644 --- a/xpcom/threads/TimerThread.h +++ b/xpcom/threads/TimerThread.h @@ -60,15 +60,6 @@ include " mozilla / -HalTypes -. -h -" -# -include -" -mozilla -/ Monitor . h @@ -309,29 +300,6 @@ MOZ_REQUIRES mMonitor ) ; -std -: -: -atomic -< -mozilla -: -: -hal -: -: -ProcessPriority -> -mCachedPriority -= -mozilla -: -: -hal -: -: -PROCESS_PRIORITY_UNKNOWN -; nsCOMPtr < nsIThread @@ -674,17 +642,6 @@ const ; # ifdef -XP_WIN -UINT -ComputeDesiredTimerPeriod -( -) -const -; -# -endif -# -ifdef DEBUG void VerifyTimerListConsistency