diff options
author | Andre Fischer <af@apache.org> | 2011-12-23 08:25:48 +0000 |
---|---|---|
committer | Andre Fischer <af@apache.org> | 2011-12-23 08:25:48 +0000 |
commit | 3109a6eef3f78b65a71d693efdd6fb3e471548cb (patch) | |
tree | bf7c603ee8be263396a350a31b900ed763b9004a | |
parent | 62c9b62b380b158dfa39547684c2ad23e5b98018 (diff) |
118623: Update of rhino from 1.5R5 to 1.7R3.
Author: Tsutomu Uchino
-rwxr-xr-x | rhino/README | 5 | ||||
-rwxr-xr-x | rhino/makefile.mk | 14 | ||||
-rw-r--r-- | rhino/prj/d.lst | 2 | ||||
-rw-r--r-- | scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java | 7 | ||||
-rwxr-xr-x | scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java | 6 |
5 files changed, 20 insertions, 14 deletions
diff --git a/rhino/README b/rhino/README index f8f47a186e20..c99011ae3eb5 100755 --- a/rhino/README +++ b/rhino/README @@ -6,7 +6,6 @@ In addition, to support the debugging of scripts contained in OpenOffice.org documents, we have modified the Java source file Main.java. The Rhino source tarball is unpacked and patched with the modified code. The -Rhino Jar file (js.jar) is then built (download/swingExSrc.zip is unpacked and -built as part of this procesS) and delivered to the solver. The file -rhino1_5R5.patch contains the changes made in order to build Rhino. The patch +Rhino Jar file (js.jar) is then built and delivered to the solver. The file +rhino1_7R3.patch contains the changes made in order to build Rhino. The patch was generated using the command: diff -wurN diff --git a/rhino/makefile.mk b/rhino/makefile.mk index e593f93ab09f..4feed4706d22 100755 --- a/rhino/makefile.mk +++ b/rhino/makefile.mk @@ -48,23 +48,21 @@ all: #.IF "$(DISABLE_RHINO)" == "" -TARFILE_NAME=rhino1_5R5 -TARFILE_MD5=798b2ffdc8bcfe7bca2cf92b62caf685 -TARFILE_ROOTDIR=rhino1_5R5 +TARFILE_NAME=rhino1_7R3 +TARFILE_MD5=99d94103662a8d0b571e247a77432ac5 +TARFILE_ROOTDIR=rhino1_7R3 ADDITIONAL_FILES= \ toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java -PATCH_FILES=rhino1_5R5.patch \ - rhino1_5R5-find_swing.patch \ - rhino1_5R5-updateToolTip.patch +PATCH_FILES=rhino1_7R3.patch .IF "$(JAVACISGCJ)"=="yes" JAVA_HOME= .EXPORT : JAVA_HOME -BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -Dbuild.compiler=gcj jar +BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -Dbuild.compiler=gcj -Dno-xmlbeans=true jar .ELSE -BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" jar +BUILD_ACTION=$(ANT) -Dbuild.label="build-$(RSCREVISION)" -Dno-xmlbeans=true jar .ENDIF # --- Targets ------------------------------------------------------ diff --git a/rhino/prj/d.lst b/rhino/prj/d.lst index 8fb6716524c8..b73bea45402f 100644 --- a/rhino/prj/d.lst +++ b/rhino/prj/d.lst @@ -1 +1 @@ -..\%__SRC%\misc\build\rhino1_5R5\build\rhino1_5R5\js.jar %_DEST%\bin%_EXT%\js.jar +..\%__SRC%\misc\build\rhino1_7R3\build\rhino1_7R3\js.jar %_DEST%\bin%_EXT%\js.jar diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java index 8abfc485b976..c461db5edfd6 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java @@ -261,6 +261,11 @@ public class ScriptEditorForJavaScript implements ScriptEditor } final Main sdb = new Main("Rhino JavaScript Debugger"); + org.mozilla.javascript.tools.shell.ShellContextFactory contextFactory = + new org.mozilla.javascript.tools.shell.ShellContextFactory(); + sdb.attachTo(contextFactory); + contextFactory.setLanguageVersion(Context.VERSION_1_8); + contextFactory.setOptimizationLevel(9); sdb.pack(); sdb.setSize(640, 640); sdb.setVisible(true); @@ -271,12 +276,14 @@ public class ScriptEditorForJavaScript implements ScriptEditor shutdown(); } }); + /* Context.addContextListener(sdb); sdb.setScopeProvider(new ScopeProvider() { public Scriptable getScope() { return org.mozilla.javascript.tools.shell.Main.getScope(); } }); + */ sdb.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { shutdown(); diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index fc6f787c8acb..cfb09770fba9 100755 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -264,6 +264,8 @@ class ScriptImpl implements XScript // Initialize a Rhino Context object ctxt = Context.enter(); + ctxt.setLanguageVersion(Context.VERSION_1_8); + ctxt.setOptimizationLevel(9); /* The ImporterTopLevel ensures that importClass and importPackage statements work in Javascript scripts @@ -289,14 +291,14 @@ class ScriptImpl implements XScript catch (JavaScriptException jse) { LogUtils.DEBUG( "Caught JavaScriptException exception for JavaScript type = " + jse.getClass() ); String message = jse.getMessage(); - //int lineNo = jse.getLineNumber(); + int lineNo = jse.lineNumber(); Object wrap = jse.getValue(); LogUtils.DEBUG( "\t message " + message ); LogUtils.DEBUG( "\t wrapped type " + wrap.getClass() ); LogUtils.DEBUG( "\t wrapped toString " + wrap.toString() ); ScriptExceptionRaisedException se = new ScriptExceptionRaisedException( message ); - se.lineNum = -1; + se.lineNum = lineNo; se.language = "JavaScript"; se.scriptName = metaData.getLanguageName(); se.exceptionType = wrap.getClass().getName(); |