Subj : JS_THREADSAFE makes jsshell.exe fail - Reference Error To : netscape.public.mozilla.jseng From : Timothy Clancy Date : Sat Apr 30 2005 08:12 pm I've compiled SpiderMonkey - the latest stable release with JS_THREADSAFE defined. I've downloaded the NSPR library (4.4.1.0) for my compiler (MSVC 2002). I've also compiled the shell for testing again with JS_THREADSAFE defined. All files are in the same folder (js32.dll, libnspr4.dll, jsshell.exe, perfect.js). When I run the 'jsshell.exe perfect.js' from the command line I get the following output. --- > jsshell perfect.js A number is 'perfect' if it is equal to the sum of its divisors (excluding itself). perfect.js:16: ReferenceError: n is not defined --- n is a function argument (the first variable defined) and line 16 is the first time that variable is used. When I compile the js without NSPR, I can run this successfully. Do I need to rewrite the shell program to explicitly make use of threads? I would think that being "THREADSAFE" would imply a choice between using threads or not - so that coding practices only need to change if you are running js in multiple threads (which I will be when I sort this out). Thanks, Tim .