Commit Graph
9 Commits
Author SHA1 Message Date
Nicholas Nethercote 741ffaa7fe Bug 1414150 - Remove the "idle_queue.*" prefs. r=farre.
There's no good reason why these can't be code constants.

Especially given that, due to a bug, changes to the
"idle_queue.{min,long}_period" constants were not being passed onto the C++
code!

Here's why: those two prefs were specified as integers in all.js. But we used
AddFloatVarCache() to set up the reading of those prefs. libpref fakes floats
by storing them as strings and then converting them to floats when they are
read.

Which means that AddFloatVarCache() used to fail to get the value from all.js
-- because there's a type mismatch, int vs. string -- and instead use the
fallback default. That value is the same as the one in all.js, which is lucky.
But if someone changed the value in about:config to 100 (an integer), a similar
failure would have occured and the value used by the C++ code wouldn't be
updated!

Also note that idle_queue.max_timer_thread_bound did not have a value in
all.js.

What a mess!
2017-11-08 07:54:16 +11:00
Andreas Farre 4b87c2026c Bug 1311425 - Add pref for how far into the timer queue, r=smaug,f=froydnj 2017-05-24 21:14:29 -04:00
Andreas Farre 4cb28e7f9e Bug 1311425 - Make idle callbacks aware of nsITimers, r=froydnj 2017-05-24 21:12:55 -04:00
Andreas Farre 133e7398de Bug 1311425 - Prepare for handling several sources of idleness, r=smaug 2017-05-24 21:11:12 -04:00
Andreas Farre efe0ce3192 Bug 1314314 - Restrict when idle callbacks are fired. r=bkelly
MozReview-Commit-ID: L9ZTVFeHGTw
2016-11-03 18:47:23 +01:00
Ryan Hunt a4d3530cef Bug 1313978 - Don't use Preferences in MainThreadIdlePeriod until they are available r=smaug 2016-10-31 17:30:38 -05:00
Andreas Farre 1546ce5e78 Bug 1198381 - Extend nsIThread with idleDispatch, r=froydnj,smaug
The intent of idleDispatch is the possibility to have a runnable
executed when the thread is idle. This is accomplished by adding an
event queue for idle tasks that will only be considered when the main
event queue is empty and the caller of ProcessNextEvent doesn't
require that we wait until there is an event on the main event queue.

MozReview-Commit-ID: IDWQfzZqWpZ
2016-08-24 16:18:06 +02:00
Carsten "Tomcat" Book 4ba5ac3176 Backed out changeset 333a899fb5e6 (bug 1198381) 2016-10-25 12:32:56 +02:00
Andreas Farre 30006face7 Bug 1198381 - Extend nsIThread with idleDispatch, r=froydnj,smaug
The intent of idleDispatch is the possibility to have a runnable
executed when the thread is idle. This is accomplished by adding an
event queue for idle tasks that will only be considered when the main
event queue is empty and the caller of ProcessNextEvent doesn't
require that we wait until there is an event on the main event queue.

MozReview-Commit-ID: IDWQfzZqWpZ
2016-08-24 16:18:06 +02:00