Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2014-07-24 Thread Shanmugham Sundaram
On Thursday, October 24, 2013 9:04:13 PM UTC+5:30, Vasu Yadav wrote: > On Thursday, September 19, 2013 10:06:30 AM UTC+5:30, Vasu Yadav wrote: > > > Hi > > > > > > > > > > > > We are facing problem with our Add-ons support for FireFox 24.Firefox is > > crashing. In earlier approach we was

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-25 Thread Bobby Holley
On Thu, Oct 24, 2013 at 5:34 PM, Vasu Yadav wrote: > My plan is to pass a nsIDocShell pointer to javascript component and then > let the javascript component execute the given javascript in a content > window. ex. get/set window property, call a global function in window > - how can I find a glob

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-24 Thread Vasu Yadav
On Thursday, September 19, 2013 10:06:30 AM UTC+5:30, Vasu Yadav wrote: > Hi > > > > We are facing problem with our Add-ons support for FireFox 24.Firefox is > crashing. In earlier approach we was using 'JS_GetGlobalObject' to get global > object from docShell. > https://developer.mozilla.or

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-18 Thread Neil
Vasu Yadav wrote: I am able to Instantiate helloword JS-XPCOM component, when I am trying to return object to nsISupports interface pointer. but not same when directly tried to return object to nsIHelloWorld interface pointer. Perhaps your nsIHelloWorld interface has not been properly regist

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-18 Thread Bobby Holley
Hi Vasu, I don't have time to help you debug your addon - sorry :-(. There are lots of examples in the tree (like the test component I pointed you to) that you can look at and play with to figure out how to make things work. Cheers, bholley On Thu, Oct 17, 2013 at 8:00 PM, Vasu Yadav wrote: > O

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-17 Thread Vasu Yadav
On Wednesday, October 16, 2013 1:53:24 PM UTC+5:30, Bobby Holley wrote: > As you've discovered, there's a lot of magic and boilerpate that's > > easy to get wrong. You can find some simple test XPCOM components in > > js/xpconnect/components. Try grabbing one of those, making sure that > > it wo

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-16 Thread Vasu Yadav
On Wednesday, October 16, 2013 1:46:48 PM UTC+5:30, Vasu Yadav wrote: > On Friday, October 4, 2013 6:16:36 PM UTC+5:30, Bobby Holley wrote: > > > On Fri, Oct 4, 2013 at 2:36 PM, wrote: > > > > > > > > > > > > > Based on my understanding, I need to create a JS XPCOM component apart > > >

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-16 Thread Bobby Holley
As you've discovered, there's a lot of magic and boilerpate that's easy to get wrong. You can find some simple test XPCOM components in js/xpconnect/components. Try grabbing one of those, making sure that it works, and then iterating on it to turn it into what you need. bholley On Wed, Oct 16, 20

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-16 Thread Vasu Yadav
On Friday, October 4, 2013 6:16:36 PM UTC+5:30, Bobby Holley wrote: > On Fri, Oct 4, 2013 at 2:36 PM, wrote: > > > > > 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 nee

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-04 Thread Vasu Yadav
On Friday, October 4, 2013 6:16:36 PM UTC+5:30, Bobby Holley wrote: > On Fri, Oct 4, 2013 at 2:36 PM, wrote: > > > > > 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 nee

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-04 Thread Bobby Holley
On Fri, Oct 4, 2013 at 2:36 PM, wrote: > 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. > Precisely. > How will the C++ XPCOM and JS XPCO

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-04 Thread vasuyadavkrishn
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, an

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-04 Thread vasuyadavkrishn
On Thursday, September 19, 2013 10:06:30 AM UTC+5:30, vasuyad...@gmail.com wrote: > Hi > > > > We are facing problem with our Add-ons support for FireFox 24.Firefox is > crashing. In earlier approach we was using 'JS_GetGlobalObject' to get global > object from docShell. > https://developer

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-03 Thread Bobby Holley
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:3

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-10-03 Thread vasuyadavkrishn
On Monday, September 23, 2013 9:33:59 PM UTC+5:30, Bobby Holley wrote: > On Mon, Sep 23, 2013 at 5:12 AM, 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? > > > > > > >

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-09-23 Thread Bobby Holley
On Mon, Sep 23, 2013 at 5:12 AM, 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 lis

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-09-23 Thread vasuyadavkrishn
On Thursday, September 19, 2013 10:06:30 AM UTC+5:30, vasuyad...@gmail.com wrote: > Hi > > > > We are facing problem with our Add-ons support for FireFox 24.Firefox is > crashing. In earlier approach we was using 'JS_GetGlobalObject' to get global > object from docShell. > https://developer

Re: Add-ons Firefox 24 crash due to recent change in JSAPI

2013-09-19 Thread Bobby Holley
Calling JSAPI directly from C++ addon code is extremely dangerous. You should stop doing it! I can provide advice on alternative mechanisms to do whatever you're trying to accomplish. The crash is probably related to the lack of an nsCxPusher here. See the discussion in bug 911161. If you go that