ovidiu 02/04/08 22:35:02
Modified: src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript
system.js
Log:
Use the new Continuation object instead of the callCC function to
capture the continuation.
Revision Changes Path
1.7 +10 -20
xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/system.js
Index: system.js
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/system.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- system.js 2 Apr 2002 05:38:11 -0000 1.6
+++ system.js 9 Apr 2002 05:35:02 -0000 1.7
@@ -12,36 +12,26 @@
function callFunction(func, args)
{
- callCC(function(k) {
- suicide = k;
- func.apply(this, args);
- });
+ suicide = new Continuation();
+ return func.apply(this, args);
}
function sendPage(pipelineName, pipelineArgs, bizData)
{
- var kont;
- callCC(function(k) {
- kont = new WebContinuation(cocoon, k, lastContinuation);
- cocoon.processPipeline(pipelineName, pipelineArgs, bizData, kont);
- suicide();
- });
-
+ var k = new Continuation();
+ var kont = new WebContinuation(cocoon, k, lastContinuation);
+ cocoon.processPipeline(pipelineName, pipelineArgs, bizData, kont);
lastContinuation = kont;
- return kont;
+ suicide();
}
function forwardTo(uri, bizData)
{
- var kont;
- callCC(function(k) {
- kont = new WebContinuation(cocoon, k, lastContinuation);
- cocoon.forwardTo(uri, bizData, kont);
- suicide();
- });
-
+ var k = new Continuation();
+ var kont = new WebContinuation(cocoon, k, lastContinuation);
+ cocoon.forwardTo(uri, bizData, kont);
lastContinuation = kont;
- return kont;
+ suicide();
}
function handleContinuation(kont)
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]