diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index 506f5ee2be38..3ba25a1499d1 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -477,7 +477,7 @@ protected: // if there is no mWindow, this will keep track of the bounds --dwc0001 nsRect mBounds; -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS private: // We're counting the number of |nsWebShells| to help find leaks static unsigned long gNumberOfWebShells; @@ -487,15 +487,15 @@ public: #endif }; -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS unsigned long nsWebShell::gNumberOfWebShells = 0; extern "C" NS_WEB unsigned long NS_TotalWebShellsInExistence() - { - return nsWebShell::TotalWebShellsInExistence(); - } +{ + return nsWebShell::TotalWebShellsInExistence(); +} #endif //---------------------------------------------------------------------- @@ -599,7 +599,7 @@ nsresult nsWebShell::DestroyPluginHost(void) // Note: operator new zeros our memory nsWebShell::nsWebShell() { -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS // We're counting the number of |nsWebShells| to help find leaks ++gNumberOfWebShells; #endif @@ -685,7 +685,7 @@ nsWebShell::~nsWebShell() DestroyPluginHost(); -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS // We're counting the number of |nsWebShells| to help find leaks --gNumberOfWebShells; #endif diff --git a/webshell/public/nsIWebShell.h b/webshell/public/nsIWebShell.h index a2ad181d286d..95d14965812a 100644 --- a/webshell/public/nsIWebShell.h +++ b/webshell/public/nsIWebShell.h @@ -482,10 +482,10 @@ public: extern "C" NS_WEB nsresult NS_NewWebShellFactory(nsIFactory** aFactory); -#ifdef NS_DEBUG - extern "C" NS_WEB - unsigned long - NS_TotalWebShellsInExistence(); +#ifdef DETECT_WEBSHELL_LEAKS +extern "C" NS_WEB +unsigned long +NS_TotalWebShellsInExistence(); #endif #endif /* nsIWebShell_h___ */ diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index 506f5ee2be38..3ba25a1499d1 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -477,7 +477,7 @@ protected: // if there is no mWindow, this will keep track of the bounds --dwc0001 nsRect mBounds; -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS private: // We're counting the number of |nsWebShells| to help find leaks static unsigned long gNumberOfWebShells; @@ -487,15 +487,15 @@ public: #endif }; -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS unsigned long nsWebShell::gNumberOfWebShells = 0; extern "C" NS_WEB unsigned long NS_TotalWebShellsInExistence() - { - return nsWebShell::TotalWebShellsInExistence(); - } +{ + return nsWebShell::TotalWebShellsInExistence(); +} #endif //---------------------------------------------------------------------- @@ -599,7 +599,7 @@ nsresult nsWebShell::DestroyPluginHost(void) // Note: operator new zeros our memory nsWebShell::nsWebShell() { -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS // We're counting the number of |nsWebShells| to help find leaks ++gNumberOfWebShells; #endif @@ -685,7 +685,7 @@ nsWebShell::~nsWebShell() DestroyPluginHost(); -#ifdef NS_DEBUG +#ifdef DETECT_WEBSHELL_LEAKS // We're counting the number of |nsWebShells| to help find leaks --gNumberOfWebShells; #endif