rem: return function() { if (request.readyState == isComplete) {  var serverResponse = JSON.parse(_base64decode(request.responseText.replace('\n', '')));  if ((serverResponse instanceof Object) && ('__continuation' in serverResponse)) {  var res = null; var cont = function(r) {    if(r == undefined) r = {}; res = r; } var f = eval(serverResponse.__name); f.apply(f, [serverResponse.__arg, cont]); var request_ = _newXMLHttpRequest(); request_.open('POST', location.href, true); request_.onreadystatechange = _remoteCallHandler(kappa, request_); request_.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); request_.send("__continuation=" + serverResponse.__continuation + "&__result=" + _base64encode(JSON.stringify(res))); } else {  kappa(serverResponse); } } } 
add: _wrapEventHandler((function (key) {return function (event) {_formkey = key; action.handler(event)}})(key)); 
context:   return function() {    if (request.readyState == isComplete) {     // FIXME: this case apparently triggers if we leave the page.     var serverResponse = JSON.parse(_base64decode(request.responseText.replace('\n', '')));     if ((serverResponse instanceof Object) && ('__continuation' in serverResponse)) {        // it's a continuation        var res = null;        var cont = function(r) {          // [HACK]          //   Shouldn't functions with no return value          //   be returning unit rather than undefined?          if(r == undefined)            r = {};          res = r;        }        var f = eval(serverResponse.__name);        f.apply(f, [serverResponse.__arg, cont]);        var request_ = _newXMLHttpRequest();        request_.open('POST', location.href, true);        request_.onreadystatechange = _remoteCallHandler(kappa, request_);        request_.setRequestHeader('Content-Type',                                  'application/x-www-form-urlencoded');        request_.send("__continuation=" + serverResponse.__continuation +                       "&__result=" + _base64encode(JSON.stringify(res)));      }      else {        // it's the final result: return it.        kappa(serverResponse);      }    }  }
meta: 3249	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3249/4114bc9f001e202dbc72772c75cd3c5fbedd5463/jslib.js/buggy/lib/js/jslib.js