Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: xpcom supported

43 views
Skip to first unread message

Benjamin Smedberg

unread,
Jun 2, 2014, 3:12:55 PM6/2/14
to savani...@gmail.com, dev-pl...@lists.mozilla.org, dev-ext...@lists.mozilla.org
On 6/2/14, 2:38 PM, savani...@gmail.com wrote:
> developing .so / dylib / .dll using xulrunner sdk and then calling it in extension in javascript is that still supported.
> i see very poor documentation on the web on it. and no good working example.
Savani, you have posted variants of this same question to three
different lists within the past hour. Please be patient when you ask
questions and try to avoid list-hopping. Please direct followup replied
to mozilla.dev.extensions.

> i am developing a c++ component using xpcom. i could develop an .so file using xulrunner-sdk. however xpcom viewer doesnt recognize my component. so basically something wrong in manifest file or rdf.. how to debug this?
>
> .so file seems to be in correct format .. i mean i started using it in c program and it asks for nsisupport. so i am assuming .so file is not corrupted or anything.( just thought i should check that out first)

The best tool for this is the browser console.

1) Check and see whether there are any messages related to component
registration. I've tried to add comprehensive error reporting to the
registration code.
2) Check for the presence of your contract:

Components.classes["@whatever/my-component;1"]

3) Try to create the component:

Components.classes["@whatever/my-component;1"].createInstance();

4) If you added a new interface, test for it:

Components.interfaces.nsIMyInterface;

4) Try to create the component using your new interface:

Components.classes["@whatever/my-component;1"].createInstance(Components.interfaces.nsIMyInterface);

> can someone confirm latest xulrunner sdk supports and an extension can be developed using c++ xpcom.

Compiled components are supposed to work, yes. Several addon authors are
still using them. However, they are strongly discouraged and we may
decide to remove support for them in a future version of Firefox. You're
encouraged to write your addon entirely in JavaScript if possible; if
you must interface with external binary code, please consider loading a
binary shim using JS-ctypes.

--BDS

0 new messages