I am currently integrating js 1.8.5 with our environment.
While integration when JS_GC API call is called then there is a crash in js::MarkRangeConservatively
I have written a small program in which I created a new thread and called JS_GC in that.
It was still crashing in js::MarkRangeConservatively.
Please can anyone help me to know the correct usage where can we call JS_GC in js1.8.5.
On Tuesday, August 21, 2012 8:40:13 AM UTC-7, Ankur rungta wrote:
> Hi,
> I am currently integrating js 1.8.5 with our environment.
> While integration when JS_GC API call is called then there is a crash in js::MarkRangeConservatively
> I have written a small program in which I created a new thread and called JS_GC in that.
> It was still crashing in js::MarkRangeConservatively.
> Please can anyone help me to know the correct usage where can we call JS_GC in js1.8.5.
> Thanks & Regards,
> Ankur.
There aren't particularly any restrictions on when JS_GC can be called--SpiderMonkey can internally trigger GCs all over the place. Maybe we can help you if you provide a reduced test case?
On Tuesday, August 21, 2012 8:40:13 AM UTC-7, Ankur rungta wrote:
> Hi,
> I am currently integrating js 1.8.5 with our environment.
> While integration when JS_GC API call is called then there is a crash in js::MarkRangeConservatively
> I have written a small program in which I created a new thread and called JS_GC in that.
> It was still crashing in js::MarkRangeConservatively.
> Please can anyone help me to know the correct usage where can we call JS_GC in js1.8.5.
> Thanks & Regards,
> Ankur.
There aren't particularly any restrictions on when JS_GC can be called--SpiderMonkey can internally trigger GCs all over the place. Maybe we can help you if you provide a reduced test case?
The problem that was happening is that we build js libs with single thread and we were using 1 thread to create the context and the global object and the other thread to call GC.
When JS_THREADSAFE is not used while building js in case we use 2 threads then it will result into the above crash.
Now I am using JS_THREADSAFE always while building
On Wednesday, August 29, 2012 3:35:32 AM UTC-7, unknow...@gmail.com wrote:
> Hi,
> The problem that was happening is that we build js libs with single thread and we were using 1 thread to create the context and the global object and the other thread to call GC.
> When JS_THREADSAFE is not used while building js in case we use 2 threads then it will result into the above crash.
> Now I am using JS_THREADSAFE always while building
> Thanks,
> Ankur.
Cool. Note that in newer versions (Firefox 12 and later), JSRuntimes are single-threaded, so working with objects on one thread and calling GC on another will not work.
On Wednesday, August 29, 2012 3:35:32 AM UTC-7, unknow...@gmail.com wrote:
> Hi,
> The problem that was happening is that we build js libs with single thread and we were using 1 thread to create the context and the global object and the other thread to call GC.
> When JS_THREADSAFE is not used while building js in case we use 2 threads then it will result into the above crash.
> Now I am using JS_THREADSAFE always while building
> Thanks,
> Ankur.
Cool. Note that in newer versions (Firefox 12 and later), JSRuntimes are single-threaded, so working with objects on one thread and calling GC on another will not work.