Re: Cannot call RegisterDataSource on a own datasource

Neil <[email protected]> Tue, 05 Feb 2008 12:16:09 +0000
Newsgroups gmane.comp.mozilla.devel.rdf
Message-ID <[email protected]>
mcben wrote:

>     QueryInterface : function MDSI_QueryInterface(iid) {
>         if (iid.equals(Components.interfaces.nsIRDFDataSource))
>             return this.mInner;
>
>         if (iid.equals(Components.interfaces.nsIDOMEventListener) ||
>             iid.equals(Components.interfaces.nsIRDFRemoteDataSource) ||
>             iid.equals(Components.interfaces.nsISupports))
>             return this;
>
>         throw Components.results.NS_ERROR_NO_INTERFACE;
>     }

This won't work; any object you return from QueryInterface must return 
the original object when queried back to nsISupports, which mInner 
clearly won't do.

-- 
Warning: May contain traces of nuts.