cx.evaluateString(globalScope,
"function f(a) { return myObject.f(a); }",
"function test source", 1, null);
Function f = (Function) globalScope.get("f", globalScope);
Object[] args = { 7 };
cx.callFunctionWithContinuations(f, globalScope, args);
fail("Should throw ContinuationPending");
} catch (ContinuationPending pending) {
Object applicationState = pending.getApplicationState();
assertEquals(7, ((Number)applicationState).intValue());
int saved = (Integer) applicationState;