Bug 845374 - Part r: Stop including nsTArray.h in nsReadableUtils.h; r=khuey
authorMs2ger <ms2ger@gmail.com>
Sun, 17 Mar 2013 08:55:16 +0100
changeset 125034 f5da57075370a182557a904a3c46813ead070691
parent 125033 1aba40692b5d0df2fd3b70c0ad90c654ac0531d0
child 125035 cf53a926a60db6a8672f72151b80e4f1f5db98ad
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs845374
milestone22.0a1
Bug 845374 - Part r: Stop including nsTArray.h in nsReadableUtils.h; r=khuey
content/media/webaudio/MediaBufferDecoder.h
content/xul/document/src/nsXULControllers.h
dom/audiochannel/AudioChannelService.h
gfx/gl/GLTextureImage.h
gfx/layers/opengl/LayerManagerOGLProgram.h
gfx/src/gfxCrashReporterUtils.cpp
gfx/src/nsFont.h
js/jsd/jsd_xpc.cpp
layout/base/FramePropertyTable.h
modules/libjar/nsJARProtocolHandler.h
netwerk/cache/nsCacheEntry.h
netwerk/mime/nsMIMEHeaderParamImpl.cpp
toolkit/components/places/PlaceInfo.h
tools/profiler/JSCustomObjectBuilder.cpp
widget/xpwidgets/GfxDriverInfo.cpp
xpcom/glue/nsHashKeys.h
xpcom/io/nsDirectoryService.h
xpcom/string/public/nsReadableUtils.h
xpcom/string/src/nsReadableUtils.cpp
--- a/content/media/webaudio/MediaBufferDecoder.h
+++ b/content/media/webaudio/MediaBufferDecoder.h
@@ -7,32 +7,32 @@
 #ifndef MediaBufferDecoder_h_
 #define MediaBufferDecoder_h_
 
 #include "nsWrapperCache.h"
 #include "nsCOMPtr.h"
 #include "nsAutoPtr.h"
 #include "nsIThreadPool.h"
 #include "nsString.h"
+#include "nsTArray.h"
 #include "mozilla/dom/TypedArray.h"
 #include <utility>
 
