Let's continue to decode the value for each requesting function
(just to be safe), but let's document why we're doing that as well as do it outside the try/catch, in case there's an error in our code. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@518 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -417,8 +417,10 @@ public class GameControlBackend
|
||||
if (arr != null) {
|
||||
delete _cookieCallbacks[cookie.playerId];
|
||||
for each (var fn :Function in arr) {
|
||||
// we want to decode every time, in case usercode mangles the value
|
||||
var decodedValue :Object = ObjectMarshaller.decode(cookie.cookie);
|
||||
try {
|
||||
fn(ObjectMarshaller.decode(cookie.cookie));
|
||||
fn(decodedValue);
|
||||
} catch (err :Error) {
|
||||
log.warning("Error in user-code: " + err);
|
||||
log.logStackTrace(err);
|
||||
|
||||
Reference in New Issue
Block a user