mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Better debug prints: tell which tag we're creating
This commit is contained in:
parent
96799ab633
commit
8fd31a2323
@ -65,8 +65,14 @@ CreateElementTxn::~CreateElementTxn()
|
||||
|
||||
NS_IMETHODIMP CreateElementTxn::Do(void)
|
||||
{
|
||||
if (gNoisy) { printf("Do Create Element parent = %p, offset = %d\n",
|
||||
mParent.get(), mOffsetInParent); }
|
||||
if (gNoisy)
|
||||
{
|
||||
char* nodename = mTag.ToNewCString();
|
||||
printf("Do Create Element parent = %p <%s>, offset = %d\n",
|
||||
mParent.get(), nodename, mOffsetInParent);
|
||||
nsAllocator::Free(nodename);
|
||||
}
|
||||
|
||||
NS_ASSERTION(mEditor && mParent, "bad state");
|
||||
if (!mEditor || !mParent) return NS_ERROR_NOT_INITIALIZED;
|
||||
nsresult result;
|
||||
|
@ -61,9 +61,15 @@ NS_IMETHODIMP InsertElementTxn::Do(void)
|
||||
{
|
||||
nsCOMPtr<nsIContent>nodeAsContent = do_QueryInterface(mNode);
|
||||
nsCOMPtr<nsIContent>parentAsContent = do_QueryInterface(mParent);
|
||||
printf("%p Do Insert Element of %p into parent %p at offset %d\n",
|
||||
this, nodeAsContent.get(), parentAsContent.get(), mOffset);
|
||||
nsString namestr;
|
||||
mNode->GetNodeName(namestr);
|
||||
char* nodename = namestr.ToNewCString();
|
||||
printf("%p Do Insert Element of %p <%s> into parent %p at offset %d\n",
|
||||
this, nodeAsContent.get(), nodename,
|
||||
parentAsContent.get(), mOffset);
|
||||
nsAllocator::Free(nodename);
|
||||
}
|
||||
|
||||
if (!mNode || !mParent) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
nsresult result;
|
||||
|
@ -65,8 +65,14 @@ CreateElementTxn::~CreateElementTxn()
|
||||
|
||||
NS_IMETHODIMP CreateElementTxn::Do(void)
|
||||
{
|
||||
if (gNoisy) { printf("Do Create Element parent = %p, offset = %d\n",
|
||||
mParent.get(), mOffsetInParent); }
|
||||
if (gNoisy)
|
||||
{
|
||||
char* nodename = mTag.ToNewCString();
|
||||
printf("Do Create Element parent = %p <%s>, offset = %d\n",
|
||||
mParent.get(), nodename, mOffsetInParent);
|
||||
nsAllocator::Free(nodename);
|
||||
}
|
||||
|
||||
NS_ASSERTION(mEditor && mParent, "bad state");
|
||||
if (!mEditor || !mParent) return NS_ERROR_NOT_INITIALIZED;
|
||||
nsresult result;
|
||||
|
@ -61,9 +61,15 @@ NS_IMETHODIMP InsertElementTxn::Do(void)
|
||||
{
|
||||
nsCOMPtr<nsIContent>nodeAsContent = do_QueryInterface(mNode);
|
||||
nsCOMPtr<nsIContent>parentAsContent = do_QueryInterface(mParent);
|
||||
printf("%p Do Insert Element of %p into parent %p at offset %d\n",
|
||||
this, nodeAsContent.get(), parentAsContent.get(), mOffset);
|
||||
nsString namestr;
|
||||
mNode->GetNodeName(namestr);
|
||||
char* nodename = namestr.ToNewCString();
|
||||
printf("%p Do Insert Element of %p <%s> into parent %p at offset %d\n",
|
||||
this, nodeAsContent.get(), nodename,
|
||||
parentAsContent.get(), mOffset);
|
||||
nsAllocator::Free(nodename);
|
||||
}
|
||||
|
||||
if (!mNode || !mParent) return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
nsresult result;
|
||||
|
Loading…
Reference in New Issue
Block a user