Bug 1288077: Forward declare arrays by including 'nsTArrayForwardDeclare.h', r=froydnj
authorThomas Zimmermann <tdz@users.sourceforge.net>
Wed, 20 Jul 2016 17:29:36 +0200
changeset 345949 73c97e5ff2f867d01e4b4c6700637b60a498e5c7
parent 345948 3158fb3b7e2327a57547b203b20a57e654ccce77
child 345950 156883ff3dda507bfad949979fdf0d657c4a553e
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1288077
milestone50.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 1288077: Forward declare arrays by including 'nsTArrayForwardDeclare.h', r=froydnj MozReview-Commit-ID: 4RBeHDyhQgr
dom/base/nsISelectionPrivate.idl
dom/filehandle/ActorsParent.h
dom/network/interfaces/nsITCPSocketCallback.idl
gfx/thebes/gfxContext.h
ipc/glue/nsIIPCSerializableInputStream.h
layout/svg/nsCSSFilterInstance.h
netwerk/dns/nsIDNSRecord.idl
netwerk/dns/nsIDNSService.idl
netwerk/protocol/http/nsIHttpChannelInternal.idl
netwerk/socket/nsISSLSocketControl.idl
security/manager/ssl/nsISiteSecurityService.idl
tools/profiler/gecko/nsIProfiler.idl
tools/profiler/tasktracer/GeckoTaskTracer.h
xpcom/tests/gtest/Helpers.h
--- a/dom/base/nsISelectionPrivate.idl
+++ b/dom/base/nsISelectionPrivate.idl
@@ -10,19 +10,19 @@ interface nsIDOMNode;
 interface nsISelectionListener;
 interface nsIContent;
 interface nsINode;
 
 %{C++
 class nsIFrame;
 struct nsPoint;
 struct ScrollAxis;
-template<class T> class nsTArray;
 #include "nsDirection.h"
 #include "nsIPresShell.h" // TODO: Remove this include
+#include "nsTArrayForwardDeclare.h"
 #include "mozilla/EventForwards.h"
 %}
 
 [ptr] native nsIFrame(nsIFrame);
 [ptr] native RangeArray(nsTArray<nsRange*>);
 [ref] native constTextRangeStyleRef(const mozilla::TextRangeStyle);
 [ref] native nsPointRef(nsPoint);
 native nsDirection(nsDirection);
--- a/dom/filehandle/ActorsParent.h
+++ b/dom/filehandle/ActorsParent.h
@@ -8,23 +8,23 @@
 #include "mozilla/dom/FileHandleStorage.h"
 #include "mozilla/dom/PBackgroundMutableFileParent.h"
 #include "mozilla/ipc/BackgroundParent.h"
 #include "nsAutoPtr.h"
 #include "nsClassHashtable.h"
 #include "nsCOMPtr.h"
 #include "nsHashKeys.h"
 #include "nsString.h"
+#include "nsTArrayForwardDeclare.h"
 #include "nsTHashtable.h"
 
 template <class> struct already_AddRefed;
 class nsIFile;
 class nsIRunnable;
 class nsIThreadPool;
