dom/base/nsISizeOfEventTarget.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef nsISizeOfEventTarget_h___
     8 #define nsISizeOfEventTarget_h___
    10 #include "mozilla/MemoryReporting.h"
    11 #include "nsISupports.h"
    13 #define NS_ISIZEOFEVENTTARGET_IID \
    14   {0xa1e08cb9, 0x5455, 0x4593, \
    15     { 0xb4, 0x1f, 0x38, 0x7a, 0x85, 0x44, 0xd0, 0xb5 }}
    17 /**
    18  * This class is much the same as nsISizeOf, but is specifically for measuring
    19  * the contents of nsGlobalWindow::mEventTargetObjects.
    20  *
    21  * We don't use nsISizeOf because if we did, any object belonging to
    22  * mEventTargetObjects that implements nsISizeOf would be measured, which we
    23  * may not want (perhaps because the object is also measured elsewhere).
    24  */
    25 class nsISizeOfEventTarget : public nsISupports
    26 {
    27 public:
    28   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISIZEOFEVENTTARGET_IID)
    30   /**
    31    * Measures the size of the things pointed to by the object, plus the object
    32    * itself.
    33    */
    34   virtual size_t
    35     SizeOfEventTargetIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
    36 };
    38 NS_DEFINE_STATIC_IID_ACCESSOR(nsISizeOfEventTarget, NS_ISIZEOFEVENTTARGET_IID)
    40 #endif /* nsISizeOfEventTarget_h___ */

mercurial