mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 240fa475d2b0 (temporary leak debugging code).
This commit is contained in:
parent
735bc96f70
commit
52cbbf22c8
@ -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 <public>
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#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<nsStandardURL*>(reinterpret_cast<char*>(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
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user