gecko-dev/xpcom/threads
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
..
AbstractEventQueue.h Bug 1572337: Monitor running event delays and start times r=froydnj 2019-11-08 21:07:36 +00:00
AbstractThread.cpp
AbstractThread.h
BlockingResourceBase.cpp Bug 1241518 - Part 3: Switch various nsAutoPtr uses to UniquePtr in xpcom/ r=kmag 2020-01-07 00:06:05 +00:00
BlockingResourceBase.h
components.conf
CondVar.h Bug 1599614 - Condvar::Notify/NotifyAll are not fallible. r=bzbarsky 2019-11-27 13:46:55 +00:00
CPUUsageWatcher.cpp
CPUUsageWatcher.h
DataMutex.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
DeadlockDetector.h
EventQueue.cpp Bug 1597728: Make EventQueue support templatization for queue page size r=froydnj 2019-11-21 03:47:19 +00:00
EventQueue.h Bug 1597158 part 3. Expose whether there are any idle runnables on PrioritizedEventQueue. r=smaug 2019-11-22 14:06:29 +00:00
IdlePeriodState.cpp Bug 1597158 part 4. Stop unlocking the provided mutex in IdlePeriodState methods. r=smaug 2019-11-22 14:06:17 +00:00
IdlePeriodState.h Bug 1606410. Make idle state peeking look more like idle state getting, so consumers can be more similar. r=smaug 2019-12-31 15:15:17 +00:00
IdleTaskRunner.cpp
IdleTaskRunner.h
InputEventStatistics.cpp
InputEventStatistics.h
LazyIdleThread.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan 2019-12-06 09:17:57 +00:00
LazyIdleThread.h
LeakRefPtr.h
MainThreadIdlePeriod.cpp
MainThreadIdlePeriod.h
MainThreadQueue.h Bug 1597157. Remove unused mNextIdleDeadline bits. r=smaug 2019-11-18 17:05:30 +00:00
MainThreadUtils.h
Monitor.h Bug 1599614 - Condvar::Notify/NotifyAll are not fallible. r=bzbarsky 2019-11-27 13:46:55 +00:00
moz.build Bug 1589561. Factor out idle handling from PrioritizedEventQueue. r=smaug 2019-10-20 15:08:44 +00:00
MozPromise.h Bug 1608064 - Replace Is{Rvalue,Lvalue,}Reference with <type_traits> equivalents. r=froydnj 2020-01-10 10:40:34 +00:00
MozPromiseInlines.h
Mutex.h
nsEnvironment.cpp
nsEnvironment.h
nsICancelableRunnable.h
nsIEnvironment.idl
nsIEventTarget.idl Bug 1602646 - Remove vestigial references to cooperative scheduling r=froydnj 2019-12-12 00:56:53 +00:00
nsIIdlePeriod.idl
nsIIdleRunnable.h
nsINamed.idl
nsIProcess.idl
nsIRunnable.idl Bug 1606672. Change nsIRunnablePriority values so increasing value indicates increased priority. r=smaug 2020-01-02 20:07:40 +00:00
nsISerialEventTarget.idl
nsISupportsPriority.idl
nsIThread.idl Bug 1572337: Make GetRunningEventDelay handle threadpools r=froydnj 2019-11-08 21:07:45 +00:00
nsIThreadInternal.idl
nsIThreadManager.idl Bug 1606657. nsIThreadManager.dispatchToMainThread should not assume that nsIRunnablePriority::PRIORITY_NORMAL is 0. r=smaug 2020-01-02 17:10:02 +00:00
nsIThreadPool.idl Bug 1604549 - remove scriptability and classinfo from nsThreadPool; r=bzbarsky 2019-12-17 17:12:14 +00:00
nsITimer.idl
nsMemoryPressure.cpp
nsMemoryPressure.h
nsProcess.h Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan 2019-12-06 09:17:57 +00:00
nsProcessCommon.cpp Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag 2020-01-07 00:06:01 +00:00
nsProxyRelease.cpp
nsProxyRelease.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
nsThread.cpp Bug 1607953. Refactor our runnable metrics and long task code to make it more robust and correct. r=jesup,tarek,froydnj 2020-01-13 22:31:05 +00:00
nsThread.h Bug 1607953. Refactor our runnable metrics and long task code to make it more robust and correct. r=jesup,tarek,froydnj 2020-01-13 22:31:05 +00:00
nsThreadManager.cpp Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag 2020-01-07 00:06:01 +00:00
nsThreadManager.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2020-01-09 21:50:11 +00:00
nsThreadPool.cpp Bug 1241518 - Part 4: Switch nsThread to use UniquePtr r=KrisWright,kmag 2020-01-07 00:06:08 +00:00
nsThreadPool.h Bug 1572337: Make GetRunningEventDelay handle threadpools r=froydnj 2019-11-08 21:07:45 +00:00
nsThreadSyncDispatch.h
nsThreadUtils.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2020-01-09 21:50:11 +00:00
nsThreadUtils.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
nsTimerImpl.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
nsTimerImpl.h
PerformanceCounter.cpp
PerformanceCounter.h
PrioritizedEventQueue.cpp Bug 1606410. Make idle state peeking look more like idle state getting, so consumers can be more similar. r=smaug 2019-12-31 15:15:17 +00:00
PrioritizedEventQueue.h Bug 1597158 part 3. Expose whether there are any idle runnables on PrioritizedEventQueue. r=smaug 2019-11-22 14:06:29 +00:00
Queue.h Bug 1597728: Make EventQueue support templatization for queue page size r=froydnj 2019-11-21 03:47:19 +00:00
RecursiveMutex.cpp
RecursiveMutex.h
ReentrantMonitor.h
RWLock.cpp
RWLock.h
SchedulerGroup.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
SchedulerGroup.h Bug 1561715 - Part 3: Remove SchedulerGroup::IsBackground. r=smaug 2019-12-12 15:20:52 +00:00
SharedThreadPool.cpp
SharedThreadPool.h Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan 2019-12-06 09:17:57 +00:00
StateMirroring.h
StateWatching.h
SynchronizedEventQueue.cpp
SynchronizedEventQueue.h Bug 1572337: Monitor running event delays and start times r=froydnj 2019-11-08 21:07:36 +00:00
SyncRunnable.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
SystemGroup.cpp Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
SystemGroup.h
TaskCategory.h
TaskDispatcher.h
TaskQueue.cpp Bug 1602646 - Remove vestigial references to cooperative scheduling r=froydnj 2019-12-12 00:56:53 +00:00
TaskQueue.h Bug 1602646 - Remove vestigial references to cooperative scheduling r=froydnj 2019-12-12 00:56:53 +00:00
ThreadBound.h
ThreadDelay.cpp
ThreadDelay.h
ThreadEventQueue.cpp Bug 1607595 - Remove uses of mozilla::IsBaseOf. r=froydnj 2020-01-08 14:52:10 +00:00
ThreadEventQueue.h Bug 1572337: Monitor running event delays and start times r=froydnj 2019-11-08 21:07:36 +00:00
ThreadEventTarget.cpp Bug 1604005 implement ThreadEventTarget::IsOnCurrentThreadInfallible() to handle case of null mThread r=froydnj 2020-01-08 15:25:27 +00:00
ThreadEventTarget.h Bug 1599922 clear PRThread references before the PRThread is deleted r=froydnj 2019-12-09 14:47:47 +00:00
ThreadLocalVariables.cpp
ThrottledEventQueue.cpp Bug 1597728: Make EventQueue support templatization for queue page size r=froydnj 2019-11-21 03:47:19 +00:00
ThrottledEventQueue.h
TimerThread.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan 2019-12-06 09:17:57 +00:00
TimerThread.h