context.setCompileFunctionsWithDynamicScope(true);
// Obtain the JS continuation object from it, and setup the
// JSCocoon object associated in the dynamic scope of the saved
// continuation with the environment and context objects.
JSWebContinuation jswk = (JSWebContinuation)wk.getUserObject();
JSCocoon cocoon = jswk.getJSCocoon();
cocoon.setContext(manager, environment, ctx);
Scriptable kScope = cocoon.getScope();
// We can now resume the processing from the state saved by the
// continuation object. Setup the JavaScript Context object.