dom/base/nsISizeOfEventTarget.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/base/nsISizeOfEventTarget.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=8 sts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef nsISizeOfEventTarget_h___
    1.11 +#define nsISizeOfEventTarget_h___
    1.12 +
    1.13 +#include "mozilla/MemoryReporting.h"
    1.14 +#include "nsISupports.h"
    1.15 +
    1.16 +#define NS_ISIZEOFEVENTTARGET_IID \
    1.17 +  {0xa1e08cb9, 0x5455, 0x4593, \
    1.18 +    { 0xb4, 0x1f, 0x38, 0x7a, 0x85, 0x44, 0xd0, 0xb5 }}
    1.19 +
    1.20 +/**
    1.21 + * This class is much the same as nsISizeOf, but is specifically for measuring
    1.22 + * the contents of nsGlobalWindow::mEventTargetObjects.
    1.23 + *
    1.24 + * We don't use nsISizeOf because if we did, any object belonging to
    1.25 + * mEventTargetObjects that implements nsISizeOf would be measured, which we
    1.26 + * may not want (perhaps because the object is also measured elsewhere).
    1.27 + */
    1.28 +class nsISizeOfEventTarget : public nsISupports
    1.29 +{
    1.30 +public:
    1.31 +  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISIZEOFEVENTTARGET_IID)
    1.32 +
    1.33 +  /**
    1.34 +   * Measures the size of the things pointed to by the object, plus the object
    1.35 +   * itself.
    1.36 +   */
    1.37 +  virtual size_t
    1.38 +    SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
    1.39 +};
    1.40 +
    1.41 +NS_DEFINE_STATIC_IID_ACCESSOR(nsISizeOfEventTarget, NS_ISIZEOFEVENTTARGET_IID)
    1.42 +
    1.43 +#endif /* nsISizeOfEventTarget_h___ */

mercurial