Hi list,
I am very confused about the role of QueryInterface when using XPCOM
from Javascript. For instance, there are many nsI{Foo}Window
interfaces, but I see extension code that uses methods from different
interfaces without QIing among them. Is this behavior particular to
windows or a general XPCOM/XPConnect thing? Does this have something
to do with "aggregated" interfaces? What about "flattened" Javascript
wrappers? (I came across these terms but could find no definition of
them.)
If I understand correctly, QueryInterface (and instanceof) can be used
for their side-effect, which is to cache a "tear-off"--the underlying
C++ object appropriately cast--of the interface so that future method
calls against that interface succeed. What I can't figure out is what
happens (or is supposed to happen) if you make a call against an
interface for which no tear-off is cached--is one added automatically?
Is there a page somewhere that lays this all out for the uninitiated
(uninitialized?) among us? Many thanks,
Jake
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom