Bug 919341 - Minimize the #includes in xpcom/ IDL files; r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 23 Sep 2013 13:29:27 -0400
changeset 148360 004effcc3ee38981c6c570787624af47825584e7
parent 148359 019a8c04596b740b5733dddb968b27c4f52d6601
child 148361 44cba3ea6b9ddbf750012fbc409472bdda7be617
push id25340
push userryanvm@gmail.com
push dateTue, 24 Sep 2013 03:07:22 +0000
treeherdermozilla-central@1fda74e33e06 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs919341
milestone27.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 919341 - Minimize the #includes in xpcom/ IDL files; r=bsmedberg
accessible/src/atk/AccessibleWrap.cpp
accessible/src/windows/msaa/AccessibleWrap.cpp
content/base/src/nsCopySupport.cpp
content/media/webspeech/synth/pico/nsPicoService.cpp
content/xbl/src/nsXBLPrototypeBinding.cpp
content/xslt/src/xpath/txXPCOMExtensionFunction.cpp
dom/base/DOMException.cpp
dom/base/nsScriptNameSpaceManager.cpp
dom/indexedDB/Client.cpp
dom/plugins/base/nsPluginsDirUnix.cpp
dom/quota/FileStreams.cpp
embedding/browser/webBrowser/nsEmbedStream.cpp
embedding/components/appstartup/src/nsAppStartupNotifier.cpp
extensions/spellcheck/src/mozSpellChecker.cpp
extensions/spellcheck/src/mozSpellCheckerFactory.cpp
netwerk/base/src/BackgroundFileSaver.cpp
netwerk/base/src/nsDirectoryIndexStream.cpp
netwerk/cache/nsDeleteDir.cpp
netwerk/protocol/about/nsAboutCacheEntry.cpp
netwerk/streamconv/src/nsStreamConverterService.cpp
netwerk/test/PropertiesTest.cpp
storage/src/VacuumManager.cpp
storage/test/test_file_perms.cpp
toolkit/components/places/Database.cpp
toolkit/xre/ProfileReset.cpp
tools/profiler/TableTicker.cpp
widget/gtk2/nsGtkIMModule.cpp
xpcom/base/nsConsoleService.cpp
xpcom/base/nsIConsoleListener.idl
xpcom/base/nsIConsoleService.idl
xpcom/base/nsIException.idl
xpcom/components/nsCategoryManager.cpp
xpcom/components/nsICategoryManager.idl
xpcom/ds/nsAtomService.cpp
xpcom/ds/nsIAtomService.idl
xpcom/ds/nsICollection.idl
xpcom/ds/nsIEnumerator.idl
xpcom/ds/nsIPersistentProperties2.idl
xpcom/ds/nsISupportsArray.idl
xpcom/io/nsIBinaryInputStream.idl
xpcom/io/nsIBinaryOutputStream.idl
xpcom/io/nsIDirectoryService.idl
xpcom/io/nsIFile.idl
xpcom/io/nsIObjectInputStream.idl
xpcom/io/nsIObjectOutputStream.idl
xpcom/io/nsIPipe.idl
xpcom/io/nsIStorageStream.idl
xpcom/io/nsIStreamBufferAccess.idl
xpcom/io/nsLocalFileUnix.cpp
xpcom/io/nsLocalFileWin.cpp
xpcom/io/nsLocalFileWin.h
xpcom/io/nsPipe3.cpp
xpcom/io/nsStreamUtils.cpp
xpcom/reflect/xptinfo/public/nsIInterfaceInfoManager.idl
xpcom/system/nsIGConfService.idl
xpcom/system/nsIGSettingsService.idl
xpcom/tests/TestPipe.cpp
xpcom/threads/nsIProcess.idl
--- a/accessible/src/atk/AccessibleWrap.cpp
+++ b/accessible/src/atk/AccessibleWrap.cpp
@@ -18,16 +18,17 @@
 #include "nsMaiHyperlink.h"
 #include "nsString.h"
 #include "nsAutoPtr.h"
 #include "prprf.h"
 #include "nsStateMap.h"
 #include "Relation.h"
 #include "RootAccessible.h"
 #include "States.h"
+#include "nsISimpleEnumerator.h"
 
 #include "mozilla/Util.h"
 #include "nsXPCOMStrings.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIPersistentProperties2.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
--- a/accessible/src/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/src/windows/msaa/AccessibleWrap.cpp
@@ -39,16 +39,17 @@
 #include "mozilla/Preferences.h"
 
 #include "Accessible2_i.c"
 #include "AccessibleRole.h"
 #include "AccessibleStates.h"
 #include "oleacc.h"
 #include "nsIAccessibleTypes.h"
 #include "nsIPersistentProperties2.h"
