Fixes compartment mismatch introduced in r15549.

Also modifies some related functions to use SpiderMonkey stack rooting types instead of CScriptValRooted.

Refs #2415 


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15561 3db68df2-c116-0410-a063-a993310a9797
Removes rooting test.

Rooting works different now and the CScriptVal types are going to be removed. We will need rooting tests again, but they will have to work completely different than this test implementation.

Refs #2415


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15562 3db68df2-c116-0410-a063-a993310a9797
Some changes on the VisibilityUpdate message system, aimed at correcting recent OOS problems.
I still experience troubles with serialization tests but I played a few games without OOS. At least these changes will help us to debug more efficiently the remaining problems.

Fixes initialization of visibility data and update order for LoS-related systems (territory borders, etc).
Also removes a C-like array and fixes a player ID shifting.

Refs #599

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15563 3db68df2-c116-0410-a063-a993310a9797
Automated build.

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15564 3db68df2-c116-0410-a063-a993310a9797
Merge 'remotes/trunk'
Workaround for issue #2486

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15565 3db68df2-c116-0410-a063-a993310a9797
Should be workaround for issue #2684

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15566 3db68df2-c116-0410-a063-a993310a9797
Better support for SpiderMonkey rooted types in the ScriptInterface.

* Adds additional overloads/specializations which are required when passing JS::Handle<T>/JS::MutableHandle<T> types to different functions. 
* Replaces GetPropertyJS with a GetProperty specialization.
* Allows us to avoid the implementation of ToJSVal specializations for JS::Value and JS::HandleValue. Such conversions should only happen if there's no way around it and if you are aware of it.
* Adds test to make sure that all potentially required specializations with custom implementations are instantiated. This should help prevent introducing bugs in temporarily unused code.

Refs #2415


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15567 3db68df2-c116-0410-a063-a993310a9797
Quite a lot of stack rooting related changes.

Changes GetProperty, SetProperty and HasProperty and a few other functions to take handles. The conversions to CScriptVal or CScriptValRooted at some places should be removed in the future. I've done that to avoid an even larger patch.

Refs #2415
Refs #2462  


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15568 3db68df2-c116-0410-a063-a993310a9797
Merge 'remotes/trunk'
Fixes small memory leak introduced in r15568.

Thanks to leper for pointing it out.


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15569 3db68df2-c116-0410-a063-a993310a9797
Bunch of petra bug fixes: fixes #2685, #2686 and makes r15559 really working

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15570 3db68df2-c116-0410-a063-a993310a9797
Fixes crash in replay mode introduced in r15568.


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15571 3db68df2-c116-0410-a063-a993310a9797
Merge 'remotes/trunk'
Fixes crash when generating random maps.

We must not be in a request when calling the ScriptInterface destructor.


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15572 3db68df2-c116-0410-a063-a993310a9797
Fix crash when starting Atlas (introduced in r15568). 


git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15573 3db68df2-c116-0410-a063-a993310a9797
Merge 'remotes/trunk'
fixes #2690 in Petra AI

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15574 3db68df2-c116-0410-a063-a993310a9797
Merge 'remotes/trunk'
petra: temporary fix, waiting to be able to deal with training restrictions

git-svn-id: http://svn.wildfiregames.com/public/ps/trunk@15575 3db68df2-c116-0410-a063-a993310a9797