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

XPCOM do_QueryInterface with nsIDOMNode failes under Firefox 10

39 views
Skip to first unread message

martin novak

unread,
Apr 26, 2012, 9:18:14 AM4/26/12
to
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
Firefox10

Same Code compiled against xulrunner-11 sdk under Firefox 11 does his
job correctly.
Also Firefox 3.6 works.

Only Firefox 10 has problems.


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

if(resultList!=NULL)
{
resultList->GetLength(&length);
//for(PRUint32 i=0; i<*length; i++)

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);
}
}
}
}
}
}

Yury Lobanov

unread,
Jun 24, 2012, 5:45:54 PM6/24/12
to
Martin, i can not say anything about your problem. There is the question to you.
The question to you.
How you have passed/got xmlDoc object?
0 new messages