User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050111 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050111 I query interface 'iface1' from some object. When I query interface 'iface2' then methods of interface 'iface1' aren't removed from object. In instance: var doc=window.QueryInterface(Components.interfaces.nsIInterfaceRequestor). getInterface(Components.interfaces.nsIWebNavigation); doc=doc.QueryInterface(Components.interfaces.nsIDocShell); Variable 'doc' will have methods of interfaces 'nsIWebNavigation' and 'nsIDocShell'. Reproducible: Always Steps to Reproduce:
This behavior is intended and how XPConnect works. XPConnect flattens out the interfaces as they are QI'd. Is this causing some problem for you?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
No, I haven't any problem. When I worked with COM then I got used to it. I expect begaviour of QueryInterface() in XPCOM will be like behaviour QI() in COM. Is there the same behaviour when I work with XPCOM in C++?
You need to log in before you can comment on or make changes to this bug.