Bug 1332631 part B - file moves from xpcom/glue to xpcom/base, r=froydnj
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 23 Jan 2017 09:24:01 -0500
changeset 330775 19391089d475f8862bb9cdc06029d5861f92a1d5
parent 330774 affff812d187fd1e517fcf0e17bbe0bc9467abe4
child 330776 a3af628d69b3f4d4f029d5f9118dd44bf1fadbd3
push id86076
push userbsmedberg@mozilla.com
push dateTue, 24 Jan 2017 13:36:48 +0000
treeherdermozilla-inbound@2fb1e56b6804 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1332631
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1332631 part B - file moves from xpcom/glue to xpcom/base, r=froydnj MozReview-Commit-ID: ARS1aTugYjl
toolkit/mozapps/update/updater/updater-common.build
widget/windows/WinUtils.h
xpcom/base/AutoRestore.h
xpcom/base/EnumeratedArrayCycleCollection.h
xpcom/base/IntentionalCrash.h
xpcom/base/moz.build
xpcom/base/nsCOMPtr.cpp
xpcom/base/nsCOMPtr.h
xpcom/base/nsCRTGlue.cpp
xpcom/base/nsCRTGlue.h
xpcom/base/nsClassInfoImpl.cpp
xpcom/base/nsConsoleService.cpp
xpcom/base/nsConsoleService.h
xpcom/base/nsCycleCollectionNoteChild.h
xpcom/base/nsCycleCollectionNoteRootCallback.h
xpcom/base/nsCycleCollectionParticipant.cpp
xpcom/base/nsCycleCollectionParticipant.h
xpcom/base/nsCycleCollectionTraversalCallback.h
xpcom/base/nsDebug.h
xpcom/base/nsIClassInfoImpl.h
xpcom/base/nsID.cpp
xpcom/base/nsID.h
xpcom/base/nsIInterfaceRequestorUtils.cpp
xpcom/base/nsIInterfaceRequestorUtils.h
xpcom/base/nsINIParser.cpp
xpcom/base/nsINIParser.h
xpcom/base/nsISupportsImpl.cpp
xpcom/base/nsISupportsImpl.h
xpcom/base/nsISupportsUtils.h
xpcom/base/nsIWeakReferenceUtils.h
xpcom/base/nsMemory.cpp
xpcom/base/nsMemory.h
xpcom/base/nsSystemInfo.cpp
xpcom/base/nsTWeakRef.h
xpcom/base/nsVersionComparator.cpp
xpcom/base/nsVersionComparator.h
xpcom/base/nsWeakReference.cpp
xpcom/base/nsWeakReference.h
xpcom/glue/AutoRestore.h
xpcom/glue/EnumeratedArrayCycleCollection.h
xpcom/glue/IntentionalCrash.h
xpcom/glue/moz.build
xpcom/glue/nsCOMPtr.cpp
xpcom/glue/nsCOMPtr.h
xpcom/glue/nsCRTGlue.cpp
xpcom/glue/nsCRTGlue.h
xpcom/glue/nsClassInfoImpl.cpp
xpcom/glue/nsCycleCollectionNoteChild.h
xpcom/glue/nsCycleCollectionNoteRootCallback.h
xpcom/glue/nsCycleCollectionParticipant.cpp
xpcom/glue/nsCycleCollectionParticipant.h
xpcom/glue/nsCycleCollectionTraversalCallback.h
xpcom/glue/nsDebug.h
xpcom/glue/nsIClassInfoImpl.h
xpcom/glue/nsID.cpp
xpcom/glue/nsID.h
xpcom/glue/nsIInterfaceRequestorUtils.cpp
xpcom/glue/nsIInterfaceRequestorUtils.h
xpcom/glue/nsINIParser.cpp
xpcom/glue/nsINIParser.h
xpcom/glue/nsISupportsImpl.cpp
xpcom/glue/nsISupportsImpl.h
xpcom/glue/nsISupportsUtils.h
xpcom/glue/nsIWeakReferenceUtils.h
xpcom/glue/nsMemory.cpp
xpcom/glue/nsMemory.h
xpcom/glue/nsTWeakRef.h
xpcom/glue/nsVersionComparator.cpp
xpcom/glue/nsVersionComparator.h
xpcom/glue/nsWeakReference.cpp
xpcom/glue/nsWeakReference.h
xpcom/glue/objs.mozbuild
--- a/toolkit/mozapps/update/updater/updater-common.build
+++ b/toolkit/mozapps/update/updater/updater-common.build
@@ -111,17 +111,17 @@ SOURCES += sorted(srcs)
 
 DEFINES['NS_NO_XPCOM'] = True
 DISABLE_STL_WRAPPING = True
 for var in ('MAR_CHANNEL_ID', 'MOZ_APP_VERSION'):
     DEFINES[var] = '"%s"' % CONFIG[var]
 
 LOCAL_INCLUDES += [
     '/toolkit/mozapps/update/common',
-    '/xpcom/glue',
+    '/xpcom/base', # for nsVersionComparator.cpp
 ]
 
 DELAYLOAD_DLLS += [
     'crypt32.dll',
     'comctl32.dll',
     'userenv.dll',
     'wsock32.dll',
 ]
