зеркало из https://github.com/mozilla/pjs.git
Try to gather some debug information for bug 557689
--HG-- extra : rebase_source : c7f77e94f3697acbf94175f232633a83086aba98
This commit is contained in:
Родитель
103f5ef8d4
Коммит
213ecdd292
|
@ -159,6 +159,9 @@ nsEditor::nsEditor()
|
|||
, mPhonetic(nsnull)
|
||||
{
|
||||
//initialize member variables here
|
||||
#ifdef NS_DEBUG
|
||||
printf("xxxehsan Editor 0x%p created\n", this);
|
||||
#endif
|
||||
}
|
||||
|
||||
nsEditor::~nsEditor()
|
||||
|
@ -168,6 +171,10 @@ nsEditor::~nsEditor()
|
|||
delete mPhonetic;
|
||||
|
||||
NS_IF_RELEASE(mViewManager);
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
printf("xxxehsan Editor 0x%p created\n", this);
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(nsEditor)
|
||||
|
@ -237,6 +244,13 @@ nsEditor::Init(nsIDOMDocument *aDoc, nsIPresShell* aPresShell, nsIContent *aRoot
|
|||
|
||||
nsCOMPtr<nsINode> document = do_QueryInterface(aDoc);
|
||||
document->AddMutationObserver(this);
|
||||
#ifdef NS_DEBUG
|
||||
{
|
||||
nsCOMPtr<nsISupports> docSupports = do_QueryInterface(document);
|
||||
printf("xxxehsan Editor 0x%p registered a mutation observer 0x%p\n",
|
||||
this, docSupports.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set up the DTD
|
||||
// XXX - in the long run we want to get this from the document, but there
|
||||
|
@ -526,8 +540,14 @@ nsEditor::PreDestroy(PRBool aDestroyingFrames)
|
|||
NotifyDocumentListeners(eDocumentToBeDestroyed);
|
||||
|
||||
nsCOMPtr<nsINode> document = do_QueryReferent(mDocWeak);
|
||||
if (document)
|
||||
if (document) {
|
||||
document->RemoveMutationObserver(this);
|
||||
#ifdef NS_DEBUG
|
||||
nsCOMPtr<nsISupports> docSupports = do_QueryInterface(document);
|
||||
printf("xxxehsan Editor 0x%p removed a mutation observer 0x%p\n",
|
||||
this, docSupports.get());
|
||||
#endif
|
||||
}
|
||||
|
||||
// Unregister event listeners
|
||||
RemoveEventListeners();
|
||||
|
|
Загрузка…
Ссылка в новой задаче