Instrument various classes so they show up in the leak/bloat stats. r=morse@netscape.com sr=scc@mozilla.org b=56644

This commit is contained in:
dbaron%fas.harvard.edu 2000-10-29 21:27:45 +00:00
Родитель 2610b33dfd
Коммит b60b296a11
2 изменённых файлов: 69 добавлений и 7 удалений

Просмотреть файл

@ -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;
};

Просмотреть файл

@ -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;