Bug 1142717, part 4 - Add MOZ_COUNT_CTOR/DTOR for XPCWrappedNativeTearOff. r=bholley

This commit is contained in:
Andrew McCreight 2015-03-18 11:36:03 -07:00
parent f66e0a7b52
commit 57d42f4866
2 changed files with 5 additions and 1 deletions

View File

@ -521,6 +521,7 @@ void XPCWrappedNativeTearOff::JSObjectMoved(JSObject *obj, const JSObject *old)
inline
XPCWrappedNativeTearOff::~XPCWrappedNativeTearOff()
{
MOZ_COUNT_DTOR(XPCWrappedNativeTearOff);
MOZ_ASSERT(!(GetInterface() || GetNative() || GetJSObjectPreserveColor()),
"tearoff not empty in dtor");
}

View File

@ -1961,7 +1961,10 @@ public:
void JSObjectMoved(JSObject *obj, const JSObject *old);
XPCWrappedNativeTearOff()
: mInterface(nullptr), mJSObject(nullptr) {}
: mInterface(nullptr), mJSObject(nullptr)
{
MOZ_COUNT_CTOR(XPCWrappedNativeTearOff);
}
~XPCWrappedNativeTearOff();
// NOP. This is just here to make the AutoMarkingPtr code compile.