I am using the latest release of SpiderMonkey (js185-1.0.0.tar.gz) and when I am running the sample program which embeds Javascript, crashes the program
The sample program is directly from the docs
The program runs fine if I am using JS_NewCompartmentAndGlobalObject but the docs mention to use JS_NewGlobalObject as it is "Obsolete since JSAPI 16"
Hence I replaced the JS_NewCompartmentAndGlobalObject
with JS_NewGlobalObject
and since then the sample program crashes at line: 55 in the sample program found here
What is the solution here?
I am using CentOS 6.2 64-bit version.