Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XPCOM do_QueryInterface with nsIDOMNode fails under Firefox 10

76 views
Skip to first unread message

Martin Novak

unread,
Apr 26, 2012, 9:28:52 AM4/26/12
to addons-c...@lists.mozilla.org
I use a binray XPCOM with VisualStudio 10 compiled against xulrunner-10.0.en-US.win32.sdk
I do QueryInterface nsIDOMNode to nsIDOMElement, but it fails under Firefox 10
Same Code with same project compiled against xulrunner-11 sdk under Firefox 11 does his job correctly.
Also Firefox 3.6 works.
Only Firefox 10 has problems.

I cannot find anything about this problem.
I have no idea.

Best Regards,
Martin

CODE:
if(xmlDoc!=NULL)
{
xmlDoc->GetElementsByTagName(NS_LITERAL_STRING("Control"), getter_AddRefs(resultList));
if(resultList!=NULL)
{
resultList->GetLength(&length);

if(length != 0)
{
resultList->Item(0, getter_AddRefs(node));
if(node!=NULL)
{
domElement = do_QueryInterface(node,&rv); //FAILS UNDER FIREFOX 10: NO_INTERFACES_ERROR
if(domElement!=NULL)
{
bool retbool = false;
domElement->HasAttribute(attribute, &retbool);
if(retbool == (bool) true)
{
domElement->GetAttribute(attribute,retval);
}
}
}
}
}
}

0 new messages