0ad/source/scriptinterface
Yves 7acdde5c86 Changes tests to use global g_ScriptRuntime instead of creating a new JSRuntime for each test.
The tests crashed on my Debian systems but not on my Ubuntu system.
The crash happened in line 142 of SpiderMonkey's ThreadLocal.h.

I know that I had to use a workarounnd for contexts to avoid destroying
the context that was created first. I also had in mind that in newer
versions a JS_Init function got introduced which presumably solves this
kind of issues.
Based on this experience I assumed runtimes could have a similar problem
and this patch indeed fixes the issues.
Unfortunately the correct usage of JSRuntimes in that regard is not
documented.
There's only a rater misterious comment in JSAPI.h which hasn't been
cleared up so far and is most likely completely outdated
(https://bugzilla.mozilla.org/show_bug.cgi?id=992641).

This was SVN commit r14995.
2014-04-25 21:19:51 +00:00
..
tests Changes tests to use global g_ScriptRuntime instead of creating a new JSRuntime for each test. 2014-04-25 21:19:51 +00:00
AutoRooters.cpp Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
AutoRooters.h Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
DebuggingServer.cpp Adds precompiled.h include because Visual Studio checks for that even though the file only contains comments. 2014-01-05 13:58:38 +00:00
DebuggingServer.h I completely missed the header files when disabling the JS debugger. 2014-01-05 10:26:27 +00:00
NativeWrapperDecls.h Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
NativeWrapperDefns.h Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptConversions.cpp Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptExtraHeaders.h Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptInterface.cpp Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptInterface.h Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptStats.cpp Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptStats.h Add JS memory usage to profiler. 2010-08-02 19:23:58 +00:00
ScriptTypes.h Suppresses MSVC warning C4005 'macro redefinition' from SpiderMonkey upgrade 2014-04-23 21:12:28 +00:00
ScriptVal.cpp Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ScriptVal.h Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
ThreadDebugger.cpp Adds precompiled.h include because Visual Studio checks for that even though the file only contains comments. 2014-01-05 13:58:38 +00:00
ThreadDebugger.h I completely missed the header files when disabling the JS debugger. 2014-01-05 10:26:27 +00:00