On 12/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
And to reveal more of my newbie-ness: how do I open the error console in FireFox?
Tools -> Error (or JavaScript) Console and you should read this: http://kb.mozillazine.org/Setting_up_extension_development_environment#Set_development_prefs Nickolay
Thanks! -Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Bandhauer Sent: Monday, December 04, 2006 3:30 PM To: [email protected] Subject: Re: XPCOM cpp to js callback Are you so sure your callback is not getting called? If your js code is not still the loaded document in some window then it's global object might not still *have* an 'alert' method and *that* might be the cause of the generic failure code. Have you looked in the error console for interesting error info? If XPConnect were having difficulty calling your method then you should expect it to likely return a more interesting nsresult than the generic failure code. Your JS obj is not going to get as many QI calls as you expect. XPConnect will try a QI for nsISupports to establish object identity in some cases. But, inasmuch as JS objects are not even required to implement QI, the fact that your object is not QI'd for your special interface is not telling. XPConnect *trusts* you when you pass the object as an instance of your interface. It builds a wrapper to represent that interface for you and hands it to your C++ code. I'm pretty sure that nsCOMPtr assignment does not require a QI call in the normal case either. It is assigning typed pointers and doing ref counting only. John. _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
_______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
