Bug 1332631 part D - file moves from xpcom/glue to xpcom/threads, r?froydnj draft
authorBenjamin Smedberg <benjamin@smedbergs.us>
Fri, 20 Jan 2017 14:13:57 -0500
changeset 464970 5f908c04835192c1949bed0828d7bd086e795f64
parent 464969 5f0638e3268acb932e1a8d3f499d283bc1922acd
child 464971 18e1bf4f93d9174ff6808ea08b22f3c308df7da1
push id42501
push userbsmedberg@mozilla.com
push dateMon, 23 Jan 2017 14:33:42 +0000
reviewersfroydnj
bugs1332631
milestone53.0a1
Bug 1332631 part D - file moves from xpcom/glue to xpcom/threads, r?froydnj MozReview-Commit-ID: kDBGvlYjyW
xpcom/glue/BlockingResourceBase.cpp
xpcom/glue/BlockingResourceBase.h
xpcom/glue/CondVar.h
xpcom/glue/DeadlockDetector.h
xpcom/glue/MainThreadUtils.h
xpcom/glue/Monitor.h
xpcom/glue/Mutex.h
xpcom/glue/ReentrantMonitor.h
xpcom/glue/moz.build
xpcom/glue/nsProxyRelease.cpp
xpcom/glue/nsProxyRelease.h
xpcom/glue/nsThreadUtils.cpp
xpcom/glue/nsThreadUtils.h
xpcom/glue/objs.mozbuild
xpcom/threads/BlockingResourceBase.cpp
xpcom/threads/BlockingResourceBase.h
xpcom/threads/CondVar.h
xpcom/threads/DeadlockDetector.h
xpcom/threads/MainThreadUtils.h
xpcom/threads/Monitor.h
xpcom/threads/Mutex.h
xpcom/threads/ReentrantMonitor.h
xpcom/threads/moz.build
xpcom/threads/nsProxyRelease.cpp
xpcom/threads/nsProxyRelease.h
xpcom/threads/nsThreadUtils.cpp
xpcom/threads/nsThreadUtils.h
--- a/xpcom/glue/moz.build
+++ b/xpcom/glue/moz.build
@@ -5,33 +5,24 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 with Files('nsString*'):
     BUG_COMPONENT = ('Core', 'String')
 
 DIRS += ['standalone']
 
 EXPORTS += [
-    'MainThreadUtils.h',
     'nsCategoryCache.h',
     'nsComponentManagerUtils.h',
-    'nsProxyRelease.h',
     'nsServiceManagerUtils.h',
     'nsStringAPI.h',
     'nsStringGlue.h',
     'nsTextFormatter.h',
-    'nsThreadUtils.h',
     'nsXPTCUtils.h',
 ]
 
 EXPORTS.mozilla += [
-    'BlockingResourceBase.h',
-    'CondVar.h',
-    'DeadlockDetector.h',
     'FileUtils.h',
     'GenericFactory.h',
-    'Monitor.h',
-    'Mutex.h',
-    'ReentrantMonitor.h',
 ]
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
--- a/xpcom/glue/objs.mozbuild
+++ b/xpcom/glue/objs.mozbuild
@@ -3,26 +3,23 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 xpcom_glue_src_lcppsrcs = [
     'FileUtils.cpp',
     'nsCategoryCache.cpp',
     'nsComponentManagerUtils.cpp',
-    'nsThreadUtils.cpp',
     'XREAppData.cpp',
 ]
 
 xpcom_glue_src_cppsrcs = [
     '/xpcom/glue/%s' % s for s in xpcom_glue_src_lcppsrcs
 ]
 
 xpcom_gluens_src_lcppsrcs = [
-    'BlockingResourceBase.cpp',
     'GenericFactory.cpp',
-    'nsProxyRelease.cpp',
     'nsTextFormatter.cpp',
 ]
 
 xpcom_gluens_src_cppsrcs = [
     '/xpcom/glue/%s' % s for s in xpcom_gluens_src_lcppsrcs
 ]
rename from xpcom/glue/BlockingResourceBase.cpp
rename to xpcom/threads/BlockingResourceBase.cpp
rename from xpcom/glue/BlockingResourceBase.h
rename to xpcom/threads/BlockingResourceBase.h
rename from xpcom/glue/CondVar.h
rename to xpcom/threads/CondVar.h
rename from xpcom/glue/DeadlockDetector.h
rename to xpcom/threads/DeadlockDetector.h
rename from xpcom/glue/MainThreadUtils.h
rename to xpcom/threads/MainThreadUtils.h
rename from xpcom/glue/Monitor.h
rename to xpcom/threads/Monitor.h
rename from xpcom/glue/Mutex.h
rename to xpcom/threads/Mutex.h
rename from xpcom/glue/ReentrantMonitor.h
rename to xpcom/threads/ReentrantMonitor.h
--- a/xpcom/threads/moz.build
+++ b/xpcom/threads/moz.build
@@ -17,55 +17,67 @@ XPIDL_SOURCES += [
     'nsIThreadManager.idl',
     'nsIThreadPool.idl',
     'nsITimer.idl',
 ]
 
 XPIDL_MODULE = 'xpcom_threads'
 
 EXPORTS += [
+    'MainThreadUtils.h',
     'nsEventQueue.h',
     'nsICancelableRunnable.h',
     'nsIIncrementalRunnable.h',
     'nsMemoryPressure.h',
     'nsProcess.h',
+    'nsProxyRelease.h',
     'nsThread.h',
+    'nsThreadUtils.h',
 ]
 
 EXPORTS.mozilla += [
     'AbstractThread.h',
     'BackgroundHangMonitor.h',
+    'BlockingResourceBase.h',
+    'CondVar.h',
+    'DeadlockDetector.h',
     'HangAnnotations.h',
     'HangMonitor.h',
     'LazyIdleThread.h',
     'MainThreadIdlePeriod.h',
+    'Monitor.h',
     'MozPromise.h',
+    'Mutex.h',
+    'ReentrantMonitor.h',
     'SharedThreadPool.h',
     'StateMirroring.h',
     'StateWatching.h',
     'SyncRunnable.h',
     'TaskDispatcher.h',
     'TaskQueue.h',
     'ThrottledEventQueue.h',
 ]
 
 UNIFIED_SOURCES += [
     'AbstractThread.cpp',
     'BackgroundHangMonitor.cpp',
+    'BlockingResourceBase.cpp',
     'HangAnnotations.cpp',
     'HangMonitor.cpp',
     'LazyIdleThread.cpp',
     'MainThreadIdlePeriod.cpp',
     'nsEnvironment.cpp',
     'nsEventQueue.cpp',
     'nsMemoryPressure.cpp',
     'nsProcessCommon.cpp',
+    'nsProxyRelease.cpp',
     'nsThread.cpp',
     'nsThreadManager.cpp',
     'nsThreadPool.cpp',
+    'nsThreadUtils.cpp',
     'nsTimerImpl.cpp',
     'SharedThreadPool.cpp',
     'TaskQueue.cpp',
     'ThreadStackHelper.cpp',
     'ThrottledEventQueue.cpp',
     'TimerThread.cpp',
 ]
 
rename from xpcom/glue/nsProxyRelease.cpp
rename to xpcom/threads/nsProxyRelease.cpp
rename from xpcom/glue/nsProxyRelease.h
rename to xpcom/threads/nsProxyRelease.h
rename from xpcom/glue/nsThreadUtils.cpp
rename to xpcom/threads/nsThreadUtils.cpp
rename from xpcom/glue/nsThreadUtils.h
rename to xpcom/threads/nsThreadUtils.h