dom/base/nsISizeOfEventTarget.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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