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 "prlog.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsIProgrammingLanguage.h"
|
#include "nsIProgrammingLanguage.h"
|
||||||
#include "nsVoidArray.h"
|
|
||||||
|
|
||||||
static NS_DEFINE_CID(kThisImplCID, NS_THIS_STANDARDURL_IMPL_CID);
|
static NS_DEFINE_CID(kThisImplCID, NS_THIS_STANDARDURL_IMPL_CID);
|
||||||
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
|
static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
|
||||||
@ -270,10 +269,6 @@ nsSegmentEncoder::InitUnicodeEncoder()
|
|||||||
// nsStandardURL <public>
|
// nsStandardURL <public>
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
|
|
||||||
static PRCList gAllURLs;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nsStandardURL::nsStandardURL(PRBool aSupportsFileURL)
|
nsStandardURL::nsStandardURL(PRBool aSupportsFileURL)
|
||||||
: mDefaultPort(-1)
|
: mDefaultPort(-1)
|
||||||
, mPort(-1)
|
, mPort(-1)
|
||||||
@ -298,10 +293,6 @@ nsStandardURL::nsStandardURL(PRBool aSupportsFileURL)
|
|||||||
|
|
||||||
// default parser in case nsIStandardURL::Init is never called
|
// default parser in case nsIStandardURL::Init is never called
|
||||||
mParser = net_GetStdURLParser();
|
mParser = net_GetStdURLParser();
|
||||||
|
|
||||||
#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
|
|
||||||
PR_APPEND_LINK(&mDebugCList, &gAllURLs);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsStandardURL::~nsStandardURL()
|
nsStandardURL::~nsStandardURL()
|
||||||
@ -309,24 +300,8 @@ nsStandardURL::~nsStandardURL()
|
|||||||
LOG(("Destroying nsStandardURL @%p\n", this));
|
LOG(("Destroying nsStandardURL @%p\n", this));
|
||||||
|
|
||||||
CRTFREEIF(mHostA);
|
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
|
void
|
||||||
nsStandardURL::InitGlobalObjects()
|
nsStandardURL::InitGlobalObjects()
|
||||||
{
|
{
|
||||||
@ -340,11 +315,6 @@ nsStandardURL::InitGlobalObjects()
|
|||||||
|
|
||||||
PrefsChanged(prefBranch, nsnull);
|
PrefsChanged(prefBranch, nsnull);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
|
|
||||||
PR_INIT_CLIST(&gAllURLs);
|
|
||||||
atexit(DumpLeakedURLs);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -53,9 +53,6 @@
|
|||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsURLHelper.h"
|
#include "nsURLHelper.h"
|
||||||
#include "nsIClassInfo.h"
|
#include "nsIClassInfo.h"
|
||||||
#include "prclist.h"
|
|
||||||
|
|
||||||
#define DEBUG_DUMP_URLS_AT_SHUTDOWN
|
|
||||||
|
|
||||||
class nsIBinaryInputStream;
|
class nsIBinaryInputStream;
|
||||||
class nsIBinaryOutputStream;
|
class nsIBinaryOutputStream;
|
||||||
@ -274,12 +271,6 @@ private:
|
|||||||
static PRBool gEscapeUTF8;
|
static PRBool gEscapeUTF8;
|
||||||
static PRBool gAlwaysEncodeInUTF8;
|
static PRBool gAlwaysEncodeInUTF8;
|
||||||
static PRBool gEncodeQueryInUTF8;
|
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 \
|
#define NS_THIS_STANDARDURL_IMPL_CID \
|
||||||
|
Loading…
Reference in New Issue
Block a user