ovidiu      02/04/18 23:58:22

  Modified:    src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript
                        JavaScriptInterpreter.java
  Log:
  Removed the dependency on InvokeContext.
  
  Revision  Changes    Path
  1.5       +8 -10     
xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/JavaScriptInterpreter.java
  
  Index: JavaScriptInterpreter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/schecoon/src/org/apache/cocoon/components/flow/javascript/JavaScriptInterpreter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JavaScriptInterpreter.java        16 Apr 2002 00:21:30 -0000      1.4
  +++ JavaScriptInterpreter.java        19 Apr 2002 06:58:22 -0000      1.5
  @@ -12,7 +12,6 @@
   import org.apache.cocoon.components.flow.Interpreter;
   import org.apache.cocoon.components.flow.AbstractInterpreter;
   import org.apache.cocoon.components.flow.WebContinuation;
  -import org.apache.cocoon.components.treeprocessor.InvokeContext;
   import org.apache.cocoon.environment.Environment;
   import org.apache.cocoon.environment.Source;
   import org.mozilla.javascript.Context;
  @@ -34,7 +33,7 @@
   {
     // This is the only optimization level that supports continuations
     // in the Christoper Oliver's Rhino JavaScript implementation
  -  static int OPTIMIZATION_LEVEL = -1;
  +  static int OPTIMIZATION_LEVEL = -2;
   
     JSGlobal scope;
   
  @@ -91,7 +90,7 @@
       }
     }
   
  -  protected Scriptable enterContext(Environment environment, InvokeContext ctx)
  +  protected Scriptable enterContext(Environment environment)
       throws Exception
     {
       Context context = Context.enter();
  @@ -111,7 +110,7 @@
       Object args[] = {};
       Scriptable cocoon = context.newObject(scope, "Cocoon", args);
       ((JSCocoon)cocoon).setInterpreter(this);
  -    ((JSCocoon)cocoon).setContext(manager, environment, ctx);
  +    ((JSCocoon)cocoon).setContext(manager, environment);
       ((JSCocoon)cocoon).setScope(thrScope);
       thrScope.put("cocoon", thrScope, cocoon);
   
  @@ -139,7 +138,7 @@
       System.out.println("Reading file " + sourceName);
   
       try {
  -      thrScope = enterContext(environment, null);
  +      thrScope = enterContext(environment);
         source = environment.resolve(sourceName);
         InputStream inputStream = source.getInputStream();
         Reader reader = new BufferedReader(new InputStreamReader(inputStream));
  @@ -165,11 +164,10 @@
      * @param funName a <code>String</code> value
      * @param params a <code>List</code> value
      * @param environment an <code>Environment</code> value
  -   * @param ctx an <code>InvokeContext</code> value
      * @exception Exception if an error occurs
      */
     public void callFunction(String funName, List params,
  -                           Environment environment, InvokeContext ctx)
  +                           Environment environment)
       throws Exception
     {
       Scriptable thrScope = null;
  @@ -177,7 +175,7 @@
       checkForModifiedScripts(environment);
   
       try {
  -      thrScope = enterContext(environment, ctx);
  +      thrScope = enterContext(environment);
         JSCocoon cocoon = (JSCocoon)thrScope.get("cocoon", thrScope);
   
         Object callFunction = scope.get("callFunction", thrScope);
  @@ -216,7 +214,7 @@
     }
   
     public void handleContinuation(String id, List params,
  -                                 Environment environment, InvokeContext ctx)
  +                                 Environment environment)
       throws Exception
     {
       WebContinuation wk = continuationsMgr.lookupWebContinuation(id);
  @@ -233,7 +231,7 @@
       // continuation with the environment and context objects.
       JSWebContinuation jswk = (JSWebContinuation)wk.getUserObject();
       JSCocoon cocoon = jswk.getJSCocoon();
  -    cocoon.setContext(manager, environment, ctx);
  +    cocoon.setContext(manager, environment);
       Scriptable kScope = cocoon.getScope();
   
       // We can now resume the processing from the state saved by the
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to