Closed Bug 279090 Opened 20 years ago Closed 20 years ago

When I query some interface then previous queried interface methods aren't removed

Categories

(Core :: XPConnect, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: surkov, Assigned: dbradley)

Details

Attachments

(1 file)

(deleted), application/vnd.mozilla.xul+xml
Details
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:
Attached file testcase (deleted) —
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
Closed: 20 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.

Attachment

General

Created:
Updated:
Size: