Bug 918105 - Minimize the #includes in xpcom/ds; r=bsmedberg

This commit is contained in:
Ehsan Akhgari 2013-09-19 15:31:21 -04:00
parent eefecb0ae1
commit 9cafa40bbe
28 changed files with 28 additions and 80 deletions

View File

@ -21,6 +21,7 @@
#include "nsIHashable.h"
#include "nsThreadUtils.h"
#include "nsXULAppAPI.h"
#include "nsTArray.h"
static NS_DEFINE_CID(kZipReaderCacheCID, NS_ZIPREADERCACHE_CID);

View File

@ -7,11 +7,10 @@
#ifndef mozilla_TimeStamp_h
#define mozilla_TimeStamp_h
#include <stdint.h>
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "prinrval.h"
#include "nsDebug.h"
#include "nscore.h"
namespace IPC {
template <typename T> struct ParamTraits;
@ -261,7 +260,7 @@ public:
TimeDuration operator-(const TimeStamp& aOther) const {
MOZ_ASSERT(!IsNull(), "Cannot compute with a null value");
MOZ_ASSERT(!aOther.IsNull(), "Cannot compute with aOther null value");
PR_STATIC_ASSERT(-INT64_MAX > INT64_MIN);
static_assert(-INT64_MAX > INT64_MIN, "int64_t sanity check");
int64_t ticks = int64_t(mValue - aOther.mValue);
// Check for overflow.
if (mValue > aOther.mValue) {

View File

@ -17,14 +17,12 @@
// of storing the time value in nanoseconds.
#include <mach/mach_time.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/sysctl.h>
#include <time.h>
#include "mozilla/TimeStamp.h"
#include "nsCRT.h"
#include "prprf.h"
#include "nsDebug.h"
// Estimate of the smallest duration of time we can measure.
static uint64_t sResolution;

View File

@ -50,6 +50,7 @@
#include "nsCRT.h"
#include "prprf.h"
#include "prthread.h"
#include "nsDebug.h"
// Estimate of the smallest duration of time we can measure.
static uint64_t sResolution;

View File

@ -5,7 +5,8 @@
#include "nsArray.h"
#include "nsArrayEnumerator.h"
#include "nsWeakReference.h"
#include "nsIWeakReference.h"
#include "nsIWeakReferenceUtils.h"
#include "nsThreadUtils.h"
// used by IndexOf()

View File

@ -11,9 +11,7 @@
#include "nsAtomTable.h"
#include "nsStaticAtom.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsUTF8Utils.h"
#include "nsStringGlue.h"
#include "nsCRT.h"
#include "pldhash.h"
#include "prenv.h"
@ -23,9 +21,6 @@
#include "nsAutoPtr.h"
#include "nsUnicharUtils.h"
#define PL_ARENA_CONST_ALIGN_MASK 3
#include "plarena.h"
using namespace mozilla;
/**

View File

@ -7,8 +7,7 @@
#define nsAtomTable_h__
#include "mozilla/MemoryReporting.h"
#include <stdlib.h>
#include "nscore.h"
#include <stddef.h>
void NS_PurgeAtomTable();

View File

@ -20,9 +20,7 @@
#include "nsCRT.h"
#include "nsIServiceManager.h"
#include "nsCharTraits.h"
#include "nsUTF8Utils.h"
#include "nsDebug.h"
//----------------------------------------------------------------------

View File

@ -6,7 +6,6 @@
#define nsCRT_h___
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "plstr.h"
#include "nscore.h"

View File

@ -7,7 +7,6 @@
#include "nsHashPropertyBag.h"
#include "nsArray.h"
#include "nsArrayEnumerator.h"
#include "nsComponentManagerUtils.h"
#include "nsIVariant.h"
#include "nsIProperty.h"
#include "nsVariant.h"

View File

@ -6,9 +6,6 @@
#ifndef nsHashPropertyBag_h___
#define nsHashPropertyBag_h___
#include "nsCOMPtr.h"
#include "nsCOMArray.h"
#include "nsIVariant.h"
#include "nsIWritablePropertyBag.h"
#include "nsIWritablePropertyBag2.h"

View File

@ -15,13 +15,12 @@
*/
#include <string.h>
#include "pratom.h"
#include "prlog.h"
#include "prlock.h"
#include "nsHashtable.h"
#include "nsReadableUtils.h"
#include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h"
#include "nsCRT.h"
#include "nsCRTGlue.h"
#include "mozilla/HashFunctions.h"
using namespace mozilla;

View File

@ -23,15 +23,13 @@
#include "pldhash.h"
#include "nscore.h"
#include "nsString.h"
#include "nsISupportsBase.h"
#include "nsISupports.h"
#include "nsTraceRefcnt.h"
#include "nsStringFwd.h"
class nsIObjectInputStream;
class nsIObjectOutputStream;
class nsHashtable;
class nsStringKey;
struct PRLock;
class nsHashKey {
@ -157,8 +155,6 @@ class nsObjectHashtable : public nsHashtable {
////////////////////////////////////////////////////////////////////////////////
// nsSupportsHashtable: an nsHashtable where the elements are nsISupports*
class nsISupports;
class nsSupportsHashtable
: private nsHashtable
{
@ -194,8 +190,6 @@ class nsSupportsHashtable
////////////////////////////////////////////////////////////////////////////////
// nsISupportsKey: Where keys are nsISupports objects that get refcounted.
#include "nsISupports.h"
class nsISupportsKey : public nsHashKey {
protected:
nsISupports* mKey;
@ -301,8 +295,6 @@ class nsVoidKey : public nsHashKey {
void* GetValue() { return mKey; }
};
#include "nsString.h"
// for null-terminated c-strings
class nsCStringKey : public nsHashKey {
public:

View File

@ -4,8 +4,6 @@
#include "nsINIParserImpl.h"
#include "nsIFile.h"
#include "nsINIParser.h"
#include "nsStringEnumerator.h"
#include "nsTArray.h"

View File

@ -5,17 +5,11 @@
#include "prlog.h"
#include "nsAutoPtr.h"
#include "nsIFactory.h"
#include "nsIServiceManager.h"
#include "nsIComponentManager.h"
#include "nsIObserverService.h"
#include "nsIObserver.h"
#include "nsISimpleEnumerator.h"
#include "nsObserverService.h"
#include "nsObserverList.h"
#include "nsHashtable.h"
#include "nsThreadUtils.h"
#include "nsIWeakReference.h"
#include "nsEnumeratorUtils.h"
#include "nsIMemoryReporter.h"
#include "mozilla/net/NeckoCommon.h"

View File

@ -6,20 +6,12 @@
#include "nsArrayEnumerator.h"
#include "nsID.h"
#include "nsCOMArray.h"
#include "nsCRT.h"
#include "nsReadableUtils.h"
#include "nsIInputStream.h"
#include "nsUnicharInputStream.h"
#include "pratom.h"
#include "nsEnumeratorUtils.h"
#include "nsReadableUtils.h"
#include "nsPrintfCString.h"
#include "nsDependentString.h"
#define PL_ARENA_CONST_ALIGN_MASK 3
#include "nsPersistentProperties.h"
#include "nsIProperties.h"
#include "nsProperties.h"
struct PropertyTableEntry : public PLDHashEntryHdr
{

View File

@ -9,12 +9,11 @@
#include "nsIPersistentProperties2.h"
#include "pldhash.h"
#include "plarena.h"
#include "nsString.h"
#include "nsStringGlue.h"
#include "nsCOMPtr.h"
#include "mozilla/Attributes.h"
#include "nsIUnicharInputStream.h"
class nsIUnicharInputStream;
class nsPersistentProperties MOZ_FINAL : public nsIPersistentProperties
{

View File

@ -4,8 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsProperties.h"
#include "nsString.h"
#include "nsCRT.h"
////////////////////////////////////////////////////////////////////////////////

View File

@ -20,8 +20,6 @@
{0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
}
class nsIUnicharInputStream;
typedef nsInterfaceHashtable<nsCharPtrHashKey, nsISupports>
nsProperties_HashBase;

View File

@ -9,9 +9,6 @@
#include "nsCRT.h"
#include "nscore.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "prbit.h"
#include "mozilla/HashFunctions.h"
#include "nsTraceRefcnt.h"

View File

@ -10,7 +10,7 @@
#define nsStaticNameTable_h___
#include "pldhash.h"
#include "nsString.h"
#include "nsStringGlue.h"
/* This class supports case insensitive lookup.
*

View File

@ -5,12 +5,10 @@
#include "nsStringEnumerator.h"
#include "nsCRT.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsISimpleEnumerator.h"
#include "nsSupportsPrimitives.h"
#include "mozilla/Attributes.h"
#include "nsTArray.h"
//
// nsStringEnumerator

View File

@ -4,8 +4,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIStringEnumerator.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsStringFwd.h"
template<class T> class nsTArray;
// nsIStringEnumerator/nsIUTF8StringEnumerator implementations
//

View File

@ -7,7 +7,6 @@
#include "prbit.h"
#include "nsSupportsArray.h"
#include "nsSupportsArrayEnumerator.h"
#include "nsAString.h"
#include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h"

View File

@ -4,13 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsSupportsPrimitives.h"
#include "nsCRT.h"
#include "nsMemory.h"
#include "prprf.h"
#include "nsIInterfaceInfoManager.h"
#include "nsDependentString.h"
#include "nsReadableUtils.h"
#include "nsPromiseFlatString.h"
/***************************************************************************/

View File

@ -10,8 +10,7 @@
#include "nsISupportsPrimitives.h"
#include "nsCOMPtr.h"
#include "nsString.h"
#include "nsDependentString.h"
#include "nsStringGlue.h"
class nsSupportsIDImpl MOZ_FINAL : public nsISupportsID
{

View File

@ -7,12 +7,15 @@
/* The long avoided variant support for xpcom. */
#include "nsVariant.h"
#include "nsString.h"
#include "prprf.h"
#include "prdtoa.h"
#include <math.h>
#include "nsCRT.h"
#include "nsCycleCollectionParticipant.h"
#include "xpt_struct.h"
#include "nsReadableUtils.h"
#include "nsMemory.h"
#include "nsStringGlue.h"
#include "nsCRTGlue.h"
/***************************************************************************/
// Helpers for static convert functions...

View File

@ -11,7 +11,6 @@
#include "nsIVariant.h"
#include "nsStringFwd.h"
#include "xpt_struct.h"
#include "mozilla/Attributes.h"
class nsCycleCollectionTraversalCallback;