Typo bug?
Andras Mantia
amantia at kde.org
Fri May 19 10:22:40 BST 2006
Hi,
While reading the KHTML DOM code I found the following:
bool NodeBaseImpl::checkSameDocument( NodeImpl *newChild, int
&exceptioncode )
{
exceptioncode = 0;
DocumentImpl *ownerDocThis = getDocument();
DocumentImpl *ownerDocNew = getDocument();
if(ownerDocThis != ownerDocNew) {
kdDebug(6010)<< "not same document, newChild = " << newChild <<
"document = " << getDocument() << endl;
exceptioncode = DOMException::WRONG_DOCUMENT_ERR;
return true;
}
return false;
}
The condition inside the if will never be true as both ownerDocThis and
ownerDocNew is set to the same getDocument(). Should rather be:
DocumentImpl *ownerDocNew = newChild->getDocument();
?
Andras
--
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060519/5e320752/attachment.sig>
More information about the kde-core-devel
mailing list