--- a/widget/windows/WinUtils.h
+++ b/widget/windows/WinUtils.h
@@ -35,17 +35,17 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/EventForwards.h"
 #include "mozilla/UniquePtr.h"
 
 /**
  * NS_INLINE_DECL_IUNKNOWN_REFCOUNTING should be used for defining and
  * implementing AddRef() and Release() of IUnknown interface.
- * This depends on xpcom/glue/nsISupportsImpl.h.
+ * This depends on xpcom/base/nsISupportsImpl.h.
  */
 
 #define NS_INLINE_DECL_IUNKNOWN_REFCOUNTING(_class)                           \
 public:                                                                       \
   STDMETHODIMP_(ULONG) AddRef()                                               \
   {                                                                           \
     MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(_class)                                \
     MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");                      \
rename from xpcom/glue/AutoRestore.h
rename to xpcom/base/AutoRestore.h
rename from xpcom/glue/EnumeratedArrayCycleCollection.h
rename to xpcom/base/EnumeratedArrayCycleCollection.h
rename from xpcom/glue/IntentionalCrash.h
rename to xpcom/base/IntentionalCrash.h
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -45,47 +45,68 @@ XPIDL_MODULE = 'xpcom_base'
 EXPORTS += [
     'CodeAddressService.h',
     'ErrorList.h',
     'nsAgg.h',
     'nsAlgorithm.h',
     'nsAutoPtr.h',
     'nsAutoRef.h',
     'nsCom.h',
+    'nsCOMPtr.h',
     'nscore.h',
+    'nsCRTGlue.h',
+    'nsCycleCollectionNoteChild.h',
+    'nsCycleCollectionNoteRootCallback.h',
+    'nsCycleCollectionParticipant.h',
+    'nsCycleCollectionTraversalCallback.h',
     'nsCycleCollector.h',
+    'nsDebug.h',
     'nsDebugImpl.h',
     'nsDumpUtils.h',
     'nsError.h',
     'nsGZFileWriter.h',
+    'nsIClassInfoImpl.h',
+    'nsID.h',
     'nsIID.h',
+    'nsIInterfaceRequestorUtils.h',
+    'nsINIParser.h',
     'nsInterfaceRequestorAgg.h',
     'nsISizeOf.h',
     'nsISupportsBase.h',
+    'nsISupportsImpl.h',
+    'nsISupportsUtils.h',
+    'nsIWeakReferenceUtils.h',
+    'nsMemory.h',
     'nsObjCExceptions.h',
     'nsQueryObject.h',
     'nsTraceRefcnt.h',
+    'nsTWeakRef.h',
+    'nsVersionComparator.h',
     'nsWeakPtr.h',
+    'nsWeakReference.h',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     EXPORTS += [
         'nsWindowsHelpers.h',
     ]
 
 EXPORTS.mozilla += [
+    'AutoRestore.h',
     'AvailableMemoryTracker.h',
     'ClearOnShutdown.h',
     'CountingAllocatorBase.h',
     'CycleCollectedJSContext.h',
     'Debug.h',
     'DebuggerOnGCRunnable.h',
     'DeferredFinalize.h',
+    'EnumeratedArrayCycleCollection.h',
     'ErrorNames.h',
     'HoldDropJSObjects.h',
+    'IntentionalCrash.h',
     'JSObjectHolder.h',
     'LinuxUtils.h',
     'Logging.h',
     'nsMemoryInfoDumper.h',
     'OwningNonNull.h',
     'StaticMutex.h',
     'StaticPtr.h',
     'SystemMemoryReporter.h',
@@ -105,35 +126,46 @@ UNIFIED_SOURCES += [
     'Debug.cpp',
     'DebuggerOnGCRunnable.cpp',
     'DeferredFinalize.cpp',
     'ErrorNames.cpp',
     'HoldDropJSObjects.cpp',
     'JSObjectHolder.cpp',
     'Logging.cpp',
     'LogModulePrefWatcher.cpp',
+    'nsClassInfoImpl.cpp',
+    'nsCOMPtr.cpp',
     'nsConsoleMessage.cpp',
     'nsConsoleService.cpp',
+    'nsCRTGlue.cpp',
+    'nsCycleCollectionParticipant.cpp',
     'nsCycleCollector.cpp',
     'nsCycleCollectorTraceJSHelpers.cpp',
     'nsDumpUtils.cpp',
     'nsErrorService.cpp',
     'nsGZFileWriter.cpp',
+    'nsID.cpp',
+    'nsIInterfaceRequestorUtils.cpp',
+    'nsINIParser.cpp',
     'nsInterfaceRequestorAgg.cpp',
+    'nsISupportsImpl.cpp',
+    'nsMemory.cpp',
     'nsMemoryImpl.cpp',
     'nsMemoryInfoDumper.cpp',
     'nsMemoryReporterManager.cpp',
     'nsMessageLoop.cpp',
     'NSPRLogModulesParser.cpp',
     'nsSecurityConsoleMessage.cpp',
     'nsStatusReporterManager.cpp',
     'nsSystemInfo.cpp',
     'nsTraceRefcnt.cpp',
     'nsUUIDGenerator.cpp',
+    'nsVersionComparator.cpp',
     'nsVersionComparatorImpl.cpp',
+    'nsWeakReference.cpp',
 ]
 
 if CONFIG['OS_ARCH'] == 'Linux':
     SOURCES += [
         'LinuxUtils.cpp',
         'SystemMemoryReporter.cpp',
     ]
 
rename from xpcom/glue/nsCOMPtr.cpp
rename to xpcom/base/nsCOMPtr.cpp
rename from xpcom/glue/nsCOMPtr.h
rename to xpcom/base/nsCOMPtr.h
rename from xpcom/glue/nsCRTGlue.cpp
rename to xpcom/base/nsCRTGlue.cpp
rename from xpcom/glue/nsCRTGlue.h
rename to xpcom/base/nsCRTGlue.h
rename from xpcom/glue/nsClassInfoImpl.cpp
rename to xpcom/base/nsClassInfoImpl.cpp
--- a/xpcom/base/nsConsoleService.cpp
+++ b/xpcom/base/nsConsoleService.cpp
@@ -14,22 +14,24 @@
 #include "nsMemory.h"
 #include "nsCOMArray.h"
 #include "nsThreadUtils.h"
 
 #include "nsConsoleService.h"
 #include "nsConsoleMessage.h"
 #include "nsIClassInfoImpl.h"
 #include "nsIConsoleListener.h"
+#include "nsIObserverService.h"
 #include "nsPrintfCString.h"
 #include "nsProxyRelease.h"
 #include "nsIScriptError.h"
 #include "nsISupportsPrimitives.h"
 
 #include "mozilla/Preferences.h"
+#include "mozilla/Services.h"
 
 #if defined(ANDROID)
 #include <android/log.h>
 #include "mozilla/dom/ContentChild.h"
 #endif
 #ifdef XP_WIN
 #include <windows.h>
 #endif
--- a/xpcom/base/nsConsoleService.h
+++ b/xpcom/base/nsConsoleService.h
@@ -13,16 +13,17 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Mutex.h"
 
 #include "nsInterfaceHashtable.h"
 #include "nsHashKeys.h"
 
 #include "nsIConsoleService.h"
+#include "nsIObserver.h"
 
 class nsConsoleService final : public nsIConsoleService,
                                public nsIObserver
 {
 public:
   nsConsoleService();
   nsresult Init();
 
rename from xpcom/glue/nsCycleCollectionNoteChild.h
rename to xpcom/base/nsCycleCollectionNoteChild.h
rename from xpcom/glue/nsCycleCollectionNoteRootCallback.h
rename to xpcom/base/nsCycleCollectionNoteRootCallback.h
rename from xpcom/glue/nsCycleCollectionParticipant.cpp
rename to xpcom/base/nsCycleCollectionParticipant.cpp
rename from xpcom/glue/nsCycleCollectionParticipant.h
rename to xpcom/base/nsCycleCollectionParticipant.h
rename from xpcom/glue/nsCycleCollectionTraversalCallback.h
rename to xpcom/base/nsCycleCollectionTraversalCallback.h
rename from xpcom/glue/nsDebug.h
rename to xpcom/base/nsDebug.h
rename from xpcom/glue/nsIClassInfoImpl.h
rename to xpcom/base/nsIClassInfoImpl.h
rename from xpcom/glue/nsID.cpp
rename to xpcom/base/nsID.cpp
rename from xpcom/glue/nsID.h
rename to xpcom/base/nsID.h
rename from xpcom/glue/nsIInterfaceRequestorUtils.cpp
rename to xpcom/base/nsIInterfaceRequestorUtils.cpp
rename from xpcom/glue/nsIInterfaceRequestorUtils.h
rename to xpcom/base/nsIInterfaceRequestorUtils.h
rename from xpcom/glue/nsINIParser.cpp
rename to xpcom/base/nsINIParser.cpp
rename from xpcom/glue/nsINIParser.h
rename to xpcom/base/nsINIParser.h
rename from xpcom/glue/nsISupportsImpl.cpp
rename to xpcom/base/nsISupportsImpl.cpp
rename from xpcom/glue/nsISupportsImpl.h
rename to xpcom/base/nsISupportsImpl.h
rename from xpcom/glue/nsISupportsUtils.h
rename to xpcom/base/nsISupportsUtils.h
rename from xpcom/glue/nsIWeakReferenceUtils.h
rename to xpcom/base/nsIWeakReferenceUtils.h
rename from xpcom/glue/nsMemory.cpp
rename to xpcom/base/nsMemory.cpp
rename from xpcom/glue/nsMemory.h
rename to xpcom/base/nsMemory.h
--- a/xpcom/base/nsSystemInfo.cpp
+++ b/xpcom/base/nsSystemInfo.cpp
@@ -72,16 +72,18 @@ NS_EXPORT int android_sdk_version;
 
 // Slot for NS_InitXPCOM2 to pass information to nsSystemInfo::Init.
 // Only set to nonzero (potentially) if XP_UNIX.  On such systems, the
 // system call to discover the appropriate value is not thread-safe,
 // so we must call it before going multithreaded, but nsSystemInfo::Init
 // only happens well after that point.
 uint32_t nsSystemInfo::gUserUmask = 0;
 
+using namespace mozilla::dom;
+
 #if defined (XP_LINUX) && !defined (ANDROID)
 static void
 SimpleParseKeyValuePairs(const std::string& aFilename,
                          std::map<nsCString, nsCString>& aKeyValuePairs)
 {
   std::ifstream input(aFilename.c_str());
   for (std::string line; std::getline(input, line); ) {
     nsAutoCString key, value;
rename from xpcom/glue/nsTWeakRef.h
rename to xpcom/base/nsTWeakRef.h
rename from xpcom/glue/nsVersionComparator.cpp
rename to xpcom/base/nsVersionComparator.cpp
rename from xpcom/glue/nsVersionComparator.h
rename to xpcom/base/nsVersionComparator.h
rename from xpcom/glue/nsWeakReference.cpp
rename to xpcom/base/nsWeakReference.cpp
rename from xpcom/glue/nsWeakReference.h
rename to xpcom/base/nsWeakReference.h
--- a/xpcom/glue/moz.build
+++ b/xpcom/glue/moz.build
@@ -13,68 +13,47 @@ EXPORTS += [
     'MainThreadUtils.h',
     'nsArrayEnumerator.h',
     'nsArrayUtils.h',
     'nsBaseHashtable.h',
     'nsCategoryCache.h',
     'nsClassHashtable.h',
     'nsCOMArray.h',
     'nsComponentManagerUtils.h',
-    'nsCOMPtr.h',
-    'nsCRTGlue.h',
-    'nsCycleCollectionNoteChild.h',
-    'nsCycleCollectionNoteRootCallback.h',
-    'nsCycleCollectionParticipant.h',
-    'nsCycleCollectionTraversalCallback.h',
     'nsDataHashtable.h',
-    'nsDebug.h',
     'nsDeque.h',
     'nsEnumeratorUtils.h',
     'nsHashKeys.h',
-    'nsIClassInfoImpl.h',
-    'nsID.h',
-    'nsIInterfaceRequestorUtils.h',
-    'nsINIParser.h',
     'nsInterfaceHashtable.h',
-    'nsISupportsImpl.h',
-    'nsISupportsUtils.h',
-    'nsIWeakReferenceUtils.h',
     'nsJSThingHashtable.h',
-    'nsMemory.h',
     'nsPointerHashKeys.h',
     'nsProxyRelease.h',
     'nsQuickSort.h',
     'nsRefPtrHashtable.h',
     'nsServiceManagerUtils.h',
     'nsStringAPI.h',
     'nsStringGlue.h',
     'nsTArray-inl.h',
     'nsTArray.h',
     'nsTArrayForwardDeclare.h',
     'nsTextFormatter.h',
     'nsTHashtable.h',
     'nsThreadUtils.h',
     'nsTObserverArray.h',
     'nsTPriorityQueue.h',
-    'nsTWeakRef.h',
-    'nsVersionComparator.h',
-    'nsWeakReference.h',
     'nsXPTCUtils.h',
     'PLDHashTable.h',
 ]
 
 EXPORTS.mozilla += [
-    'AutoRestore.h',
     'BlockingResourceBase.h',
     'CondVar.h',
     'DeadlockDetector.h',
-    'EnumeratedArrayCycleCollection.h',
     'FileUtils.h',
     'GenericFactory.h',
-    'IntentionalCrash.h',
     'Monitor.h',
     'Mutex.h',
     'Observer.h',
     'ReentrantMonitor.h',
 ]
 
 if CONFIG['ENABLE_TESTS']:
     DIRS += ['tests/gtest']
--- a/xpcom/glue/objs.mozbuild
+++ b/xpcom/glue/objs.mozbuild
@@ -4,35 +4,24 @@
 # 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',
     'nsArrayEnumerator.cpp',
     'nsArrayUtils.cpp',
     'nsCategoryCache.cpp',
-    'nsClassInfoImpl.cpp',
     'nsCOMArray.cpp',
     'nsComponentManagerUtils.cpp',
-    'nsCOMPtr.cpp',
-    'nsCRTGlue.cpp',
-    'nsCycleCollectionParticipant.cpp',
     'nsDeque.cpp',
     'nsEnumeratorUtils.cpp',
-    'nsID.cpp',
-    'nsIInterfaceRequestorUtils.cpp',
-    'nsINIParser.cpp',
-    'nsISupportsImpl.cpp',
-    'nsMemory.cpp',
     'nsQuickSort.cpp',
     'nsTArray.cpp',
     'nsThreadUtils.cpp',
     'nsTObserverArray.cpp',
-    'nsVersionComparator.cpp',
-    'nsWeakReference.cpp',
     'PLDHashTable.cpp',
     'XREAppData.cpp',
 ]
 
 xpcom_glue_src_cppsrcs = [
     '/xpcom/glue/%s' % s for s in xpcom_glue_src_lcppsrcs
 ]