Bug 981150: Use nsTArrayForwardDeclare.h more. r=ehsan
authorKyle Huey <khuey@kylehuey.com>
Sat, 15 Mar 2014 12:00:17 -0700
changeset 190967 128a9757865e741d92d9a5e6143e207b0a560b41
parent 190966 a07dde918187f3c244d412917144872e1a349cf3
child 190968 1123c64bca9ee646173261434e46bde88b26454a
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs981150
milestone30.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 981150: Use nsTArrayForwardDeclare.h more. r=ehsan
content/base/public/nsContentUtils.h
content/html/content/public/nsIHTMLCollection.h
content/media/AudioChannelFormat.h
content/svg/content/src/nsSVGPathGeometryElement.h
gfx/layers/composite/APZCTreeManager.h
layout/generic/nsFlexContainerFrame.h
layout/generic/nsFrameList.h
layout/generic/nsVideoFrame.h
layout/style/nsStyleUtil.h
netwerk/protocol/http/HttpInfo.h
netwerk/streamconv/src/nsStreamConverterService.h
xpcom/ds/nsStringEnumerator.h
xpcom/string/public/nsReadableUtils.h
--- a/content/base/public/nsContentUtils.h
+++ b/content/base/public/nsContentUtils.h
@@ -20,16 +20,17 @@
 #include "js/TypeDecls.h"
 #include "js/Value.h"
 #include "js/RootingAPI.h"
 #include "mozilla/EventForwards.h"
 #include "mozilla/GuardObjects.h"
 #include "mozilla/TimeStamp.h"
 #include "nsContentListDeclarations.h"
 #include "nsMathUtils.h"
+#include "nsTArrayForwardDeclare.h"
 #include "Units.h"
 
 #if defined(XP_WIN)
 // Undefine LoadImage to prevent naming conflict with Windows.
 #undef LoadImage
 #endif
 
 class imgICache;
@@ -97,17 +98,16 @@ class nsViewportInfo;
 class nsWrapperCache;
 class nsAttrValue;
 
 struct JSPropertyDescriptor;
 struct JSRuntime;
 struct nsIntMargin;
 
 template<class E> class nsCOMArray;
