cjolif 2003/09/08 04:07:48
Modified: sources/org/apache/batik/script/rhino RhinoInterpreter.java
Log:
Modification to comply with latest Rhino builds
Revision Changes Path
1.35 +12 -12
xml-batik/sources/org/apache/batik/script/rhino/RhinoInterpreter.java
Index: RhinoInterpreter.java
===================================================================
RCS file:
/home/cvs/xml-batik/sources/org/apache/batik/script/rhino/RhinoInterpreter.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- RhinoInterpreter.java 9 Aug 2003 16:58:40 -0000 1.34
+++ RhinoInterpreter.java 8 Sep 2003 11:07:48 -0000 1.35
@@ -184,13 +184,13 @@
// import Java lang package & DOM Level 2 & SVG DOM packages
NativeJavaPackage[] p= new NativeJavaPackage[TO_BE_IMPORTED.length];
for (int i = 0; i < TO_BE_IMPORTED.length; i++) {
- p[i] = new NativeJavaPackage(TO_BE_IMPORTED[i]);
+ p[i] = new NativeJavaPackage(TO_BE_IMPORTED[i], rhinoClassLoader);
} try {
- ScriptableObject.callMethod(globalObject, "importPackage", p);
- } catch (JavaScriptException e) {
- // cannot happen as we know the method is there and
- // the parameters are ok
- }
+ ScriptableObject.callMethod(globalObject, "importPackage", p);
+ } catch (JavaScriptException e) {
+ // cannot happen as we know the method is there and
+ // the parameters are ok
+ }
} finally {
Context.exit();
}
@@ -327,7 +327,7 @@
public Object run() {
try {
return ctx.compileReader
- (globalObject,
+ (globalObject,
new StringReader(scriptstr),
SOURCE_NAME_SVG,
1, rhinoClassLoader);
@@ -371,7 +371,7 @@
// other RuntimeExceptions
throw new InterpreterException(re, re.getMessage(), -1, -1);
}
-
+
} finally {
Context.exit();
}
@@ -501,7 +501,7 @@
*/
void callHandler(Function handler, ArgumentsBuilder ab)
throws JavaScriptException {
- Context ctx = enterContext();
+ Context ctx = enterContext();
try {
Object [] args = ab.buildArguments();
handler.call(ctx, handler.getParentScope(), globalObject, args );
@@ -572,11 +572,11 @@
public ExtendedContext() {
super();
}
-
+
public RhinoInterpreter getInterpreter() {
return RhinoInterpreter.this;
}
-
+
public Window getWindow() {
return RhinoInterpreter.this.getWindow();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]