-template <class> class nsTArray;
 
 namespace mozilla {
 
 namespace ipc {
 
 class PBackgroundParent;
 
 } // namespace ipc
--- a/dom/network/interfaces/nsITCPSocketCallback.idl
+++ b/dom/network/interfaces/nsITCPSocketCallback.idl
@@ -7,17 +7,17 @@
  * to highly privileged apps. It provides a buffered, non-blocking
  * interface for sending. For receiving, it uses an asynchronous,
  * event handler based interface.
  */
 
 #include "domstubs.idl"
 
 %{C++
-template<class T> class InfallibleTArray;
+#include "nsTArrayForwardDeclare.h"
 %}
 [ref] native nsUint8TArrayRef(InfallibleTArray<uint8_t>);
 [ptr] native JSContextPtr(JSContext);
 
 
 /*
  * This interface is implemented in TCPSocket.cpp as an internal interface
  * for use in cross-process socket implementation.
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -14,17 +14,16 @@
 #include "gfxMatrix.h"
 #include "gfxPattern.h"
 #include "nsTArray.h"
 
 #include "mozilla/gfx/2D.h"
 
 typedef struct _cairo cairo_t;
 class GlyphBufferAzure;
-template <typename T> class FallibleTArray;
 
 namespace mozilla {
 namespace gfx {
 struct RectCornerRadii;
 } // namespace gfx
 } // namespace mozilla
 
 class ClipExporter;
--- a/ipc/glue/nsIIPCSerializableInputStream.h
+++ b/ipc/glue/nsIIPCSerializableInputStream.h
@@ -2,20 +2,19 @@
 /* vim: set ts=8 sts=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/. */
 
 #ifndef mozilla_ipc_nsIIPCSerializableInputStream_h
 #define mozilla_ipc_nsIIPCSerializableInputStream_h
 
+#include "mozilla/Attributes.h"
 #include "nsISupports.h"
-#include "mozilla/Attributes.h"
-
-template <class> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 
 namespace mozilla {
 namespace ipc {
 
 class FileDescriptor;
 class InputStreamParams;
 
 } // namespace ipc
--- a/layout/svg/nsCSSFilterInstance.h
+++ b/layout/svg/nsCSSFilterInstance.h
@@ -7,19 +7,19 @@
 #define __NS_CSSFILTERINSTANCE_H__
 
 #include "FilterSupport.h"
 #include "gfxMatrix.h"
 #include "gfxRect.h"
 #include "mozilla/gfx/Point.h"
 #include "mozilla/gfx/Types.h"
 #include "nsColor.h"
+#include "nsTArrayForwardDeclare.h"
 
 struct nsStyleFilter;
-template<class T> class nsTArray;
 
 /**
  * This class helps nsFilterInstance build its filter graph. It turns a CSS
  * filter function (e.g. blur(3px)) from the style system into a
  * FilterPrimitiveDescription connected to the filter graph.
  */
 class nsCSSFilterInstance
 {
--- a/netwerk/dns/nsIDNSRecord.idl
+++ b/netwerk/dns/nsIDNSRecord.idl
@@ -5,17 +5,17 @@
 #include "nsISupports.idl"
 
 %{ C++
 namespace mozilla {
 namespace net {
 union NetAddr;
 }
 }
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 %}
 native NetAddr(mozilla::net::NetAddr);
 [ref] native nsNetAddrTArrayRef(nsTArray<mozilla::net::NetAddr>);
 interface nsINetAddr;
 
 /**
  * nsIDNSRecord
  *
--- a/netwerk/dns/nsIDNSService.idl
+++ b/netwerk/dns/nsIDNSService.idl
@@ -5,17 +5,17 @@
 #include "nsISupports.idl"
 
 interface nsICancelable;
 interface nsIEventTarget;
 interface nsIDNSRecord;
 interface nsIDNSListener;
 
 %{C++
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 namespace mozilla { namespace net {
     struct DNSCacheEntries;
 } }
 %}
 
 [ptr] native EntriesArray(nsTArray<mozilla::net::DNSCacheEntries>);
 
 /**
--- a/netwerk/protocol/http/nsIHttpChannelInternal.idl
+++ b/netwerk/protocol/http/nsIHttpChannelInternal.idl
@@ -1,17 +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"
 
 %{C++
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 template<class T> class nsCOMArray;
 class nsCString;
 %}
 [ptr] native StringArray(nsTArray<nsCString>);
 [ref] native StringArrayRef(const nsTArray<nsCString>);
 [ref] native securityMessagesArray(nsCOMArray<nsISecurityConsoleMessage>);
 
 interface nsIAsyncInputStream;
--- a/netwerk/socket/nsISSLSocketControl.idl
+++ b/netwerk/socket/nsISSLSocketControl.idl
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIInterfaceRequestor;
 interface nsIX509Cert;
 
 %{C++
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 class nsCString;
 %}
 [ref] native nsCStringTArrayRef(nsTArray<nsCString>);
 
 [scriptable, builtinclass, uuid(418265c8-654e-4fbb-ba62-4eed27de1f03)]
 interface nsISSLSocketControl : nsISupports {
     attribute nsIInterfaceRequestor     notificationCallbacks;
 
--- a/security/manager/ssl/nsISiteSecurityService.idl
+++ b/security/manager/ssl/nsISiteSecurityService.idl
@@ -5,17 +5,17 @@
 #include "nsISupports.idl"
 
 interface nsIURI;
 interface nsIObserver;
 interface nsIHttpChannel;
 interface nsISSLStatus;
 
 %{C++
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 class nsCString;
 namespace mozilla
 {
   namespace pkix
   {
     class Time;
   }
 }
--- a/tools/profiler/gecko/nsIProfiler.idl
+++ b/tools/profiler/gecko/nsIProfiler.idl
@@ -1,17 +1,17 @@
 /* -*- 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"
 
 %{C++
-template<class T> class nsTArray;
+#include "nsTArrayForwardDeclare.h"
 class nsCString;
 %}
 
 [ref] native StringArrayRef(const nsTArray<nsCString>);
 
 /**
  * Start-up parameters for subprocesses are passed through nsIObserverService,
  * which, unfortunately, means we need to implement nsISupports in order to
--- a/tools/profiler/tasktracer/GeckoTaskTracer.h
+++ b/tools/profiler/tasktracer/GeckoTaskTracer.h
@@ -2,18 +2,19 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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 GECKO_TASK_TRACER_H
 #define GECKO_TASK_TRACER_H
 
+#include "mozilla/UniquePtr.h"
 #include "nsCOMPtr.h"
-#include "mozilla/UniquePtr.h"
+#include "nsTArrayForwardDeclare.h"
 
 /**
  * TaskTracer provides a way to trace the correlation between different tasks
  * across threads and processes. Unlike sampling based profilers, TaskTracer can
  * tell you where a task is dispatched from, what its original source was, how
  * long it waited in the event queue, and how long it took to execute.
  *
  * Source Events are usually some kinds of I/O events we're interested in, such
@@ -22,17 +23,16 @@
  * are dispatched to different threads and processes. It records latency,
  * execution time, etc. for each Task and nsRunnable that chains back to the
  * original source event.
  */
 
 class Task;
 class nsIRunnable;
 class nsCString;
-template <class> class nsTArray;
 
 namespace mozilla {
 
 class TimeStamp;
 
 namespace tasktracer {
 
 enum {
--- a/xpcom/tests/gtest/Helpers.h
+++ b/xpcom/tests/gtest/Helpers.h
@@ -5,21 +5,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __Helpers_h
 #define __Helpers_h
 
 #include "nsIAsyncInputStream.h"
 #include "nsIAsyncOutputStream.h"
 #include "nsString.h"
+#include "nsTArrayForwardDeclare.h"
 #include <stdint.h>
 
 class nsIInputStream;
 class nsIOutputStream;
-template <class T> class nsTArray;
 
 namespace testing {
 
 void
 CreateData(uint32_t aNumBytes, nsTArray<char>& aDataOut);
 
 void
 Write(nsIOutputStream* aStream, const nsTArray<char>& aData, uint32_t aOffset,