Bug 978203 - Don't include nsWindowMemoryReporter.h in nsINode.h. r=smaug

This commit is contained in:
Andrew McCreight 2014-03-04 15:39:42 -08:00
parent 1a0a33b627
commit f1377bba28
13 changed files with 20 additions and 9 deletions

View File

@ -19,6 +19,7 @@
#include "nsPIDOMWindow.h" // for use in inline functions
#include "nsPropertyTable.h" // for member
#include "nsTHashtable.h" // for member
#include "nsWeakReference.h"
#include "mozilla/dom/DocumentBinding.h"
#include "mozilla/WeakPtr.h"
#include "Units.h"

View File

@ -15,7 +15,6 @@
#include "nsNodeInfoManager.h" // for use in NodePrincipal()
#include "nsPropertyTable.h" // for typedefs
#include "nsTObserverArray.h" // for member
#include "nsWindowMemoryReporter.h" // for NS_DECL_SIZEOF_EXCLUDING_THIS
#include "mozilla/ErrorResult.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/EventTarget.h" // for base class
@ -244,13 +243,21 @@ private:
// ever passed to Mutated().
enum { eMaxMutations = 300 };
// sMutationCount is a global mutation counter which is decreased by one at
// every mutation. It is capped at 0 to avoid wrapping.
// Its value is always between 0 and 300, inclusive.
static uint32_t sMutationCount;
};
// This should be used for any nsINode sub-class that has fields of its own
// that it needs to measure; any sub-class that doesn't use it will inherit
// SizeOfExcludingThis from its super-class. SizeOfIncludingThis() need not be
// defined, it is inherited from nsINode.
// This macro isn't actually specific to nodes, and bug 956400 will move it into MFBT.
#define NS_DECL_SIZEOF_EXCLUDING_THIS \
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
// Categories of node properties
// 0 is global.
#define DOM_USER_DATA 1

View File

@ -221,6 +221,7 @@
#include "nsIMutableArray.h"
#include "nsContentPermissionHelper.h"
#include "mozilla/dom/DOMStringList.h"
#include "nsWindowMemoryReporter.h"
using namespace mozilla;
using namespace mozilla::dom;

View File

@ -23,6 +23,7 @@
#include "nsIXULRuntime.h"
#include "nsIScriptError.h"
#include "nsIConsoleService.h"
#include "nsIMemoryReporter.h"
#include "nsIProtocolHandler.h"
#include "nsIScriptSecurityManager.h"
#include "nsIJSRuntimeService.h"

View File

@ -12,6 +12,7 @@
#include "nsError.h"
#include "nsSVGAnimatedTransformList.h"
#include "nsSVGAttrTearoffTable.h"
#include "mozilla/DebugOnly.h"
namespace {
const double kRadPerDegree = 2.0 * M_PI / 360.0;

View File

@ -35,6 +35,7 @@
#include "nsIScriptTimeoutHandler.h"
#include "nsIController.h"
#include "nsScriptNameSpaceManager.h"
#include "nsWindowMemoryReporter.h"
// Helper Classes
#include "nsJSUtils.h"

View File

@ -19,13 +19,6 @@
#include "mozilla/TimeStamp.h"
#include "nsArenaMemoryStats.h"
// This should be used for any nsINode sub-class that has fields of its own
// that it needs to measure; any sub-class that doesn't use it will inherit
// SizeOfExcludingThis from its super-class. SizeOfIncludingThis() need not be
// defined, it is inherited from nsINode.
#define NS_DECL_SIZEOF_EXCLUDING_THIS \
virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
class nsWindowSizes {
#define FOR_EACH_SIZE(macro) \
macro(DOM, mDOMElementNodesSize) \

View File

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "IMETextTxn.h"
#include "mozilla/DebugOnly.h" // for DebugOnly
#include "mozilla/mozalloc.h" // for operator new
#include "mozilla/TextEvents.h" // for TextRangeStyle
#include "nsAString.h" // for nsAString_internal::Length, etc

View File

@ -15,6 +15,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/RefPtr.h"
#include "mozilla/StaticPtr.h"
#include "nsIMemoryReporter.h"
#include "gfx2DGlue.h"
#include "gfxASurface.h"
#include "gfxPattern.h" // Workaround for flaw in bug 921753 part 2.

View File

@ -26,6 +26,7 @@
#include "nsZipArchive.h"
#include "nsIDOMFile.h"
#include "nsIDOMFileList.h"
#include "nsWindowMemoryReporter.h"
using namespace mozilla;
using namespace JS;

View File

@ -82,6 +82,7 @@
#include "mozilla/GuardObjects.h"
#include "mozilla/Maybe.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/TimeStamp.h"
#include <math.h>
#include <stdint.h>

View File

@ -113,6 +113,7 @@
#include "SVGContentUtils.h"
#include "nsSVGEffects.h"
#include "SVGFragmentIdentifier.h"
#include "nsArenaMemoryStats.h"
#include "nsPerformance.h"
#include "nsRefreshDriver.h"

View File

@ -17,6 +17,7 @@
#include "nsPoint.h"
#include "nsCOMPtr.h"
#include "nsTArray.h"
#include "nsIObserver.h"
#include "nsITimer.h"
#include "nsIReflowCallback.h"
#include "nsThreadUtils.h"