Changed the ifdef NS_DEBUG around webshell leak detection code to ifdef DETECT_WEBSHELL_LEAKS.

This commit is contained in:
nisheeth%netscape.com 1999-09-22 01:24:20 +00:00
Родитель a65ed7e497
Коммит d5b56cdcfa
3 изменённых файлов: 18 добавлений и 18 удалений

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

@ -477,7 +477,7 @@ protected:
// if there is no mWindow, this will keep track of the bounds --dwc0001 // if there is no mWindow, this will keep track of the bounds --dwc0001
nsRect mBounds; nsRect mBounds;
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
private: private:
// We're counting the number of |nsWebShells| to help find leaks // We're counting the number of |nsWebShells| to help find leaks
static unsigned long gNumberOfWebShells; static unsigned long gNumberOfWebShells;
@ -487,15 +487,15 @@ public:
#endif #endif
}; };
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
unsigned long nsWebShell::gNumberOfWebShells = 0; unsigned long nsWebShell::gNumberOfWebShells = 0;
extern "C" NS_WEB extern "C" NS_WEB
unsigned long unsigned long
NS_TotalWebShellsInExistence() NS_TotalWebShellsInExistence()
{ {
return nsWebShell::TotalWebShellsInExistence(); return nsWebShell::TotalWebShellsInExistence();
} }
#endif #endif
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -599,7 +599,7 @@ nsresult nsWebShell::DestroyPluginHost(void)
// Note: operator new zeros our memory // Note: operator new zeros our memory
nsWebShell::nsWebShell() nsWebShell::nsWebShell()
{ {
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
// We're counting the number of |nsWebShells| to help find leaks // We're counting the number of |nsWebShells| to help find leaks
++gNumberOfWebShells; ++gNumberOfWebShells;
#endif #endif
@ -685,7 +685,7 @@ nsWebShell::~nsWebShell()
DestroyPluginHost(); DestroyPluginHost();
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
// We're counting the number of |nsWebShells| to help find leaks // We're counting the number of |nsWebShells| to help find leaks
--gNumberOfWebShells; --gNumberOfWebShells;
#endif #endif

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

@ -482,10 +482,10 @@ public:
extern "C" NS_WEB nsresult extern "C" NS_WEB nsresult
NS_NewWebShellFactory(nsIFactory** aFactory); NS_NewWebShellFactory(nsIFactory** aFactory);
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
extern "C" NS_WEB extern "C" NS_WEB
unsigned long unsigned long
NS_TotalWebShellsInExistence(); NS_TotalWebShellsInExistence();
#endif #endif
#endif /* nsIWebShell_h___ */ #endif /* nsIWebShell_h___ */

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

@ -477,7 +477,7 @@ protected:
// if there is no mWindow, this will keep track of the bounds --dwc0001 // if there is no mWindow, this will keep track of the bounds --dwc0001
nsRect mBounds; nsRect mBounds;
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
private: private:
// We're counting the number of |nsWebShells| to help find leaks // We're counting the number of |nsWebShells| to help find leaks
static unsigned long gNumberOfWebShells; static unsigned long gNumberOfWebShells;
@ -487,15 +487,15 @@ public:
#endif #endif
}; };
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
unsigned long nsWebShell::gNumberOfWebShells = 0; unsigned long nsWebShell::gNumberOfWebShells = 0;
extern "C" NS_WEB extern "C" NS_WEB
unsigned long unsigned long
NS_TotalWebShellsInExistence() NS_TotalWebShellsInExistence()
{ {
return nsWebShell::TotalWebShellsInExistence(); return nsWebShell::TotalWebShellsInExistence();
} }
#endif #endif
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -599,7 +599,7 @@ nsresult nsWebShell::DestroyPluginHost(void)
// Note: operator new zeros our memory // Note: operator new zeros our memory
nsWebShell::nsWebShell() nsWebShell::nsWebShell()
{ {
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
// We're counting the number of |nsWebShells| to help find leaks // We're counting the number of |nsWebShells| to help find leaks
++gNumberOfWebShells; ++gNumberOfWebShells;
#endif #endif
@ -685,7 +685,7 @@ nsWebShell::~nsWebShell()
DestroyPluginHost(); DestroyPluginHost();
#ifdef NS_DEBUG #ifdef DETECT_WEBSHELL_LEAKS
// We're counting the number of |nsWebShells| to help find leaks // We're counting the number of |nsWebShells| to help find leaks
--gNumberOfWebShells; --gNumberOfWebShells;
#endif #endif