gecko-dev/xpcom/threads
Henry Chang 55356f4f83 Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug
This patch is mainly to make IdleTaskRunner reusable by nsHtml5TreeOpExecutor.
The only necessary work to that purpose is to remove the dependency of
sShuttingDown, which was a static variable in nsJSEnvironment.cpp.
The idea is to have a "MayStopProcessing" as a callback for the consumer to
return sShuttingDown.

In addition to sShuttingDown, we use std::function<bool()> as the runner
main callback type.

MozReview-Commit-ID: FT2X1unSvPS

--HG--
extra : rebase_source : 3fe2d4f597f53e9a90f3dc8d5009df04240534ba
extra : intermediate-source : 41f6715c344ce26f7820cecb2544db8c50dca796
extra : source : 042f10937305e34245bdaf75dcb816db7738254e
2017-07-12 09:23:15 +08:00
..
AbstractThread.cpp Bug 1386893 - Update AbstractThread thread safety assertions to work with cooperative threading (r=jwwang) 2017-08-03 14:19:04 -07:00
AbstractThread.h Bug 1364821 - Fix bustage 2017-08-03 15:17:11 -07:00
BackgroundHangMonitor.cpp Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj. 2017-07-31 14:28:48 +10:00
BackgroundHangMonitor.h
BlockingResourceBase.cpp Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium. 2017-07-27 12:46:47 +10:00
BlockingResourceBase.h
CondVar.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
DeadlockDetector.h
HangAnnotations.cpp
HangAnnotations.h
HangMonitor.cpp Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium. 2017-07-27 12:46:47 +10:00
HangMonitor.h
IdleTaskRunner.cpp Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug 2017-07-12 09:23:15 +08:00
IdleTaskRunner.h Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug 2017-07-12 09:23:15 +08:00
LazyIdleThread.cpp Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm) 2017-07-28 13:09:06 -07:00
LazyIdleThread.h Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm 2017-07-27 02:18:20 +08:00
LeakRefPtr.h
MainThreadIdlePeriod.cpp
MainThreadIdlePeriod.h
MainThreadUtils.h Bug 1372670 - part 1 - remove non-MOZILLA_INTERNAL_API NS_IsMainThread(); r=erahm 2017-06-21 12:59:28 -04:00
Monitor.h Bug 1374594 - Allow mutex/monitor scoped unlockers to be constructed from their locking counterparts - r=froydnj 2017-06-20 22:20:49 +12:00
moz.build Bug 1355746 - Part 1. Rename CollectRunner to IdleTaskRunner and move to xpcom/threads/IdleTaskRunner.h/cpp r=smaug 2017-08-07 13:50:47 +08:00
MozPromise.h Bug 1371982 - Use a RefPtr<> to hold the MozPromise. r=gerald 2017-06-26 20:13:27 -04:00
Mutex.h Bug 1374594 - Allow mutex/monitor scoped unlockers to be constructed from their locking counterparts - r=froydnj 2017-06-20 22:20:49 +12:00
nsEnvironment.cpp Bug 1381727 (part 2) - Remove SmprintfFree(). r=glandium. 2017-07-25 09:09:25 +10:00
nsEnvironment.h
nsEventQueue.cpp
nsEventQueue.h
nsICancelableRunnable.h
nsIEnvironment.idl
nsIEventTarget.idl Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
nsIHangDetails.idl Bug 1379763 - Part 1: Add a bhr-thread-hang observer, r=mconley 2017-07-12 17:13:46 -04:00
nsIIdlePeriod.idl
nsIIdleRunnable.h
nsINamed.idl Bug 1378930 - Part 1: Remove nsINamed::SetName(). r=billm 2017-07-21 11:50:43 +08:00
nsIProcess.idl
nsIRunnable.idl Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
nsISerialEventTarget.idl Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly) 2017-06-15 20:16:25 -07:00
nsISupportsPriority.idl
nsIThread.idl Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
nsIThreadInternal.idl Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm) 2017-07-28 13:09:06 -07:00
nsIThreadManager.idl Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug) 2017-07-28 13:11:59 -07:00
nsIThreadPool.idl Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
nsITimer.idl Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj) 2017-07-03 16:19:56 -07:00
nsMemoryPressure.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
nsMemoryPressure.h
nsProcess.h
nsProcessCommon.cpp Bug 1376638 - Minimize uses of prmem.h. r=glandium. 2017-06-30 19:05:41 -07:00
nsProxyRelease.cpp Bug 1372453 - Part 1: Support to name the callers of ProxyReleaseEvent. r=froydnj 2017-06-13 18:10:13 +08:00
nsProxyRelease.h Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
nsThread.cpp Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm) 2017-07-28 13:09:06 -07:00
nsThread.h Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
nsThreadManager.cpp Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug) 2017-07-28 13:11:59 -07:00
nsThreadManager.h Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
nsThreadPool.cpp Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
nsThreadPool.h
nsThreadSyncDispatch.h
nsThreadUtils.cpp Backed out changeset 1662b38e3107 (bug 1351148) 2017-07-28 09:20:23 +02:00
nsThreadUtils.h Backed out changeset 1662b38e3107 (bug 1351148) 2017-07-28 09:20:23 +02:00
nsTimerImpl.cpp Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj) 2017-07-03 16:19:56 -07:00
nsTimerImpl.h Backed out changeset 420d9e53c959 (bug 1351148) for causing regressions / on request from stone 2017-07-28 09:20:54 +02:00
RecursiveMutex.cpp
RecursiveMutex.h
ReentrantMonitor.h Bug 1374594 - Allow mutex/monitor scoped unlockers to be constructed from their locking counterparts - r=froydnj 2017-06-20 22:20:49 +12:00
RWLock.cpp
RWLock.h
SchedulerGroup.cpp Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
SchedulerGroup.h Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
SharedThreadPool.cpp Bug 1376487 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj 2017-06-28 01:03:17 +02:00
SharedThreadPool.h Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj) 2017-06-12 20:20:08 -07:00
StateMirroring.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
StateWatching.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
SyncRunnable.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
SystemGroup.cpp Bug 1384631 - Make SystemGroup::Dispatch work early during startup, when it hasn't been initialized yet. r=billm 2017-07-27 14:18:54 -04:00
SystemGroup.h Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08:00
TaskCategory.h
TaskDispatcher.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
TaskQueue.cpp Bug 1366072 - Make AbstractThread inherit from nsISerialEventTarget (r=jwwang) 2017-06-13 14:50:58 -07:00
TaskQueue.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
ThreadStackHelper.cpp Bug 1382099 - Remove MOZ_WIDGET_GONK from xpcom/. r=erahm. 2017-07-21 10:45:39 +10:00
ThreadStackHelper.h Backed out 4 changesets (bug 1365309) for frequent xpcshell timeouts after 5400 seconds a=backout CLOSED TREE 2017-07-12 16:35:14 -07:00
ThrottledEventQueue.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
ThrottledEventQueue.h Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly) 2017-06-15 20:16:25 -07:00
TimerThread.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
TimerThread.h Backed out changeset 420d9e53c959 (bug 1351148) for causing regressions / on request from stone 2017-07-28 09:20:54 +02:00