diff --git a/extensions/wallet/src/singsign.cpp b/extensions/wallet/src/singsign.cpp index cda90940daa..d6998e8a7d5 100644 --- a/extensions/wallet/src/singsign.cpp +++ b/extensions/wallet/src/singsign.cpp @@ -655,32 +655,67 @@ si_CompareEncryptedToEncrypted(const nsString& crypt1, const nsString& crypt2) { * Managing Signon List * ************************/ +MOZ_DECL_CTOR_COUNTER(si_SignonDataStruct); + class si_SignonDataStruct { public: - si_SignonDataStruct() : isPassword(PR_FALSE) {} + si_SignonDataStruct() : isPassword(PR_FALSE) + { + MOZ_COUNT_CTOR(si_SignonDataStruct); + } + ~si_SignonDataStruct() + { + MOZ_COUNT_DTOR(si_SignonDataStruct); + } nsAutoString name; nsAutoString value; PRBool isPassword; }; +MOZ_DECL_CTOR_COUNTER(si_SignonUserStruct); + class si_SignonUserStruct { public: - si_SignonUserStruct() : signonData_list(NULL) {} + si_SignonUserStruct() : signonData_list(NULL) + { + MOZ_COUNT_CTOR(si_SignonUserStruct); + } + ~si_SignonUserStruct() + { + MOZ_COUNT_DTOR(si_SignonUserStruct); + } nsVoidArray * signonData_list; }; +MOZ_DECL_CTOR_COUNTER(si_SignonURLStruct); + class si_SignonURLStruct { public: - si_SignonURLStruct() : passwordRealm(NULL), chosen_user(NULL), signonUser_list(NULL) {} + si_SignonURLStruct() : passwordRealm(NULL), chosen_user(NULL), signonUser_list(NULL) + { + MOZ_COUNT_CTOR(si_SignonURLStruct); + } + ~si_SignonURLStruct() + { + MOZ_COUNT_DTOR(si_SignonURLStruct); + } char * passwordRealm; si_SignonUserStruct* chosen_user; /* this is a state variable */ nsVoidArray * signonUser_list; }; +MOZ_DECL_CTOR_COUNTER(si_Reject); class si_Reject { public: - si_Reject() : passwordRealm(NULL) {} + si_Reject() : passwordRealm(NULL) + { + MOZ_COUNT_CTOR(si_Reject); + } + ~si_Reject() + { + MOZ_COUNT_DTOR(si_Reject); + } char * passwordRealm; nsAutoString userName; }; diff --git a/extensions/wallet/src/wallet.cpp b/extensions/wallet/src/wallet.cpp index b09e2183938..d704f2dbaaf 100644 --- a/extensions/wallet/src/wallet.cpp +++ b/extensions/wallet/src/wallet.cpp @@ -454,17 +454,35 @@ NS_NewURItoFile(const char *in, nsFileSpec dirSpec, const char *out) enum PlacementType {DUP_IGNORE, DUP_OVERWRITE, DUP_BEFORE, DUP_AFTER, AT_END}; +MOZ_DECL_CTOR_COUNTER(wallet_MapElement); + class wallet_MapElement { public: - wallet_MapElement() : itemList(nsnull) {} + wallet_MapElement() : itemList(nsnull) + { + MOZ_COUNT_CTOR(wallet_MapElement); + } + ~wallet_MapElement() + { + MOZ_COUNT_DTOR(wallet_MapElement); + } nsString item1; nsString item2; nsVoidArray * itemList; }; +MOZ_DECL_CTOR_COUNTER(wallet_Sublist); + class wallet_Sublist { public: - wallet_Sublist() {} + wallet_Sublist() + { + MOZ_COUNT_CTOR(wallet_Sublist); + } + ~wallet_Sublist() + { + MOZ_COUNT_DTOR(wallet_Sublist); + } nsString item; }; @@ -3466,10 +3484,19 @@ WLLT_RequestToCapture(nsIPresShell* shell, nsIDOMWindowInternal* win, PRUint32* Recycle(message); } +MOZ_DECL_CTOR_COUNTER(si_SignonDataStruct); + /* should move this to an include file */ class si_SignonDataStruct { public: - si_SignonDataStruct() : isPassword(PR_FALSE) {} + si_SignonDataStruct() : isPassword(PR_FALSE) + { + MOZ_COUNT_CTOR(si_SignonDataStruct); + } + ~si_SignonDataStruct() + { + MOZ_COUNT_DTOR(si_SignonDataStruct); + } nsAutoString name; nsAutoString value; PRBool isPassword;