gecko-dev/dom/bindings/NonRefcountedDOMObject.h
Carsten "Tomcat" Book b8dd41d84c Backed out 12 changesets (bug 1096328) for M11 and M5 Test failures on a CLOSED TREE
Backed out changeset 12dd1ad43923 (bug 1096328)
Backed out changeset 4a067de94f22 (bug 1096328)
Backed out changeset 676112a4f092 (bug 1096328)
Backed out changeset e2e64e751ece (bug 1096328)
Backed out changeset 9ed945e9a8a5 (bug 1096328)
Backed out changeset 47be69b84be5 (bug 1096328)
Backed out changeset d6e68ba4846d (bug 1096328)
Backed out changeset 899d8cd8c4e8 (bug 1096328)
Backed out changeset 55c831086864 (bug 1096328)
Backed out changeset 6005fd357342 (bug 1096328)
Backed out changeset 0f330a5dd346 (bug 1096328)
Backed out changeset c37e10cff765 (bug 1096328)
2015-01-12 14:48:15 +01:00

38 lines
1.2 KiB
C++

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