Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2267 closed task (fixed)

[PATCH] Spidermonkey lobby compatibility

Reported by: Yves Owned by: Yves
Priority: Should Have Milestone: Alpha 15
Component: UI & Simulation Keywords: Spidermonkey
Cc: Patch:

Description

In #2241 I'm going to change the GUI to have one ScriptInterface for each GUI page because that will be required for the Spidermonkey upgrade (#1886). 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.

I still need to apply this patch to a GIT working copy and test if my WIP patch for #2241 works based on these changes, but I think it should and therefore already upload the patch here.

Feedback is appreciated!

Attachments (1)

SpidermonkeyLobbyCompatibility_v1.0.diff (37.2 KB ) - added by Yves 10 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Yves, 10 years ago

Resolution: fixed
Status: newclosed

In 14199:

In #2241 I'm going to change the GUI to have one ScriptInterface for each GUI page because that will be required for the Spidermonkey upgrade (#1886).
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

comment:2 by Yves, 10 years ago

Keywords: review removed

comment:3 by Yves, 10 years ago

In 14203:

Fixes compiling with the flag "--without-lobby".

Refs #2267

Note: See TracTickets for help on using tickets.