0ad/source/simulation2
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
..
components Changes tests to use global g_ScriptRuntime instead of creating a new JSRuntime for each test. 2014-04-25 21:19:51 +00:00
docs Updates example component documentation 2013-02-26 19:58:51 +00:00
helpers fix compiling problem caused by 8226d75715 2014-01-07 14:37:02 +00:00
scripting Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
serialization Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
system Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +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
MessageTypes.h Fix missing territory decay when moving out of territory without changing the actual territory. Add possibility to check movement over territory boders in the JS simulation part. Based on patch by niektb 2014-02-16 15:22:11 +00:00
Simulation2.cpp Second (main) commit for the SpiderMonkey upgrade. 2014-03-28 20:26:32 +00:00
Simulation2.h Removes g_ScriptingHost and implements global to compartment 1 to 1 relation. 2014-01-04 10:14:53 +00:00
TypeList.h Fix missing territory decay when moving out of territory without changing the actual territory. Add possibility to check movement over territory boders in the JS simulation part. Based on patch by niektb 2014-02-16 15:22:11 +00:00