-namespace mozilla
-{
+namespace mozilla {
 
 class MediaDecoderReader;
-namespace dom
-{
+namespace dom {
 class AudioBuffer;
 class AudioContext;
 class DecodeErrorCallback;
 class DecodeSuccessCallback;
 }
 
-struct WebAudioDecodeJob {
+struct WebAudioDecodeJob
+{
   WebAudioDecodeJob(const nsACString& aContentType,
                     const dom::ArrayBuffer& aBuffer,
                     dom::AudioContext* aContext,
                     dom::DecodeSuccessCallback* aSuccessCallback,
                     dom::DecodeErrorCallback* aFailureCallback);
   ~WebAudioDecodeJob();
 
   enum ErrorCode {
--- a/content/xul/document/src/nsXULControllers.h
+++ b/content/xul/document/src/nsXULControllers.h
@@ -8,16 +8,17 @@
   The XUL "controllers" object.
 
 */
 
 #ifndef nsXULControllers_h__
 #define nsXULControllers_h__
 
 #include "nsCOMPtr.h"
+#include "nsTArray.h"
 #include "nsWeakPtr.h"
 #include "nsIControllers.h"
 #include "nsISecurityCheckedComponent.h"
 #include "nsCycleCollectionParticipant.h"
 
 /* non-XPCOM class for holding controllers and their IDs */
 class nsXULControllerData
 {
--- a/dom/audiochannel/AudioChannelService.h
+++ b/dom/audiochannel/AudioChannelService.h
@@ -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/. */
 
 #ifndef mozilla_dom_audiochannelservice_h__
 #define mozilla_dom_audiochannelservice_h__
 
 #include "nsAutoPtr.h"
 #include "nsIObserver.h"
+#include "nsTArray.h"
 
 #include "AudioChannelCommon.h"
 #include "AudioChannelAgent.h"
 #include "nsClassHashtable.h"
 
 namespace mozilla {
 namespace dom {
 
--- a/gfx/gl/GLTextureImage.h
+++ b/gfx/gl/GLTextureImage.h
@@ -3,16 +3,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/. */
 
 #ifndef GLTEXTUREIMAGE_H_
 #define GLTEXTUREIMAGE_H_
 
 #include "nsAutoPtr.h"
 #include "nsRegion.h"
+#include "nsTArray.h"
 #include "gfxASurface.h"
 #include "GLContextTypes.h"
 #include "gfxPattern.h"
 
 namespace mozilla {
 namespace gl {
 class GLContext;
 
--- a/gfx/layers/opengl/LayerManagerOGLProgram.h
+++ b/gfx/layers/opengl/LayerManagerOGLProgram.h
@@ -7,16 +7,17 @@
 #define GFX_LAYERMANAGEROGLPROGRAM_H
 
 #include <string.h>
 
 #include "prenv.h"
 
 #include "nsAutoPtr.h"
 #include "nsString.h"
+#include "nsTArray.h"
 #include "GLContextTypes.h"
 #include "gfx3DMatrix.h"
 #include "gfxColor.h"
 
 namespace mozilla {
 namespace gl {
 class GLContext;
 }
--- a/gfx/src/gfxCrashReporterUtils.cpp
+++ b/gfx/src/gfxCrashReporterUtils.cpp
@@ -7,16 +7,17 @@
 
 #if defined(MOZ_CRASHREPORTER)
 #define MOZ_GFXFEATUREREPORTER 1
 #endif
 
 #ifdef MOZ_GFXFEATUREREPORTER
 #include "nsExceptionHandler.h"
 #include "nsString.h"
+#include "nsTArray.h"
 #include "nsIObserverService.h"
 #include "nsIObserver.h"
 #include "nsAutoPtr.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/Services.h"
 #include "nsThreadUtils.h"
 
 namespace mozilla {
--- a/gfx/src/nsFont.h
+++ b/gfx/src/nsFont.h
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsFont_h___
 #define nsFont_h___
 
 #include "gfxCore.h"
 #include "nsCoord.h"
 #include "nsStringGlue.h"
+#include "nsTArray.h"
 #include "gfxFontConstants.h"
 #include "gfxFontFeatures.h"
 
 // XXX we need a method to enumerate all of the possible fonts on the
 // system across family, weight, style, size, etc. But not here!
 
 // Enumerator callback function. Return false to stop
 typedef bool (*nsFontFamilyEnumFunc)(const nsString& aFamily, bool aGeneric, void *aData);
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -14,16 +14,17 @@
 #include "mozilla/ModuleUtils.h"
 #include "nsIServiceManager.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIObserver.h"
 #include "nsIObserverService.h"
 #include "nsICategoryManager.h"
 #include "nsIJSRuntimeService.h"
 #include "nsIThreadInternal.h"
+#include "nsTArray.h"
 #include "nsThreadUtils.h"
 #include "nsMemory.h"
 #include "jsdebug.h"
 #include "nsReadableUtils.h"
 #include "nsCRT.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/Attributes.h"
 
--- a/layout/base/FramePropertyTable.h
+++ b/layout/base/FramePropertyTable.h
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 20; 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/. */
 
 #ifndef FRAMEPROPERTYTABLE_H_
 #define FRAMEPROPERTYTABLE_H_
 
+#include "nsTArray.h"
 #include "nsTHashtable.h"
 #include "nsHashKeys.h"
 
 class nsIFrame;
 
 namespace mozilla {
 
 struct FramePropertyDescriptor;
--- a/modules/libjar/nsJARProtocolHandler.h
+++ b/modules/libjar/nsJARProtocolHandler.h
@@ -13,16 +13,17 @@
 #include "nsIMIMEService.h"
 #include "nsWeakReference.h"
 #include "nsCOMPtr.h"
 #include "nsClassHashtable.h"
 #include "nsHashKeys.h"
 
 class nsIHashable;
 class nsIRemoteOpenFileListener;
+template<class E, uint32_t N> class nsAutoTArray;
 
 class nsJARProtocolHandler : public nsIJARProtocolHandler
                            , public nsSupportsWeakReference
 {
     typedef nsAutoTArray<nsCOMPtr<nsIRemoteOpenFileListener>, 5>
             RemoteFileListenerArray;
 
 public:
--- a/netwerk/cache/nsCacheEntry.h
+++ b/netwerk/cache/nsCacheEntry.h
@@ -9,16 +9,17 @@
 
 #include "nsICache.h"
 #include "nsICacheEntryDescriptor.h"
 #include "nsIThread.h"
 #include "nsCacheMetaData.h"
 
 #include "nspr.h"
 #include "pldhash.h"
+#include "nsAutoPtr.h"
 #include "nscore.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsAString.h"
 
 class nsCacheDevice;
 class nsCacheMetaData;
 class nsCacheRequest;
--- a/netwerk/mime/nsMIMEHeaderParamImpl.cpp
+++ b/netwerk/mime/nsMIMEHeaderParamImpl.cpp
@@ -7,16 +7,17 @@
 #include <string.h>
 #include "prtypes.h"
 #include "prmem.h"
 #include "prprf.h"
 #include "plstr.h"
 #include "plbase64.h"
 #include "nsCRT.h"
 #include "nsMemory.h"
+#include "nsTArray.h"
 #include "nsCOMPtr.h"
 #include "nsEscape.h"
 #include "nsIUTF8ConverterService.h"
 #include "nsUConvCID.h"
 #include "nsIServiceManager.h"
 #include "nsMIMEHeaderParamImpl.h"
 #include "nsReadableUtils.h"
 #include "nsNativeCharsetUtils.h"
--- a/toolkit/components/places/PlaceInfo.h
+++ b/toolkit/components/places/PlaceInfo.h
@@ -2,16 +2,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/. */
 
 #ifndef mozilla_places_PlaceInfo_h__
 #define mozilla_places_PlaceInfo_h__
 
 #include "mozIAsyncHistory.h"
 #include "nsString.h"
+#include "nsTArray.h"
 #include "nsAutoPtr.h"
 #include "mozilla/Attributes.h"
 
 class nsIURI;
 class mozIVisitInfo;
 
 namespace mozilla {
 namespace places {
--- a/tools/profiler/JSCustomObjectBuilder.cpp
+++ b/tools/profiler/JSCustomObjectBuilder.cpp
@@ -1,16 +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 "JSCustomObjectBuilder.h"
+
+#include "nsDataHashtable.h"
 #include "nsStringGlue.h"
-#include "nsDataHashtable.h"
+#include "nsTArray.h"
 #include "nsUTF8Utils.h"
 
 #if _MSC_VER
  #define snprintf _snprintf
 #endif
 
 // These are owned and deleted by JSCustomObject
 struct PropertyValue {
--- a/widget/xpwidgets/GfxDriverInfo.cpp
+++ b/widget/xpwidgets/GfxDriverInfo.cpp
@@ -1,15 +1,17 @@
 /* -*- 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 "GfxDriverInfo.h"
+
 #include "nsIGfxInfo.h"
+#include "nsTArray.h"
 
 using namespace mozilla::widget;
 
 int32_t GfxDriverInfo::allFeatures = 0;
 uint64_t GfxDriverInfo::allDriverVersions = ~(uint64_t(0));
 GfxDeviceFamily* const GfxDriverInfo::allDevices = nullptr;
 
 GfxDeviceFamily* GfxDriverInfo::mDeviceFamilies[DeviceFamilyMax];
--- a/xpcom/glue/nsHashKeys.h
+++ b/xpcom/glue/nsHashKeys.h
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsTHashKeys_h__
 #define nsTHashKeys_h__
 
 #include "nsID.h"
 #include "nsISupports.h"
 #include "nsIHashable.h"
+#include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "pldhash.h"
 #include NEW_H
 
 #include "nsStringGlue.h"
 #include "nsCRTGlue.h"
 #include "nsUnicharUtils.h"
 
--- a/xpcom/io/nsDirectoryService.h
+++ b/xpcom/io/nsDirectoryService.h
@@ -6,16 +6,17 @@
 #ifndef nsDirectoryService_h___
 #define nsDirectoryService_h___
 
 #include "nsIDirectoryService.h"
 #include "nsHashtable.h"
 #include "nsIFile.h"
 #include "nsISupportsArray.h"
 #include "nsIAtom.h"
+#include "nsTArray.h"
 #include "mozilla/Attributes.h"
 
 #define NS_XPCOM_INIT_CURRENT_PROCESS_DIR       "MozBinD"   // Can be used to set NS_XPCOM_CURRENT_PROCESS_DIR
                                                             // CANNOT be used to GET a location
 #define NS_DIRECTORY_SERVICE_CID  {0xf00152d0,0xb40b,0x11d3,{0x8c, 0x9c, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74}}
 
 class nsDirectoryService MOZ_FINAL : public nsIDirectoryService,
                                      public nsIProperties,
--- a/xpcom/string/public/nsReadableUtils.h
+++ b/xpcom/string/public/nsReadableUtils.h
@@ -9,17 +9,18 @@
   /**
    * I guess all the routines in this file are all mis-named.
    * According to our conventions, they should be |NS_xxx|.
    */
 
 #ifndef nsAString_h___
 #include "nsAString.h"
 #endif
-#include "nsTArray.h"
+
+template<class E> class nsTArray;
 
 inline size_t Distance( const nsReadingIterator<PRUnichar>& start, const nsReadingIterator<PRUnichar>& end )
   {
     return end.get() - start.get();
   }
 inline size_t Distance( const nsReadingIterator<char>& start, const nsReadingIterator<char>& end )
   {
     return end.get() - start.get();
--- a/xpcom/string/src/nsReadableUtils.cpp
+++ b/xpcom/string/src/nsReadableUtils.cpp
@@ -1,16 +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 "nsReadableUtils.h"
+
 #include "nsMemory.h"
 #include "nsString.h"
+#include "nsTArray.h"
 #include "nsUTF8Utils.h"
 
 void
 LossyCopyUTF16toASCII( const nsAString& aSource, nsACString& aDest )
   {
     aDest.Truncate();
     LossyAppendUTF16toASCII(aSource, aDest);
   }