From 52cbbf22c807980a94c37451dbe584ecfdb8be7f Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Fri, 8 May 2009 21:37:28 -0700 Subject: [PATCH] Backed out changeset 240fa475d2b0 (temporary leak debugging code). --- netwerk/base/src/nsStandardURL.cpp | 30 ------------------------------ netwerk/base/src/nsStandardURL.h | 9 --------- 2 files changed, 39 deletions(-) diff --git a/netwerk/base/src/nsStandardURL.cpp b/netwerk/base/src/nsStandardURL.cpp index f7fdd176907..f38104362ef 100644 --- a/netwerk/base/src/nsStandardURL.cpp +++ b/netwerk/base/src/nsStandardURL.cpp @@ -55,7 +55,6 @@ #include "prlog.h" #include "nsAutoPtr.h" #include "nsIProgrammingLanguage.h" -#include "nsVoidArray.h" static NS_DEFINE_CID(kThisImplCID, NS_THIS_STANDARDURL_IMPL_CID); static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID); @@ -270,10 +269,6 @@ nsSegmentEncoder::InitUnicodeEncoder() // nsStandardURL //---------------------------------------------------------------------------- -#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN -static PRCList gAllURLs; -#endif - nsStandardURL::nsStandardURL(PRBool aSupportsFileURL) : mDefaultPort(-1) , mPort(-1) @@ -298,10 +293,6 @@ nsStandardURL::nsStandardURL(PRBool aSupportsFileURL) // default parser in case nsIStandardURL::Init is never called mParser = net_GetStdURLParser(); - -#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN - PR_APPEND_LINK(&mDebugCList, &gAllURLs); -#endif } nsStandardURL::~nsStandardURL() @@ -309,24 +300,8 @@ nsStandardURL::~nsStandardURL() LOG(("Destroying nsStandardURL @%p\n", this)); CRTFREEIF(mHostA); -#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN - PR_REMOVE_LINK(&mDebugCList); -#endif } -#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN -static void DumpLeakedURLs() -{ - if (!PR_CLIST_IS_EMPTY(&gAllURLs)) { - printf("Leaked URLs:\n"); - for (PRCList *l = PR_LIST_HEAD(&gAllURLs); l != &gAllURLs; l = PR_NEXT_LINK(l)) { - nsStandardURL *url = reinterpret_cast(reinterpret_cast(l) - offsetof(nsStandardURL, mDebugCList)); - url->PrintSpec(); - } - } -} -#endif - void nsStandardURL::InitGlobalObjects() { @@ -340,11 +315,6 @@ nsStandardURL::InitGlobalObjects() PrefsChanged(prefBranch, nsnull); } - -#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN - PR_INIT_CLIST(&gAllURLs); - atexit(DumpLeakedURLs); -#endif } void diff --git a/netwerk/base/src/nsStandardURL.h b/netwerk/base/src/nsStandardURL.h index bc75d545711..0082325ca8e 100644 --- a/netwerk/base/src/nsStandardURL.h +++ b/netwerk/base/src/nsStandardURL.h @@ -53,9 +53,6 @@ #include "nsCOMPtr.h" #include "nsURLHelper.h" #include "nsIClassInfo.h" -#include "prclist.h" - -#define DEBUG_DUMP_URLS_AT_SHUTDOWN class nsIBinaryInputStream; class nsIBinaryOutputStream; @@ -274,12 +271,6 @@ private: static PRBool gEscapeUTF8; static PRBool gAlwaysEncodeInUTF8; static PRBool gEncodeQueryInUTF8; - -public: -#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN - PRCList mDebugCList; - void PrintSpec() const { printf(" %s\n", mSpec.get()); } -#endif }; #define NS_THIS_STANDARDURL_IMPL_CID \