From bc496bb171e366d570b66876deb2c15346d28bf5 Mon Sep 17 00:00:00 2001 From: "nisheeth%netscape.com" Date: Wed, 22 Sep 1999 01:24:20 +0000 Subject: [PATCH] Changed the ifdef NS_DEBUG around webshell leak detection code to ifdef DETECT_WEBSHELL_LEAKS. git-svn-id: svn://10.0.0.236/trunk@48718 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 14 +++++++------- mozilla/webshell/public/nsIWebShell.h | 8 ++++---- mozilla/webshell/src/nsWebShell.cpp | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 506f5ee2be3..3ba25a1499d 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/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/mozilla/webshell/public/nsIWebShell.h b/mozilla/webshell/public/nsIWebShell.h index a2ad181d286..95d14965812 100644 --- a/mozilla/webshell/public/nsIWebShell.h +++ b/mozilla/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/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 506f5ee2be3..3ba25a1499d 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/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