diff --git a/js/xpconnect/src/XPCInlines.h b/js/xpconnect/src/XPCInlines.h index ece9f72c2938..7c090ab21af7 100644 --- a/js/xpconnect/src/XPCInlines.h +++ b/js/xpconnect/src/XPCInlines.h @@ -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"); } diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 6c44193a5b96..fa089f58ef6b 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -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.