- Interpreter i = new Interpreter((JSFunction)f, true, new Interpreter.JSArgs(f));
- JS ret = i.resume();
- while(up != null) {
- JS.UnpauseCallback up = Test.up; Test.up = null;
- if("throw".equals(action)) ret = up.unpause(new JSExn("this was thrown to a paused context"));
- else if("bgget".equals(action)) ret = up.unpause(JS.S("I'm returning this from a get request"));
+ Interpreter i = new Interpreter((JSFunction)f, true, new JS[0]);
+ JS ret = (JS)i.run(null);
+ try { while(true) {
+ if("throw".equals(action)) ret = (JS)i.run(new JSExn("this was thrown to a paused context"));
+ else if("bgget".equals(action)) ret = (JS)i.run(Script.S("I'm returning this from a get request"));