0ad/source/graphics/tests
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
..
test_Color.h Add GPL header 2009-04-18 17:00:33 +00:00
test_LOSTexture.h Changes tests to use global g_ScriptRuntime instead of creating a new JSRuntime for each test. 2014-04-25 21:19:51 +00:00
test_MeshManager.h Fixes tests broken by [11100] 2012-02-19 22:00:29 +00:00
test_ShaderManager.h Set svn:eol-style=native, fix some inconsistent line endings 2013-12-06 00:42:50 +00:00
test_Terrain.h Delete an unused obsolete method 2012-04-17 21:06:47 +00:00
test_TextureConverter.h Cleanup tex_codec, fixes #2456, patch by IronNerd. 2014-03-13 04:16:20 +00:00
test_TextureManager.h Cleanup tex_codec, fixes #2456, patch by IronNerd. 2014-03-13 04:16:20 +00:00