Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.
Closes#2241
Refs #1886
Refs #1966
This was SVN commit r14496.
The Multiplayer lobby needs some changes to avoid compartment
mismatches. Instead of initializing it with a ScriptInterface and
storing script values at different locations, it takes a ScriptInterface
argument in the functions that really need to read or write some script
values and avoids storing values as script values with an associated
compartment where possible.
The scripting interface of the lobby is also adjusted to use
JSInterface_Lobby.h/cpp files as other components instead of adding all
functions to ScriptFunctions.cpp. This makes it a bit more clearly
arranged IMO.
Fixes#2267
Refs #2241
Refs #1886
This was SVN commit r14199.