michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/ michael@0: /* vim: set ts=2 sw=2 et tw=79: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_NonRefcountedDOMObject_h__ michael@0: #define mozilla_dom_NonRefcountedDOMObject_h__ michael@0: michael@0: #include "nsISupportsImpl.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: // Natives for DOM classes with 'owned' as the value for nativeOwnership in michael@0: // Bindings.conf need to inherit from this class. michael@0: // If you're seeing objects of this class leak then natives for one of the DOM michael@0: // classes with 'owned' as the value for nativeOwnership in Bindings.conf is michael@0: // leaking. If the native for that class has MOZ_COUNT_CTOR/DTOR in its michael@0: // constructor/destructor then it should show up in the leak log too. michael@0: class NonRefcountedDOMObject michael@0: { michael@0: protected: michael@0: NonRefcountedDOMObject() michael@0: { michael@0: MOZ_COUNT_CTOR(NonRefcountedDOMObject); michael@0: } michael@0: ~NonRefcountedDOMObject() michael@0: { michael@0: MOZ_COUNT_DTOR(NonRefcountedDOMObject); michael@0: } michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif /* mozilla_dom_NonRefcountedDOMObject_h__ */