On Thursday, October 3, 2013 6:51:10 PM UTC+5:30, Bobby Holley wrote:
> You should call Javascript functions from JS. If your app is mostly C++,
> 
> then you can use a JS-implemented XPCOM component to do the JS work. If
> 
> your core logic is easily convertible to JS, then you should do that, and
> 
> interface with native code via XPCOM and JS-CTypes.
> 
> 
> 
> 
> 
> On Thu, Oct 3, 2013 at 2:36 PM, <vasuyadavkri...@gmail.com> wrote:
> 
> 
> 
> > On Monday, September 23, 2013 9:33:59 PM UTC+5:30, Bobby Holley wrote:
> 
> > > On Mon, Sep 23, 2013 at 5:12 AM, <vasuyadavkri...@gmail.com> wrote:
> 
> > >
> 
> > >
> 
> > >
> 
> > > > Thanks a lot Bobby.
> 
> > >
> 
> > > > My issue is solved after use of nsCxPusher for JSContext.
> 
> > >
> 
> > > > Could you suggest me some alternative approach to do the same?
> 
> > >
> 
> > > >
> 
> > >
> 
> > >
> 
> > >
> 
> > > An alternative to nsCxPusher? My suggestion is to not use JSAPI, period.
> 
> > >
> 
> > > Per another discussion on this list, we're going to stop exporting those
> 
> > >
> 
> > > symbols soon.
> 
> > >
> 
> > >
> 
> > >
> 
> > > bholley
> 
> >
> 
> > Hi
> 
> >
> 
> > Could you please help or suggest me the alternative of JSAPI? As you said
> 
> > in last post -"you're going to stop exporting those
> 
> > symbols soon". Which approach should be good for calling JavaScript
> 
> > function from C++ XPCOM ?
> 
> > How can we call JavaScript functions from C++ XPCOM with that approach?
> 
> >
> 
> > Regards
> 
> > Vasu
> 
> > _______________________________________________
> 
> > dev-platform mailing list
> 
> > dev-platform@lists.mozilla.org
> 
> > https://lists.mozilla.org/listinfo/dev-platform
> 
> >

Thanks a lot Bholley

Based on my understanding, I need to create a JS XPCOM component apart from the 
existing C++ XPCOM component I already have. All the JavaScript function calls 
need to be made from JS XPCOM component. 
How will the C++ XPCOM and JS XPCOM communicate to each other? Can we 
instantiate JS XPCOM component from C++ XPCOM Component?

I want to deliver only one .xpi to my customers. I hope it is possible to 
package both C++ XPCOM and JS XPCOM components in the same .xpi file. Please 
let me know if this is possible and whether you see any problems in this 
approach.

Regards
Vasu
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to