mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 21:17:52 +00:00
Bug 934091 - Add current process ID to the {++|--}{DOMWINDOW|DOCSHELL} debug output r=smaug
From 4ac8092c5148f927e305be79c1667173d456313c Mon Sep 17 00:00:00 2001
This commit is contained in:
parent
af558e50f1
commit
f8403bbf7e
@ -194,6 +194,11 @@ static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
||||
#define DEBUG_PAGE_CACHE
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <process.h>
|
||||
#define getpid _getpid
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
@ -795,8 +800,11 @@ nsDocShell::nsDocShell():
|
||||
// We're counting the number of |nsDocShells| to help find leaks
|
||||
++gNumberOfDocShells;
|
||||
if (!PR_GetEnv("MOZ_QUIET")) {
|
||||
printf("++DOCSHELL %p == %ld [id = %llu]\n", (void*) this,
|
||||
gNumberOfDocShells, SafeCast<unsigned long long>(mHistoryID));
|
||||
printf_stderr("++DOCSHELL %p == %ld [pid = %d] [id = %llu]\n",
|
||||
(void*) this,
|
||||
gNumberOfDocShells,
|
||||
getpid(),
|
||||
SafeCast<unsigned long long>(mHistoryID));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -824,8 +832,11 @@ nsDocShell::~nsDocShell()
|
||||
// We're counting the number of |nsDocShells| to help find leaks
|
||||
--gNumberOfDocShells;
|
||||
if (!PR_GetEnv("MOZ_QUIET")) {
|
||||
printf("--DOCSHELL %p == %ld [id = %llu]\n", (void*) this,
|
||||
gNumberOfDocShells, SafeCast<unsigned long long>(mHistoryID));
|
||||
printf_stderr("--DOCSHELL %p == %ld [pid = %d] [id = %llu]\n",
|
||||
(void*) this,
|
||||
gNumberOfDocShells,
|
||||
getpid(),
|
||||
SafeCast<unsigned long long>(mHistoryID));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -237,6 +237,11 @@ class nsIScriptTimeoutHandler;
|
||||
static PRLogModuleInfo* gDOMLeakPRLog;
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <process.h>
|
||||
#define getpid _getpid
|
||||
#endif
|
||||
|
||||
static const char kStorageEnabled[] = "dom.storage.enabled";
|
||||
|
||||
using namespace mozilla;
|
||||
@ -1121,10 +1126,12 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!PR_GetEnv("MOZ_QUIET")) {
|
||||
printf("++DOMWINDOW == %d (%p) [serial = %d] [outer = %p]\n", gRefCnt,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(this)),
|
||||
gSerialCounter,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(aOuterWindow)));
|
||||
printf_stderr("++DOMWINDOW == %d (%p) [pid = %d] [serial = %d] [outer = %p]\n",
|
||||
gRefCnt,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(this)),
|
||||
getpid(),
|
||||
gSerialCounter,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(aOuterWindow)));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1197,9 +1204,13 @@ nsGlobalWindow::~nsGlobalWindow()
|
||||
}
|
||||
|
||||
nsGlobalWindow* outer = static_cast<nsGlobalWindow*>(mOuterWindow.get());
|
||||
printf("--DOMWINDOW == %d (%p) [serial = %d] [outer = %p] [url = %s]\n",
|
||||
gRefCnt, static_cast<void*>(static_cast<nsIScriptGlobalObject*>(this)),
|
||||
mSerial, static_cast<void*>(static_cast<nsIScriptGlobalObject*>(outer)), url.get());
|
||||
printf_stderr("--DOMWINDOW == %d (%p) [pid = %d] [serial = %d] [outer = %p] [url = %s]\n",
|
||||
gRefCnt,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(this)),
|
||||
getpid(),
|
||||
mSerial,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(outer)),
|
||||
url.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user