+#include "nsISimpleEnumerator.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 const uint32_t USE_ROLE_STRING = 0;
 
 /* For documentation of the accessibility architecture,
  * see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
--- a/content/base/src/nsCopySupport.cpp
+++ b/content/base/src/nsCopySupport.cpp
@@ -34,16 +34,17 @@
 #include "nsIDOMNode.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMDocument.h"
 #include "nsIHTMLDocument.h"
 #include "nsGkAtoms.h"
 #include "nsGUIEvent.h"
 #include "nsIFrame.h"
 #include "nsIURI.h"
+#include "nsISimpleEnumerator.h"
 
 // image copy stuff
 #include "nsIImageLoadingContent.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsContentUtils.h"
 #include "nsContentCID.h"
 
 #include "mozilla/dom/Element.h"
--- a/content/media/webspeech/synth/pico/nsPicoService.cpp
+++ b/content/media/webspeech/synth/pico/nsPicoService.cpp
@@ -4,16 +4,17 @@
  * 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 "nsISupports.h"
 #include "nsPicoService.h"
 #include "nsPrintfCString.h"
 #include "nsIWeakReferenceUtils.h"
 #include "SharedBuffer.h"
+#include "nsISimpleEnumerator.h"
 
 #include "mozilla/dom/nsSynthVoiceRegistry.h"
 #include "mozilla/dom/nsSpeechTask.h"
 
 #include "nsIFile.h"
 #include "nsThreadUtils.h"
 #include "prenv.h"
 
--- a/content/xbl/src/nsXBLPrototypeBinding.cpp
+++ b/content/xbl/src/nsXBLPrototypeBinding.cpp
@@ -29,17 +29,17 @@
 #include "nsIInterfaceInfoManager.h"
 #include "nsIDocumentObserver.h"
 #include "nsGkAtoms.h"
 #include "nsXBLProtoImpl.h"
 #include "nsCRT.h"
 #include "nsContentUtils.h"
 #include "nsTextFragment.h"
 #include "nsTextNode.h"
-
+#include "nsIInterfaceInfo.h"
 #include "nsIScriptError.h"
 
 #include "nsIStyleRuleProcessor.h"
 #include "nsXBLResourceLoader.h"
 #include "mozilla/dom/CDATASection.h"
 #include "mozilla/dom/Comment.h"
 #include "mozilla/dom/Element.h"
 
--- a/content/xslt/src/xpath/txXPCOMExtensionFunction.cpp
+++ b/content/xslt/src/xpath/txXPCOMExtensionFunction.cpp
@@ -13,16 +13,17 @@
 #include "txIFunctionEvaluationContext.h"
 #include "txIXPathContext.h"
 #include "txNodeSetAdaptor.h"
 #include "txXPathTreeWalker.h"
 #include "xptcall.h"
 #include "txXPathObjectAdaptor.h"
 #include "mozilla/Attributes.h"
 #include "nsIClassInfo.h"
+#include "nsIInterfaceInfo.h"
 
 NS_IMPL_ISUPPORTS1(txXPathObjectAdaptor, txIXPathObject)
 
 class txFunctionEvaluationContext MOZ_FINAL : public txIFunctionEvaluationContext
 {
 public:
     txFunctionEvaluationContext(txIEvalContext *aContext, nsISupports *aState);
 
--- a/dom/base/DOMException.cpp
+++ b/dom/base/DOMException.cpp
@@ -12,16 +12,17 @@
 #include "mozilla/Util.h"
 #include "mozilla/dom/Exceptions.h"
 #include "nsContentUtils.h"
 #include "nsCOMPtr.h"
 #include "nsIClassInfoImpl.h"
 #include "nsIDocument.h"
 #include "nsIDOMDOMException.h"
 #include "nsIException.h"
+#include "nsIProgrammingLanguage.h"
 #include "nsMemory.h"
 #include "prprf.h"
 #include "xpcprivate.h"
 
 #include "mozilla/dom/DOMExceptionBinding.h"
 
 using namespace mozilla;
 
--- a/dom/base/nsScriptNameSpaceManager.cpp
+++ b/dom/base/nsScriptNameSpaceManager.cpp
@@ -21,16 +21,17 @@
 #include "xptinfo.h"
 #include "nsXPIDLString.h"
 #include "nsPrintfCString.h"
 #include "nsReadableUtils.h"
 #include "nsHashKeys.h"
 #include "nsDOMClassInfo.h"
 #include "nsCRT.h"
 #include "nsIObserverService.h"
+#include "nsISimpleEnumerator.h"
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 
 #define NS_INTERFACE_PREFIX "nsI"
 #define NS_DOM_INTERFACE_PREFIX "nsIDOM"
 
--- a/dom/indexedDB/Client.cpp
+++ b/dom/indexedDB/Client.cpp
@@ -8,16 +8,17 @@
 
 #include "mozilla/dom/quota/QuotaManager.h"
 #include "mozilla/dom/quota/UsageInfo.h"
 #include "mozilla/dom/quota/Utilities.h"
 
 #include "IDBDatabase.h"
 #include "IndexedDatabaseManager.h"
 #include "TransactionThreadPool.h"
+#include "nsISimpleEnumerator.h"
 
 USING_INDEXEDDB_NAMESPACE
 using mozilla::dom::quota::AssertIsOnIOThread;
 using mozilla::dom::quota::QuotaManager;
 
 namespace {
 
 bool
--- a/dom/plugins/base/nsPluginsDirUnix.cpp
+++ b/dom/plugins/base/nsPluginsDirUnix.cpp
@@ -6,16 +6,17 @@
 #include "nsNPAPIPlugin.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsIMemory.h"
 #include "nsPluginsDir.h"
 #include "nsPluginsDirUtils.h"
 #include "prmem.h"
 #include "prenv.h"
 #include "prerror.h"
+#include "prio.h"
 #include <sys/stat.h>
 #include "nsString.h"
 #include "nsIFile.h"
 #include "nsIPrefBranch.h"
 #include "nsIPrefService.h"
 
 #define LOCAL_PLUGIN_DLL_SUFFIX ".so"
 #if defined(__hpux)
--- a/dom/quota/FileStreams.cpp
+++ b/dom/quota/FileStreams.cpp
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #include "FileStreams.h"
 
 #include "QuotaManager.h"
+#include "prio.h"
 
 USING_QUOTA_NAMESPACE
 
 template <class FileStreamBase>
 NS_IMETHODIMP
 FileQuotaStream<FileStreamBase>::SetEOF()
 {
   nsresult rv = FileStreamBase::SetEOF();
--- a/embedding/browser/webBrowser/nsEmbedStream.cpp
+++ b/embedding/browser/webBrowser/nsEmbedStream.cpp
@@ -1,14 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "nsIAsyncInputStream.h"
+#include "nsIAsyncOutputStream.h"
 #include "nsIDocShell.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIPipe.h"
 
 #include "nsEmbedStream.h"
 #include "nsError.h"
 #include "nsString.h"
 
--- a/embedding/components/appstartup/src/nsAppStartupNotifier.cpp
+++ b/embedding/components/appstartup/src/nsAppStartupNotifier.cpp
@@ -6,17 +6,17 @@
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsXPIDLString.h"
 #include "nsIServiceManager.h"
 #include "nsICategoryManager.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsAppStartupNotifier.h"
-
+#include "nsISimpleEnumerator.h"
 
 NS_IMPL_ISUPPORTS1(nsAppStartupNotifier, nsIObserver)
 
 nsAppStartupNotifier::nsAppStartupNotifier()
 {
 }
 
 nsAppStartupNotifier::~nsAppStartupNotifier()
--- a/extensions/spellcheck/src/mozSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozSpellChecker.cpp
@@ -4,16 +4,17 @@
 
 
 #include "mozSpellChecker.h"
 #include "nsIServiceManager.h"
 #include "mozISpellI18NManager.h"
 #include "nsIStringEnumerator.h"
 #include "nsICategoryManager.h"
 #include "nsISupportsPrimitives.h"
+#include "nsISimpleEnumerator.h"
 
 #define DEFAULT_SPELL_CHECKER "@mozilla.org/spellchecker/engine;1"
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(mozSpellChecker)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(mozSpellChecker)
 
 NS_INTERFACE_MAP_BEGIN(mozSpellChecker)
   NS_INTERFACE_MAP_ENTRY(nsISpellChecker)
--- a/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
+++ b/extensions/spellcheck/src/mozSpellCheckerFactory.cpp
@@ -7,16 +7,17 @@
 #include "mozilla/ModuleUtils.h"
 #include "mozHunspell.h"
 #include "mozHunspellDirProvider.h"
 #include "mozSpellChecker.h"
 #include "mozInlineSpellChecker.h"
 #include "nsTextServicesCID.h"
 #include "mozPersonalDictionary.h"
 #include "mozSpellI18NManager.h"
+#include "nsIFile.h"
 
 #define NS_SPELLCHECKER_CID         \
 { /* 8227f019-afc7-461e-b030-9f185d7a0e29 */    \
 0x8227F019, 0xAFC7, 0x461e,                     \
 { 0xB0, 0x30, 0x9F, 0x18, 0x5D, 0x7A, 0x0E, 0x29} }
 
 #define MOZ_INLINESPELLCHECKER_CID         \
 { /* 9FE5D975-09BD-44aa-A01A-66402EA28657 */    \
--- a/netwerk/base/src/BackgroundFileSaver.cpp
+++ b/netwerk/base/src/BackgroundFileSaver.cpp
@@ -10,16 +10,17 @@
 
 #include "nsIFile.h"
 #include "nsIPipe.h"
 #include "nsNetUtil.h"
 #include "nsThreadUtils.h"
 
 #include "BackgroundFileSaver.h"
 #include "mozilla/Telemetry.h"
+#include "nsIAsyncInputStream.h"
 
 namespace mozilla {
 namespace net {
 
 ////////////////////////////////////////////////////////////////////////////////
 //// Globals
 
 /**
--- a/netwerk/base/src/nsDirectoryIndexStream.cpp
+++ b/netwerk/base/src/nsDirectoryIndexStream.cpp
@@ -12,16 +12,17 @@
 
   http://www.mozilla.org/projects/netlib/dirindexformat.html
 
  */
 
 #include "nsEscape.h"
 #include "nsDirectoryIndexStream.h"
 #include "prlog.h"
+#include "prtime.h"
 #ifdef PR_LOGGING
 static PRLogModuleInfo* gLog;
 #endif
 
 #include "nsISimpleEnumerator.h"
 #ifdef THREADSAFE_I18N
 #include "nsCollationCID.h"
 #include "nsICollation.h"
--- a/netwerk/cache/nsDeleteDir.cpp
+++ b/netwerk/cache/nsDeleteDir.cpp
@@ -9,16 +9,17 @@
 #include "nsString.h"
 #include "mozilla/Telemetry.h"
 #include "nsITimer.h"
 #include "nsISimpleEnumerator.h"
 #include "nsAutoPtr.h"
 #include "nsThreadUtils.h"
 #include "nsISupportsPriority.h"
 #include "nsCacheUtils.h"
+#include "prtime.h"
 #include <time.h>
 
 using namespace mozilla;
 
 class nsBlockOnBackgroundThreadEvent : public nsRunnable {
 public:
   nsBlockOnBackgroundThreadEvent() {}
   NS_IMETHOD Run()
--- a/netwerk/protocol/about/nsAboutCacheEntry.cpp
+++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp
@@ -4,16 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsAboutCacheEntry.h"
 #include "nsICacheService.h"
 #include "nsICacheSession.h"
 #include "nsNetUtil.h"
 #include "prprf.h"
 #include "nsEscape.h"
+#include "nsIAsyncInputStream.h"
+#include "nsIAsyncOutputStream.h"
 #include <algorithm>
 
 #define HEXDUMP_MAX_ROWS 16
 
 static void
 HexDump(uint32_t *state, const char *buf, int32_t n, nsCString &result)
 {
   char temp[16];
--- a/netwerk/streamconv/src/nsStreamConverterService.cpp
+++ b/netwerk/streamconv/src/nsStreamConverterService.cpp
@@ -27,16 +27,17 @@
 #include "nsIStreamConverter.h"
 #include "nsICategoryManager.h"
 #include "nsXPCOM.h"
 #include "nsISupportsPrimitives.h"
 #include "nsCOMArray.h"
 #include "nsTArray.h"
 #include "nsServiceManagerUtils.h"
 #include "nsHashtable.h"
+#include "nsISimpleEnumerator.h"
 
 ///////////////////////////////////////////////////////////////////
 // Breadth-First-Search (BFS) algorithm state classes and types.
 
 // used  to establish discovered vertecies.
 enum BFScolors {white, gray, black};
 
 struct BFSState {
--- a/netwerk/test/PropertiesTest.cpp
+++ b/netwerk/test/PropertiesTest.cpp
@@ -12,16 +12,17 @@
 #include "nsIURL.h"
 #include "nsIIOService.h"
 #include "nsNetCID.h"
 #include "nsIChannel.h"
 #include "nsIComponentManager.h"
 #include <stdio.h>
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
+#include "nsISimpleEnumerator.h"
 
 #define TEST_URL "resource:/res/test.properties"
 static NS_DEFINE_CID(kPersistentPropertiesCID, NS_IPERSISTENTPROPERTIES_CID);
 
 static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
 
 /***************************************************************************/
 
--- a/storage/src/VacuumManager.cpp
+++ b/storage/src/VacuumManager.cpp
@@ -9,16 +9,17 @@
 #include "VacuumManager.h"
 
 #include "mozilla/Services.h"
 #include "mozilla/Preferences.h"
 #include "nsIObserverService.h"
 #include "nsIFile.h"
 #include "nsThreadUtils.h"
 #include "prlog.h"
+#include "prtime.h"
 
 #include "mozStorageConnection.h"
 #include "mozIStorageStatement.h"
 #include "mozIStorageAsyncStatement.h"
 #include "mozIStoragePendingStatement.h"
 #include "mozIStorageError.h"
 #include "mozStorageHelper.h"
 #include "nsXULAppAPI.h"
--- a/storage/test/test_file_perms.cpp
+++ b/storage/test/test_file_perms.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
  * 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/. */
 
 #include "storage_test_harness.h"
 #include "nsIFile.h"
+#include "prio.h"
 
 /**
  * This file tests that the file permissions of the sqlite files match what
  * we request they be
  */
 
 void
 test_file_perms()
--- a/toolkit/components/places/Database.cpp
+++ b/toolkit/components/places/Database.cpp
@@ -21,16 +21,17 @@
 #include "Helpers.h"
 
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "prsystem.h"
 #include "nsPrintfCString.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
+#include "prtime.h"
 
 // Time between corrupt database backups.
 #define RECENT_BACKUP_TIME_MICROSEC (int64_t)86400 * PR_USEC_PER_SEC // 24H
 
 // Filename of the database.
 #define DATABASE_FILENAME NS_LITERAL_STRING("places.sqlite")
 // Filename used to backup corrupt databases.
 #define DATABASE_CORRUPT_FILENAME NS_LITERAL_STRING("places.sqlite.corrupt")
--- a/toolkit/xre/ProfileReset.cpp
+++ b/toolkit/xre/ProfileReset.cpp
@@ -15,16 +15,17 @@
 #include "nsDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsPrintfCString.h"
 #include "nsToolkitCompsCID.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsXREAppData.h"
 
 #include "mozilla/Services.h"
+#include "prtime.h"
 
 extern const nsXREAppData* gAppData;
 
 static const char kProfileProperties[] =
   "chrome://mozapps/locale/profile/profileSelection.properties";
 
 /**
  * Creates a new profile with a timestamp in the name to use for profile reset.
--- a/tools/profiler/TableTicker.cpp
+++ b/tools/profiler/TableTicker.cpp
@@ -8,16 +8,17 @@
 #include <fstream>
 #include <sstream>
 #include "GeckoProfilerImpl.h"
 #include "SaveProfileTask.h"
 #include "ProfileEntry.h"
 #include "platform.h"
 #include "nsThreadUtils.h"
 #include "prenv.h"
+#include "prtime.h"
 #include "shared-libraries.h"
 #include "mozilla/StackWalk.h"
 #include "TableTicker.h"
 #include "nsXULAppAPI.h"
 
 // JSON
 #include "JSObjectBuilder.h"
 #include "JSCustomObjectBuilder.h"
--- a/widget/gtk2/nsGtkIMModule.cpp
+++ b/widget/gtk2/nsGtkIMModule.cpp
@@ -3,16 +3,17 @@
 /* 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/. */
 
 #ifdef MOZ_LOGGING
 #define FORCE_PR_LOG /* Allow logging in the release build */
 #endif // MOZ_LOGGING
 #include "prlog.h"
+#include "prtime.h"
 
 #include "nsGtkIMModule.h"
 #include "nsWindow.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Likely.h"
 
 using namespace mozilla;
 using namespace mozilla::widget;
--- a/xpcom/base/nsConsoleService.cpp
+++ b/xpcom/base/nsConsoleService.cpp
@@ -12,16 +12,17 @@
 
 #include "nsMemory.h"
 #include "nsCOMArray.h"
 #include "nsThreadUtils.h"
 
 #include "nsConsoleService.h"
 #include "nsConsoleMessage.h"
 #include "nsIClassInfoImpl.h"
+#include "nsIConsoleListener.h"
 
 #include "mozilla/Preferences.h"
 
 #if defined(ANDROID)
 #include <android/log.h>
 #endif
 #ifdef XP_WIN
 #include <windows.h>
--- a/xpcom/base/nsIConsoleListener.idl
+++ b/xpcom/base/nsIConsoleListener.idl
@@ -3,15 +3,16 @@
  * 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/. */
 
 /*
  * Used by the console service to notify listeners of new console messages.
  */
 
 #include "nsISupports.idl"
-#include "nsIConsoleMessage.idl"
+
+interface nsIConsoleMessage;
 
 [scriptable, uuid(eaaf61d6-1dd1-11b2-bc6e-8fc96480f20d)]
 interface nsIConsoleListener : nsISupports
 {
     void observe(in nsIConsoleMessage aMessage);
 };
--- a/xpcom/base/nsIConsoleService.idl
+++ b/xpcom/base/nsIConsoleService.idl
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
-#include "nsIConsoleListener.idl"
-#include "nsIConsoleMessage.idl"
+
+interface nsIConsoleListener;
+interface nsIConsoleMessage;
 
 [scriptable, uuid(0eb81d20-c37e-42d4-82a8-ca9ae96bdf52)]
 interface nsIConsoleService : nsISupports
 {
     void logMessage(in nsIConsoleMessage message);
 
     /**
      * Convenience method for logging simple messages.
--- a/xpcom/base/nsIException.idl
+++ b/xpcom/base/nsIException.idl
@@ -4,17 +4,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /*
  * Interfaces for representing cross-language exceptions and stack traces.
  */
 
 
 #include "nsISupports.idl"
-#include "nsIProgrammingLanguage.idl"
 
 // XXX - most "string"s in this file should probably move to Unicode
 //       so may as well use AStrings...
 
 
 [scriptable, uuid(91d82105-7c62-4f8b-9779-154277c0ee90)]
 interface nsIStackFrame : nsISupports
 {
--- a/xpcom/components/nsCategoryManager.cpp
+++ b/xpcom/components/nsCategoryManager.cpp
@@ -27,16 +27,17 @@
 #include "nsCRT.h"
 #include "nsQuickSort.h"
 #include "nsEnumeratorUtils.h"
 #include "nsThreadUtils.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Services.h"
 
 #include "ManifestParser.h"
+#include "nsISimpleEnumerator.h"
 
 using namespace mozilla;
 class nsIComponentLoaderManager;
 
 /*
   CategoryDatabase
   contains 0 or more 1-1 mappings of string to Category
   each Category contains 0 or more 1-1 mappings of string keys to string values
--- a/xpcom/components/nsICategoryManager.idl
+++ b/xpcom/components/nsICategoryManager.idl
@@ -1,15 +1,16 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
-#include "nsISimpleEnumerator.idl"
+
+interface nsISimpleEnumerator;
 
 /*
  * nsICategoryManager
  */
 
 [scriptable, uuid(3275b2cd-af6d-429a-80d7-f0c5120342ac)]
 interface nsICategoryManager : nsISupports
 {
--- a/xpcom/ds/nsAtomService.cpp
+++ b/xpcom/ds/nsAtomService.cpp
@@ -1,14 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "nsAtomService.h"
+#include "nsIAtom.h"
 
 NS_IMPL_ISUPPORTS1(nsAtomService, nsIAtomService)
 
 nsAtomService::nsAtomService()
 {
 }
 
 nsresult
--- a/xpcom/ds/nsIAtomService.idl
+++ b/xpcom/ds/nsIAtomService.idl
@@ -1,14 +1,16 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
-#include "nsIAtom.idl"
+#include "nsISupports.idl"
+
+interface nsIAtom;
 
 %{C++
 #define NS_ATOMSERVICE_CID \
 { /* ed3db3fc-0168-4cab-8818-98f5475a490c */ \
     0xed3db3fc,                              \
     0x0168,                                  \
     0x4cab,                                  \
     {0x88, 0x18, 0x98, 0xf5, 0x47, 0x5a, 0x49, 0x0c} }
--- a/xpcom/ds/nsICollection.idl
+++ b/xpcom/ds/nsICollection.idl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsISerializable.idl"
-#include "nsIEnumerator.idl"
+
+interface nsIEnumerator;
 
 [scriptable, uuid(83b6019c-cbc4-11d2-8cca-0060b0fc14a3)]
 interface nsICollection : nsISerializable
 {
 
   uint32_t Count();
   nsISupports GetElementAt(in uint32_t index);
   void QueryElementAt(in uint32_t index, in nsIIDRef uuid, 
--- a/xpcom/ds/nsIEnumerator.idl
+++ b/xpcom/ds/nsIEnumerator.idl
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
-#include "nsISimpleEnumerator.idl"
+#include "nsISupports.idl"
 
 %{C++
 #define NS_ENUMERATOR_FALSE 1
 %}
 /*
  * DO NOT USE THIS INTERFACE.  IT IS HORRIBLY BROKEN, USES NS_COMFALSE
  * AND IS BASICALLY IMPOSSIBLE TO USE CORRECTLY THROUGH PROXIES OR
  * XPCONNECT.  IF YOU SEE NEW USES OF THIS INTERFACE IN CODE YOU ARE
--- a/xpcom/ds/nsIPersistentProperties2.idl
+++ b/xpcom/ds/nsIPersistentProperties2.idl
@@ -1,19 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
-#include "nsISupports.idl"
 #include "nsIProperties.idl"
-#include "nsISimpleEnumerator.idl"
 
 interface nsIInputStream;
 interface nsIOutputStream;
+interface nsISimpleEnumerator;
 
 [scriptable, uuid(283EE646-1AEF-11D4-98B3-00C04fA0CE9A)]
 interface nsIPropertyElement : nsISupports {
   attribute AUTF8String key;
   attribute AString value;
 };
 
 [scriptable, uuid(1A180F60-93B2-11d2-9B8B-00805F8A16D9)]
--- a/xpcom/ds/nsISupportsArray.idl
+++ b/xpcom/ds/nsISupportsArray.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 
-#include "nsISupports.idl"
 #include "nsICollection.idl"
 
 /*
  * This entire interface is deprecated and should not be used.
  * See nsIArray and nsIMutableArray for the new implementations.
  *
  * http://groups.google.com/groups?q=nsisupportsarray+group:netscape.public.mozilla.xpcom&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3D779491.3050506%40netscape.com&rnum=2
  * http://groups.google.com/groups?q=nsisupportsarray+group:netscape.public.mozilla.xpcom&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=al8412%245ab2%40ripley.netscape.com&rnum=8
--- a/xpcom/io/nsIBinaryInputStream.idl
+++ b/xpcom/io/nsIBinaryInputStream.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * 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/. */
 
 #include "nsIInputStream.idl"
-#include "nsrootidl.idl"
 
 /**
  * This interface allows consumption of primitive data types from a "binary
  * stream" containing untagged, big-endian binary data, i.e. as produced by an
  * implementation of nsIBinaryOutputStream.  This might be used, for example,
  * to implement network protocols or to read from architecture-neutral disk
  * files, i.e. ones that can be read and written by both big-endian and
  * little-endian platforms.
--- a/xpcom/io/nsIBinaryOutputStream.idl
+++ b/xpcom/io/nsIBinaryOutputStream.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * 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/. */
 
 #include "nsIOutputStream.idl"
-#include "nsrootidl.idl"
 
 /**
  * This interface allows writing of primitive data types (integers,
  * floating-point values, booleans, etc.) to a stream in a binary, untagged,
  * fixed-endianness format.  This might be used, for example, to implement
  * network protocols or to produce architecture-neutral binary disk files,
  * i.e. ones that can be read and written by both big-endian and little-endian
  * platforms.  Output is written in big-endian order (high-order byte first),
--- a/xpcom/io/nsIDirectoryService.idl
+++ b/xpcom/io/nsIDirectoryService.idl
@@ -1,15 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
-#include "nsIFile.idl"
+
+interface nsIFile;
+interface nsISimpleEnumerator;
 
 /**
  * nsIDirectoryServiceProvider
  *
  * Used by Directory Service to get file locations.
  */
 
 [scriptable, uuid(bbf8cab0-d43a-11d3-8cc2-00609792278c)]
--- a/xpcom/io/nsIFile.idl
+++ b/xpcom/io/nsIFile.idl
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
 
 %{C++
-#include "prio.h"
-#include "prlink.h"
+struct PRFileDesc;
+struct PRLibrary;
 #include <stdio.h>
 %}
 
 [ptr] native PRFileDescStar(PRFileDesc);
 [ptr] native PRLibraryStar(PRLibrary);
 [ptr] native FILE(FILE);
 
 interface nsISimpleEnumerator;
--- a/xpcom/io/nsIObjectInputStream.idl
+++ b/xpcom/io/nsIObjectInputStream.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsIBinaryInputStream.idl"
-#include "nsrootidl.idl"
 
 /**
  * @see nsIObjectOutputStream
  * @see nsIBinaryInputStream
  */
 
 [scriptable, uuid(6c248606-4eae-46fa-9df0-ba58502368eb)]
 interface nsIObjectInputStream : nsIBinaryInputStream
--- a/xpcom/io/nsIObjectOutputStream.idl
+++ b/xpcom/io/nsIObjectOutputStream.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsIBinaryOutputStream.idl"
-#include "nsrootidl.idl"
 
 /**
  * @See nsIObjectInputStream
  * @See nsIBinaryOutputStream
  */
 
 [scriptable, uuid(92c898ac-5fde-4b99-87b3-5d486422094b)]
 interface nsIObjectOutputStream : nsIBinaryOutputStream
--- a/xpcom/io/nsIPipe.idl
+++ b/xpcom/io/nsIPipe.idl
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
-#include "nsIAsyncInputStream.idl"
-#include "nsIAsyncOutputStream.idl"
+#include "nsISupports.idl"
 
+interface nsIAsyncInputStream;
+interface nsIAsyncOutputStream;
 interface nsIMemory;
 
 /**
  * nsIPipe represents an in-process buffer that can be read using nsIInputStream
  * and written using nsIOutputStream.  The reader and writer of a pipe do not
  * have to be on the same thread.  As a result, the pipe is an ideal mechanism
  * to bridge data exchange between two threads.  For example, a worker thread
  * might write data to a pipe from which the main thread will read.
@@ -95,16 +96,19 @@ interface nsISearchableInputStream : nsI
     void search(in string forString, 
                 in boolean ignoreCase, 
                 out boolean found,
                 out unsigned long offsetSearchedTo);
 };
 
 %{C++
 
+class nsIInputStream;
+class nsIOutputStream;
+
 /**
  * NS_NewPipe2
  *
  * This function supersedes NS_NewPipe.  It differs from NS_NewPipe in two
  * major ways:
  *  (1) returns nsIAsyncInputStream and nsIAsyncOutputStream, so it is
  *      not necessary to QI in order to access these interfaces.
  *  (2) the size of the pipe is determined by the number of segments
--- a/xpcom/io/nsIStorageStream.idl
+++ b/xpcom/io/nsIStorageStream.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * 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/. */
 
 #include "nsISupports.idl"
-#include "nsrootidl.idl"
 
 interface nsIMemory;
 interface nsIInputStream;
 interface nsIOutputStream;
 
 /**
  * The nsIStorageStream interface maintains an internal data buffer that can be
  * filled using a single output stream.  One or more independent input streams
--- a/xpcom/io/nsIStreamBufferAccess.idl
+++ b/xpcom/io/nsIStreamBufferAccess.idl
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
-#include "nsrootidl.idl"
 
 /**
  * An interface for access to a buffering stream implementation's underlying
  * memory buffer.
  *
  * Stream implementations that QueryInterface to nsIStreamBufferAccess must
  * ensure that all buffers are aligned on the most restrictive type size for
  * the current architecture (e.g., sizeof(double) for RISCy CPUs).  malloc(3)
--- a/xpcom/io/nsLocalFileUnix.cpp
+++ b/xpcom/io/nsLocalFileUnix.cpp
@@ -38,16 +38,17 @@
 #include "nsReadableUtils.h"
 #include "nsLocalFile.h"
 #include "nsIComponentManager.h"
 #include "nsXPIDLString.h"
 #include "prproces.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsISimpleEnumerator.h"
 #include "private/pprio.h"
+#include "prlink.h"
 
 #ifdef MOZ_WIDGET_GTK
 #include "nsIGIOService.h"
 #include "nsIGnomeVFSService.h"
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
 #include <Carbon/Carbon.h>
--- a/xpcom/io/nsLocalFileWin.cpp
+++ b/xpcom/io/nsLocalFileWin.cpp
@@ -35,16 +35,17 @@
 
 #include  <io.h>
 #include  <stdio.h>
 #include  <stdlib.h>
 #include  <mbstring.h>
 
 #include "nsXPIDLString.h"
 #include "prproces.h"
+#include "prlink.h"
 
 #include "mozilla/Mutex.h"
 #include "SpecialSystemDirectory.h"
 
 #include "nsTraceRefcntImpl.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsThreadUtils.h"
 
--- a/xpcom/io/nsLocalFileWin.h
+++ b/xpcom/io/nsLocalFileWin.h
@@ -10,16 +10,17 @@
 #include "nsError.h"
 #include "nsString.h"
 #include "nsCRT.h"
 #include "nsIFile.h"
 #include "nsIFactory.h"
 #include "nsILocalFileWin.h"
 #include "nsIHashable.h"
 #include "nsIClassInfoImpl.h"
+#include "prio.h"
 
 #include "mozilla/Attributes.h"
 
 #include "windows.h"
 #include "shlobj.h"
 
 #include <sys/stat.h>
 
--- a/xpcom/io/nsPipe3.cpp
+++ b/xpcom/io/nsPipe3.cpp
@@ -11,16 +11,18 @@
 #include "nsSegmentedBuffer.h"
 #include "nsStreamUtils.h"
 #include "nsCOMPtr.h"
 #include "nsCRT.h"
 #include "prlog.h"
 #include "nsIClassInfoImpl.h"
 #include "nsAlgorithm.h"
 #include "nsMemory.h"
+#include "nsIAsyncInputStream.h"
+#include "nsIAsyncOutputStream.h"
 
 using namespace mozilla;
 
 #if defined(PR_LOGGING)
 //
 // set NSPR_LOG_MODULES=nsPipe:5
 //
 static PRLogModuleInfo *
--- a/xpcom/io/nsStreamUtils.cpp
+++ b/xpcom/io/nsStreamUtils.cpp
@@ -8,16 +8,18 @@
 #include "nsStreamUtils.h"
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsIPipe.h"
 #include "nsIEventTarget.h"
 #include "nsIRunnable.h"
 #include "nsISafeOutputStream.h"
 #include "nsString.h"
+#include "nsIAsyncInputStream.h"
+#include "nsIAsyncOutputStream.h"
 
 using namespace mozilla;
 
 //-----------------------------------------------------------------------------
 
 class nsInputStreamReadyEvent MOZ_FINAL : public nsIRunnable
                                         , public nsIInputStreamCallback
 {
--- a/xpcom/reflect/xptinfo/public/nsIInterfaceInfoManager.idl
+++ b/xpcom/reflect/xptinfo/public/nsIInterfaceInfoManager.idl
@@ -2,19 +2,19 @@
 /* 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/. */
 
 /* The nsIInterfaceInfoManager public declaration. */
 
 
 #include "nsISupports.idl"
-#include "nsIInterfaceInfo.idl"
-#include "nsIEnumerator.idl"
-#include "nsISimpleEnumerator.idl"
+
+interface nsIInterfaceInfo;
+interface nsIEnumerator;
 
 /* this is NOT intended to be scriptable */
 [uuid(1d53d8d9-1d92-428f-b5cc-198b55e897d7)]
 interface nsIInterfaceInfoManager : nsISupports
 {
     nsIInterfaceInfo getInfoForIID(in nsIIDPtr iid);
     nsIInterfaceInfo getInfoForName(in string name);
 
--- a/xpcom/system/nsIGConfService.idl
+++ b/xpcom/system/nsIGConfService.idl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
-#include "nsIArray.idl"
+
+interface nsIArray;
 
 [scriptable, uuid(5009acae-6973-48c3-b6d6-52c692cc5d9d)]
 interface nsIGConfService : nsISupports
 {
   /* Basic registry access */
   boolean       getBool(in AUTF8String key);
   AUTF8String   getString(in AUTF8String key);
   long          getInt(in AUTF8String key);
--- a/xpcom/system/nsIGSettingsService.idl
+++ b/xpcom/system/nsIGSettingsService.idl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 #include "nsISupports.idl"
-#include "nsIArray.idl"
+
+interface nsIArray;
 
 [scriptable, uuid(16d5b0ed-e756-4f1b-a8ce-9132e869acd8)]
 interface nsIGSettingsCollection : nsISupports
 {
   void          setString(in AUTF8String key, in AUTF8String value);
   void          setBoolean(in AUTF8String key, in boolean value);
   void          setInt(in AUTF8String key, in long value);
   AUTF8String   getString(in AUTF8String key);
--- a/xpcom/tests/TestPipe.cpp
+++ b/xpcom/tests/TestPipe.cpp
@@ -3,16 +3,18 @@
  * 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 "TestHarness.h"
 
 #include "nsIPipe.h"
 #include "nsIMemory.h"
 #include "mozilla/Attributes.h"
+#include "nsIAsyncInputStream.h"
+#include "nsIAsyncOutputStream.h"
 
 /** NS_NewPipe2 reimplemented, because it's not exported by XPCOM */
 nsresult TP_NewPipe2(nsIAsyncInputStream** input,
                      nsIAsyncOutputStream** output,
                      bool nonBlockingInput,
                      bool nonBlockingOutput,
                      uint32_t segmentSize,
                      uint32_t segmentCount,
--- a/xpcom/threads/nsIProcess.idl
+++ b/xpcom/threads/nsIProcess.idl
@@ -1,15 +1,15 @@
 /* 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/. */
 
-#include "nsIFile.idl"
 #include "nsISupports.idl"
 
+interface nsIFile;
 interface nsIObserver;
 
 [scriptable, uuid(609610de-9954-4a63-8a7c-346350a86403)]
 interface nsIProcess : nsISupports
 {
   /**
    * Initialises the process with an executable to be run. Call the run method
    * to run the executable.