-template<class E> class nsTArray;
 template<class K, class V> class nsDataHashtable;
 template<class K, class V> class nsRefPtrHashtable;
 template<class T> class nsReadingIterator;
 
 namespace mozilla {
 class ErrorResult;
 class Selection;
 
--- a/content/html/content/public/nsIHTMLCollection.h
+++ b/content/html/content/public/nsIHTMLCollection.h
@@ -2,22 +2,22 @@
 /* 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 nsIHTMLCollection_h___
 #define nsIHTMLCollection_h___
 
 #include "nsIDOMHTMLCollection.h"
+#include "nsTArrayForwardDeclare.h"
 #include "nsWrapperCache.h"
 #include "js/TypeDecls.h"
 
 class nsINode;
 class nsString;
-template<class> class nsTArray;
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 class Element;
 } // namespace dom
 } // namespace mozilla
--- a/content/media/AudioChannelFormat.h
+++ b/content/media/AudioChannelFormat.h
@@ -3,18 +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/. */
 #ifndef MOZILLA_AUDIOCHANNELFORMAT_H_
 #define MOZILLA_AUDIOCHANNELFORMAT_H_
 
 #include <stdint.h>
 
-template <class T>
-class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 
 namespace mozilla {
 
 /*
  * This file provides utilities for upmixing and downmixing channels.
  *
  * The channel layouts, upmixing and downmixing are consistent with the
  * Web Audio spec.
--- a/content/svg/content/src/nsSVGPathGeometryElement.h
+++ b/content/svg/content/src/nsSVGPathGeometryElement.h
@@ -5,17 +5,16 @@
 
 #ifndef __NS_SVGPATHGEOMETRYELEMENT_H__
 #define __NS_SVGPATHGEOMETRYELEMENT_H__
 
 #include "mozilla/gfx/2D.h"
 #include "SVGGraphicsElement.h"
 
 struct gfxMatrix;
-template <class E> class nsTArray;
 
 struct nsSVGMark {
   enum Type {
     eStart,
     eMid,
     eEnd,
 
     eTypeCount
--- a/gfx/layers/composite/APZCTreeManager.h
+++ b/gfx/layers/composite/APZCTreeManager.h
@@ -13,21 +13,20 @@
 #include "gfx3DMatrix.h"                // for gfx3DMatrix
 #include "mozilla/Assertions.h"         // for MOZ_ASSERT_HELPER2
 #include "mozilla/EventForwards.h"      // for WidgetInputEvent, nsEventStatus
 #include "mozilla/Monitor.h"            // for Monitor
 #include "nsAutoPtr.h"                  // for nsRefPtr
 #include "nsCOMPtr.h"                   // for already_AddRefed
 #include "nsISupportsImpl.h"            // for MOZ_COUNT_CTOR, etc
 #include "mozilla/Vector.h"             // for mozilla::Vector
-#include "nsTArray.h"                   // for nsTArray, nsTArray_Impl, etc
+#include "nsTArrayForwardDeclare.h"     // for nsTArray, nsTArray_Impl, etc
 #include "mozilla/gfx/Logging.h"        // for gfx::TreeLog
 
 class gfx3DMatrix;
-template <class E> class nsTArray;
 
 namespace mozilla {
 class InputData;
 
 namespace layers {
 
 enum AllowedTouchBehavior {
   NONE =               0,
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -6,24 +6,23 @@
  * http://mozilla.org/MPL/2.0/. */
 
 /* rendering object for CSS "display: flex" */
 
 #ifndef nsFlexContainerFrame_h___
 #define nsFlexContainerFrame_h___
 
 #include "nsContainerFrame.h"
+#include "nsTArrayForwardDeclare.h"
 
 nsIFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
                                    nsStyleContext* aContext);
 
 typedef nsContainerFrame nsFlexContainerFrameSuper;
 
-template <class T> class nsTArray;
-
 class nsFlexContainerFrame : public nsFlexContainerFrameSuper {
 public:
   NS_DECL_FRAMEARENA_HELPERS
   NS_DECL_QUERYFRAME_TARGET(nsFlexContainerFrame)
   NS_DECL_QUERYFRAME
 
   // Factory method:
   friend nsIFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
--- a/layout/generic/nsFrameList.h
+++ b/layout/generic/nsFrameList.h
@@ -3,27 +3,27 @@
  * 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 nsFrameList_h___
 #define nsFrameList_h___
 
 #include <stdio.h> /* for FILE* */
 #include "nsDebug.h"
+#include "nsTArrayForwardDeclare.h"
 
 #if defined(DEBUG) || defined(MOZ_DUMP_PAINTING)
 // DEBUG_FRAME_DUMP enables nsIFrame::List and related methods.
 // You can also define this in a non-DEBUG build if you need frame dumps.
 #define DEBUG_FRAME_DUMP 1
 #endif
 
 class nsIFrame;
 class nsIPresShell;
 class nsPresContext;
-template <class T> class nsTArray;
 
 namespace mozilla {
 namespace layout {
   class FrameChildList;
   enum FrameChildListID {
       // The individual concrete child lists.
       kPrincipalList                = 0x1,
       kPopupList                    = 0x2,
--- a/layout/generic/nsVideoFrame.h
+++ b/layout/generic/nsVideoFrame.h
@@ -7,29 +7,29 @@
 /* rendering object for the HTML <video> element */
 
 #ifndef nsVideoFrame_h___
 #define nsVideoFrame_h___
 
 #include "mozilla/Attributes.h"
 #include "nsContainerFrame.h"
 #include "nsIAnonymousContentCreator.h"
+#include "nsTArrayForwardDeclare.h"
 #include "FrameLayerBuilder.h"
 
 namespace mozilla {
 namespace layers {
 class Layer;
 class LayerManager;
 }
 }
 
 class nsAString;
 class nsPresContext;
 class nsDisplayItem;
-template <class T> class nsTArray;
 
 nsIFrame* NS_NewVideoFrame (nsIPresShell* aPresShell, nsStyleContext* aContext);
 
 class nsVideoFrame : public nsContainerFrame, public nsIAnonymousContentCreator
 {
 public:
   typedef mozilla::layers::Layer Layer;
   typedef mozilla::layers::LayerManager LayerManager;
--- a/layout/style/nsStyleUtil.h
+++ b/layout/style/nsStyleUtil.h
@@ -3,27 +3,27 @@
  * 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 nsStyleUtil_h___
 #define nsStyleUtil_h___
 
 #include "nsCoord.h"
 #include "nsCSSProperty.h"
 #include "nsString.h"
+#include "nsTArrayForwardDeclare.h"
 
 class nsCSSValue;
 class nsStringComparator;
 class nsStyleCoord;
 class nsIContent;
 class nsIPrincipal;
 class nsIURI;
 struct gfxFontFeature;
 struct gfxAlternateValue;
 class nsCSSValueList;
-template <class E> class nsTArray;
 
 // Style utility functions
 class nsStyleUtil {
 public:
 
  static bool DashMatchCompare(const nsAString& aAttributeValue,
                                 const nsAString& aSelectorValue,
                                 const nsStringComparator& aComparator);
--- a/netwerk/protocol/http/HttpInfo.h
+++ b/netwerk/protocol/http/HttpInfo.h
@@ -1,16 +1,16 @@
 /* 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 nsHttpInfo__
 #define nsHttpInfo__
 
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 
 namespace mozilla {
 namespace net {
 
 struct HttpRetParams;
 
 class HttpInfo
 {
--- a/netwerk/streamconv/src/nsStreamConverterService.h
+++ b/netwerk/streamconv/src/nsStreamConverterService.h
@@ -3,17 +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/. */
 
 #ifndef __nsstreamconverterservice__h___
 #define __nsstreamconverterservice__h___
 
 #include "nsIStreamConverterService.h"
 
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
+
 class nsObjectHashtable;
 class nsCString;
 
 class nsStreamConverterService : public nsIStreamConverterService {
 public:    
     /////////////////////////////////////////////////////
     // nsISupports methods
     NS_DECL_ISUPPORTS
--- a/xpcom/ds/nsStringEnumerator.h
+++ b/xpcom/ds/nsStringEnumerator.h
@@ -1,17 +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 "nsIStringEnumerator.h"
 #include "nsStringFwd.h"
-
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 
 // nsIStringEnumerator/nsIUTF8StringEnumerator implementations
 //
 // Currently all implementations support both interfaces. The
 // constructors below provide the most common interface for the given
 // type (i.e. nsIStringEnumerator for char16_t* strings, and so
 // forth) but any resulting enumerators can be queried to the other
 // type. Internally, the enumerators will hold onto the type that was
--- a/xpcom/string/public/nsReadableUtils.h
+++ b/xpcom/string/public/nsReadableUtils.h
@@ -11,17 +11,17 @@
    * 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
 
-template<class E> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 
 inline size_t Distance( const nsReadingIterator<char16_t>& start, const nsReadingIterator<char16_t>& end )
   {
     return end.get() - start.get();
   }
 inline size_t Distance( const nsReadingIterator<char>& start, const nsReadingIterator<char>& end )
   {
     return end.get() - start.get();