зеркало из https://github.com/mozilla/pjs.git
Better debug output for DOM window destruction, r+sr+a=jst, DEBUG-only changes.
This commit is contained in:
Родитель
ee9cf2cc4f
Коммит
c0ccf25c23
|
@ -660,7 +660,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
|
|||
CallGetService(NS_ENTROPYCOLLECTOR_CONTRACTID, &gEntropyCollector);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
printf("++DOMWINDOW == %d (%p) [serial = %d] [Outer = %p]\n", gRefCnt,
|
||||
printf("++DOMWINDOW == %d (%p) [serial = %d] [outer = %p]\n", gRefCnt,
|
||||
static_cast<void*>(static_cast<nsIScriptGlobalObject*>(this)),
|
||||
++gSerialCounter, static_cast<void*>(aOuterWindow));
|
||||
mSerial = gSerialCounter;
|
||||
|
@ -682,9 +682,14 @@ nsGlobalWindow::~nsGlobalWindow()
|
|||
NS_IF_RELEASE(gEntropyCollector);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
printf("--DOMWINDOW == %d (%p) [serial = %d] [Outer = %p]\n",
|
||||
nsCAutoString url;
|
||||
if (mLastOpenedURI) {
|
||||
mLastOpenedURI->GetSpec(url);
|
||||
}
|
||||
|
||||
printf("--DOMWINDOW == %d (%p) [serial = %d] [outer = %p] [url = %s]\n",
|
||||
gRefCnt, static_cast<void*>(static_cast<nsIScriptGlobalObject*>(this)),
|
||||
mSerial, static_cast<void*>(mOuterWindow));
|
||||
mSerial, static_cast<void*>(mOuterWindow), url.get());
|
||||
#endif
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
@ -1634,6 +1639,10 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
|||
mDocument = do_QueryInterface(aDocument);
|
||||
mDoc = aDocument;
|
||||
|
||||
#ifdef DEBUG
|
||||
mLastOpenedURI = aDocument->GetDocumentURI();
|
||||
#endif
|
||||
|
||||
if (IsOuterWindow()) {
|
||||
NS_STID_FOR_ID(st_id) {
|
||||
nsIScriptContext *langContext = GetScriptContextInternal(st_id);
|
||||
|
|
|
@ -734,6 +734,7 @@ protected:
|
|||
#ifdef DEBUG
|
||||
PRBool mSetOpenerWindowCalled;
|
||||
PRUint32 mSerial;
|
||||
nsCOMPtr<nsIURI> mLastOpenedURI;
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIDOMOfflineResourceList> mApplicationCache;
|
||||
|
|
Загрузка…
Ссылка в новой задаче