diff --git a/memory/replace/logalloc/LogAlloc.cpp b/memory/replace/logalloc/LogAlloc.cpp index 800aefad6a93..a599d6158fc2 100644 --- a/memory/replace/logalloc/LogAlloc.cpp +++ b/memory/replace/logalloc/LogAlloc.cpp @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include -#include #include #ifdef _WIN32 diff --git a/memory/replace/logalloc/replay/Replay.cpp b/memory/replace/logalloc/replay/Replay.cpp index a3fa58859060..b5ad0c540e78 100644 --- a/memory/replace/logalloc/replay/Replay.cpp +++ b/memory/replace/logalloc/replay/Replay.cpp @@ -16,11 +16,8 @@ typedef intptr_t ssize_t; # include #endif #ifdef XP_LINUX -# include -# include # include # include -# include #endif #include #include diff --git a/mozglue/misc/StackWalk.cpp b/mozglue/misc/StackWalk.cpp index 30eccd3935fc..0fc0da51bfc7 100644 --- a/mozglue/misc/StackWalk.cpp +++ b/mozglue/misc/StackWalk.cpp @@ -9,7 +9,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" -#include "mozilla/IntegerPrintfMacros.h" #include "mozilla/StackWalk.h" #ifdef XP_WIN # include "mozilla/StackWalkThread.h" @@ -639,7 +638,6 @@ MFBT_API bool MozDescribeCodeAddress(void* aPC, MOZ_STACKWALK_SUPPORTS_MACOSX) # include -# include # include // On glibc 2.1, the Dl_info api defined in is only exposed diff --git a/mozglue/tests/TestBaseProfiler.cpp b/mozglue/tests/TestBaseProfiler.cpp index 5454354f04f0..ecae6c8fa25f 100644 --- a/mozglue/tests/TestBaseProfiler.cpp +++ b/mozglue/tests/TestBaseProfiler.cpp @@ -35,9 +35,7 @@ # include #else # include -# include # include -# include #endif #include diff --git a/mozglue/tests/TestIntegerPrintfMacros.cpp b/mozglue/tests/TestIntegerPrintfMacros.cpp index 21221192ae6d..152802ae8cee 100644 --- a/mozglue/tests/TestIntegerPrintfMacros.cpp +++ b/mozglue/tests/TestIntegerPrintfMacros.cpp @@ -8,8 +8,6 @@ #include "mozilla/IntegerPrintfMacros.h" // this must pick up #include "mozilla/Sprintf.h" -#include -#include #include /* Output array and poisoning method shared by all tests. */ diff --git a/toolkit/components/cascade_bloom_filter/CascadeFilter.h b/toolkit/components/cascade_bloom_filter/CascadeFilter.h index 0255e578749e..bcfd2363026e 100644 --- a/toolkit/components/cascade_bloom_filter/CascadeFilter.h +++ b/toolkit/components/cascade_bloom_filter/CascadeFilter.h @@ -5,8 +5,8 @@ #ifndef CASCADE_BLOOM_FILTER_CASCADE_FILTER_H_ #define CASCADE_BLOOM_FILTER_CASCADE_FILTER_H_ +#include "mozilla/AlreadyAddRefed.h" #include "nsICascadeFilter.h" -#include "nsCOMPtr.h" namespace mozilla { diff --git a/toolkit/components/commandlines/nsCommandLine.cpp b/toolkit/components/commandlines/nsCommandLine.cpp index fc437f066339..68023089f44e 100644 --- a/toolkit/components/commandlines/nsCommandLine.cpp +++ b/toolkit/components/commandlines/nsCommandLine.cpp @@ -21,8 +21,6 @@ #include "nsUnicharUtils.h" #include "nsTextFormatter.h" #include "nsXPCOMCID.h" -#include "plstr.h" -#include "mozilla/Attributes.h" #ifdef MOZ_WIDGET_COCOA # include @@ -30,8 +28,6 @@ #elif defined(XP_WIN) # include # include -#elif defined(XP_UNIX) -# include #endif #ifdef DEBUG_bsmedberg diff --git a/toolkit/components/ctypes/ctypes.cpp b/toolkit/components/ctypes/ctypes.cpp index 5718641b9000..720b69f004f6 100644 --- a/toolkit/components/ctypes/ctypes.cpp +++ b/toolkit/components/ctypes/ctypes.cpp @@ -8,12 +8,9 @@ #include "js/experimental/CTypes.h" // JS::CTypesCallbacks, JS::InitCTypesClass, JS::SetCTypesCallbacks #include "js/MemoryFunctions.h" #include "js/PropertyAndElement.h" // JS_GetProperty -#include "nsMemory.h" #include "nsString.h" #include "nsNativeCharsetUtils.h" -#include "mozilla/Preferences.h" #include "mozJSComponentLoader.h" -#include "nsZipArchive.h" #include "xpc_make_class.h" namespace mozilla::ctypes { diff --git a/toolkit/components/ctypes/ctypes.h b/toolkit/components/ctypes/ctypes.h index 0426c3ca5454..6d4e9ea9cce0 100644 --- a/toolkit/components/ctypes/ctypes.h +++ b/toolkit/components/ctypes/ctypes.h @@ -7,7 +7,6 @@ #define COMPONENTS_CTYPES_H #include "nsIXPCScriptable.h" -#include "mozilla/Attributes.h" namespace mozilla { namespace ctypes { diff --git a/toolkit/components/downloads/DownloadPlatform.cpp b/toolkit/components/downloads/DownloadPlatform.cpp index a1a2fafa7c4f..3beab18bc531 100644 --- a/toolkit/components/downloads/DownloadPlatform.cpp +++ b/toolkit/components/downloads/DownloadPlatform.cpp @@ -9,13 +9,10 @@ #include "nsIProtocolHandler.h" #include "nsIURI.h" #include "nsIFile.h" -#include "nsDirectoryServiceDefs.h" -#include "nsThreadUtils.h" #include "xpcpublic.h" #include "mozilla/dom/Promise.h" #include "mozilla/Preferences.h" -#include "mozilla/Services.h" #define PREF_BDM_ADDTORECENTDOCS "browser.download.manager.addToRecentDocs" diff --git a/toolkit/components/downloads/DownloadPlatform.h b/toolkit/components/downloads/DownloadPlatform.h index 33009660d48e..82e74f8c49bb 100644 --- a/toolkit/components/downloads/DownloadPlatform.h +++ b/toolkit/components/downloads/DownloadPlatform.h @@ -7,9 +7,7 @@ #include "mozIDownloadPlatform.h" -#include "nsCOMPtr.h" - -class nsIURI; +#include "nsISupports.h" class DownloadPlatform : public mozIDownloadPlatform { protected: diff --git a/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp b/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp index 9b2540aa8f7d..12dc3fc5903e 100644 --- a/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp +++ b/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp @@ -10,11 +10,8 @@ #include "js/Object.h" // JS::GetClass, JS::GetReservedSlot #include "js/PropertyAndElement.h" // JS_DefineFunctions #include "js/PropertySpec.h" -#include "mozJSComponentLoader.h" #include "nsIThread.h" -#include "nsZipArchive.h" -#include "mozilla/Scoped.h" #include "mozilla/Services.h" #include "nsIObserverService.h" #include "nsThreadUtils.h" diff --git a/toolkit/components/osfile/NativeOSFileInternals.cpp b/toolkit/components/osfile/NativeOSFileInternals.cpp index 98bd78079654..bb91fdd92e05 100644 --- a/toolkit/components/osfile/NativeOSFileInternals.cpp +++ b/toolkit/components/osfile/NativeOSFileInternals.cpp @@ -13,7 +13,6 @@ #include "nsString.h" #include "nsNetCID.h" #include "nsThreadUtils.h" -#include "nsXPCOMCID.h" #include "nsCycleCollectionParticipant.h" #include "nsServiceManagerUtils.h" #include "nsProxyRelease.h" @@ -36,20 +35,13 @@ #include "jsapi.h" #include "jsfriendapi.h" #include "js/ArrayBuffer.h" // JS::GetArrayBufferByteLength,IsArrayBufferObject,NewArrayBufferWithContents,StealArrayBufferContents -#include "js/Conversions.h" #include "js/experimental/TypedData.h" // JS_NewUint8ArrayWithBuffer -#include "js/MemoryFunctions.h" -#include "js/UniquePtr.h" #include "js/Utility.h" #include "xpcpublic.h" #include #if defined(XP_UNIX) -# include # include -# include -# include -# include #endif // defined (XP_UNIX) #if defined(XP_WIN) diff --git a/toolkit/components/osfile/NativeOSFileInternals.h b/toolkit/components/osfile/NativeOSFileInternals.h index 61fb63e8379f..f7936a1ec456 100644 --- a/toolkit/components/osfile/NativeOSFileInternals.h +++ b/toolkit/components/osfile/NativeOSFileInternals.h @@ -9,7 +9,7 @@ #include "nsINativeOSFileInternals.h" -#include "mozilla/Attributes.h" +#include "nsISupports.h" namespace mozilla { diff --git a/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp b/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp index 295b8fe3c149..2b5f0c8e3271 100644 --- a/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp +++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsParentalControlsService.h" -#include "nsString.h" #include "nsIFile.h" #include "mozilla/Unused.h" diff --git a/toolkit/components/reflect/reflect.cpp b/toolkit/components/reflect/reflect.cpp index c41f6bc1adb9..e807e559cf28 100644 --- a/toolkit/components/reflect/reflect.cpp +++ b/toolkit/components/reflect/reflect.cpp @@ -5,9 +5,8 @@ #include "reflect.h" #include "jsapi.h" -#include "nsMemory.h" + #include "nsString.h" -#include "nsNativeCharsetUtils.h" #include "xpc_make_class.h" namespace mozilla::reflect { diff --git a/toolkit/components/reflect/reflect.h b/toolkit/components/reflect/reflect.h index 7a46bda7ced5..0e5524dd3cfc 100644 --- a/toolkit/components/reflect/reflect.h +++ b/toolkit/components/reflect/reflect.h @@ -7,7 +7,7 @@ #define COMPONENTS_REFLECT_H #include "nsIXPCScriptable.h" -#include "mozilla/Attributes.h" +#include "nsISupports.h" namespace mozilla { namespace reflect { diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp index 9f44e5348199..dd61f77a7aa0 100644 --- a/toolkit/components/terminator/nsTerminator.cpp +++ b/toolkit/components/terminator/nsTerminator.cpp @@ -20,15 +20,12 @@ #include "prthread.h" #include "prmon.h" -#include "plstr.h" #include "prio.h" #include "nsString.h" -#include "nsServiceManagerUtils.h" #include "nsDirectoryServiceUtils.h" #include "nsAppDirectoryServiceDefs.h" -#include "nsIObserverService.h" #include "nsExceptionHandler.h" #include "GeckoProfiler.h" #include "nsThreadUtils.h" @@ -43,12 +40,10 @@ #include "mozilla/AppShutdown.h" #include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" -#include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" #include "mozilla/IntentionalCrash.h" #include "mozilla/MemoryChecking.h" #include "mozilla/Preferences.h" -#include "mozilla/Services.h" #include "mozilla/SpinEventLoopUntil.h" #include "mozilla/UniquePtr.h" #include "mozilla/Unused.h" diff --git a/toolkit/system/gnome/nsAlertsIconListener.cpp b/toolkit/system/gnome/nsAlertsIconListener.cpp index e4b859438786..2fb798e5850b 100644 --- a/toolkit/system/gnome/nsAlertsIconListener.cpp +++ b/toolkit/system/gnome/nsAlertsIconListener.cpp @@ -6,7 +6,6 @@ #include "nsAlertsIconListener.h" #include "imgIContainer.h" #include "imgIRequest.h" -#include "nsNetUtil.h" #include "nsServiceManagerUtils.h" #include "nsSystemAlertsService.h" #include "nsIAlertsService.h" diff --git a/toolkit/system/gnome/nsGSettingsService.cpp b/toolkit/system/gnome/nsGSettingsService.cpp index 36962c65545e..73cba5c9478f 100644 --- a/toolkit/system/gnome/nsGSettingsService.cpp +++ b/toolkit/system/gnome/nsGSettingsService.cpp @@ -3,12 +3,9 @@ * 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/. */ -#include "mozilla/ArrayUtils.h" - #include "nsGSettingsService.h" #include "nsString.h" #include "nsCOMPtr.h" -#include "nsMemory.h" #include "prlink.h" #include "nsComponentManagerUtils.h" #include "nsIMutableArray.h" diff --git a/toolkit/system/gnome/nsSystemAlertsService.cpp b/toolkit/system/gnome/nsSystemAlertsService.cpp index ea3ee80d768a..b20015c8879a 100644 --- a/toolkit/system/gnome/nsSystemAlertsService.cpp +++ b/toolkit/system/gnome/nsSystemAlertsService.cpp @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsComponentManagerUtils.h" -#include "nsXULAppAPI.h" #include "nsSystemAlertsService.h" #include "nsAlertsIconListener.h" diff --git a/toolkit/system/gnome/nsSystemAlertsService.h b/toolkit/system/gnome/nsSystemAlertsService.h index 877e86374908..d24168e9af96 100644 --- a/toolkit/system/gnome/nsSystemAlertsService.h +++ b/toolkit/system/gnome/nsSystemAlertsService.h @@ -8,7 +8,6 @@ #include "nsIAlertsService.h" #include "nsTHashMap.h" -#include "nsCOMPtr.h" class nsAlertsIconListener; diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp index f8d088054506..ef110b1287bf 100644 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp @@ -6,18 +6,15 @@ #include "nsISystemProxySettings.h" #include "mozilla/Components.h" #include "nsIURI.h" -#include "nsReadableUtils.h" #include "nsArrayUtils.h" #include "prnetdb.h" #include "prenv.h" -#include "nsPrintfCString.h" -#include "nsNetCID.h" +#include "nsInterfaceHashtable.h" +#include "nsHashtablesFwd.h" +#include "nsHashKeys.h" #include "nsNetUtil.h" #include "nsISupportsPrimitives.h" #include "nsIGSettingsService.h" -#include "nsInterfaceHashtable.h" -#include "mozilla/Attributes.h" -#include "nsIURI.h" using namespace mozilla; diff --git a/toolkit/xre/ProfileReset.cpp b/toolkit/xre/ProfileReset.cpp index e64309f5fd47..8ed01e6535e2 100644 --- a/toolkit/xre/ProfileReset.cpp +++ b/toolkit/xre/ProfileReset.cpp @@ -15,13 +15,11 @@ #include "nsDirectoryServiceUtils.h" #include "nsPIDOMWindow.h" #include "nsString.h" -#include "nsXPCOMCIDInternal.h" #include "mozilla/Components.h" #include "mozilla/XREAppData.h" #include "mozilla/SpinEventLoopUntil.h" #include "mozilla/Unused.h" -#include "prtime.h" using namespace mozilla; diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index 1f456b3b3318..ea7dab851ac1 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -35,7 +35,6 @@ #include "nsAppRunner.h" #include "nsExceptionHandler.h" -#include "nsString.h" #include "nsThreadUtils.h" #include "nsJSUtils.h" #include "nsWidgetsCID.h" @@ -87,8 +86,6 @@ #include "mozilla/gfx/GPUProcessImpl.h" #include "mozilla/net/SocketProcessImpl.h" -#include "GeckoProfiler.h" -#include "BaseProfiler.h" #include "ProfilerControl.h" #if defined(MOZ_SANDBOX) && defined(XP_WIN)