java-1.8.0-openjdk/rhino.patch
2013-03-12 09:35:26 -04:00

158 lines
6.1 KiB
Diff

diff --git a/make/com/sun/Makefile b/make/com/sun/Makefile
--- jdk8/jdk/make/com/sun/Makefile
+++ jdk8/jdk/make/com/sun/Makefile
@@ -31,13 +31,6 @@
PRODUCT = sun
include $(BUILDDIR)/common/Defs.gmk
-ifndef OPENJDK
- ORG_EXISTS := $(call DirExists,$(CLOSED_SRC)/share/classes/sun/org,,)
- ifneq ("$(ORG_EXISTS)", "")
- SCRIPT_SUBDIR = script
- endif
-endif
-
# jarsigner is part of JRE
SUBDIRS = java security net/ssl jarsigner
@@ -45,7 +38,7 @@
SUBDIRS_desktop = image
SUBDIRS_enterprise = crypto/provider jndi \
org rowset net/httpserver
-SUBDIRS_misc = $(SCRIPT_SUBDIR) tracing servicetag nio demo
+SUBDIRS_misc = script tracing servicetag nio demo
SUBDIRS_tools = tools
diff --git a/make/com/sun/script/Makefile b/make/com/sun/script/Makefile
--- jdk8/jdk/make/com/sun/script/Makefile
+++ jdk8/jdk/make/com/sun/script/Makefile
@@ -31,6 +31,8 @@
AUTO_FILES_JAVA_DIRS = com/sun/script
+OTHER_JAVACFLAGS = -classpath $(RHINO_JAR)
+
#
# Files that need to be copied
#
diff --git a/make/common/Release.gmk b/make/common/Release.gmk
--- jdk8/jdk/make/common/Release.gmk
+++ jdk8/jdk/make/common/Release.gmk
@@ -813,6 +813,7 @@
$(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar
$(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar
$(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar
+ $(CP) $(RHINO_JAR) $(JRE_IMAGE_DIR)/lib/rhino.jar
ifneq ($(JFR_JAR),)
$(CP) $(JFR_JAR) $(JRE_IMAGE_DIR)/lib/jfr.jar
endif
diff --git a/src/share/classes/com/sun/script/javascript/ExternalScriptable.java b/src/share/classes/com/sun/script/javascript/ExternalScriptable.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/ExternalScriptable.java
@@ -24,7 +24,7 @@
*/
package com.sun.script.javascript;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
import javax.script.*;
import java.util.*;
diff --git a/src/share/classes/com/sun/script/javascript/JSAdapter.java b/src/share/classes/com/sun/script/javascript/JSAdapter.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/JSAdapter.java
@@ -25,7 +25,7 @@
package com.sun.script.javascript;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
import java.util.*;
/**
diff --git a/src/share/classes/com/sun/script/javascript/JavaAdapter.java b/src/share/classes/com/sun/script/javascript/JavaAdapter.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/JavaAdapter.java
@@ -26,7 +26,7 @@
package com.sun.script.javascript;
import javax.script.Invocable;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
/**
* This class implements Rhino-like JavaAdapter to help implement a Java
diff --git a/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java b/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoClassShutter.java
@@ -26,7 +26,7 @@
package com.sun.script.javascript;
import java.util.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
/**
* This class prevents script access to certain sensitive classes.
diff --git a/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java b/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoCompiledScript.java
@@ -25,7 +25,7 @@
package com.sun.script.javascript;
import javax.script.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
/**
* Represents compiled JavaScript code.
diff --git a/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java b/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngine.java
@@ -26,7 +26,7 @@
package com.sun.script.javascript;
import com.sun.script.util.*;
import javax.script.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
import java.lang.reflect.Method;
import java.io.*;
import java.util.*;
diff --git a/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java b/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoScriptEngineFactory.java
@@ -26,7 +26,7 @@
package com.sun.script.javascript;
import javax.script.*;
import java.util.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
import com.sun.script.util.*;
/**
diff --git a/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java b/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoTopLevel.java
@@ -25,7 +25,7 @@
package com.sun.script.javascript;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
import javax.script.*;
/**
diff --git a/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java b/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java
--- jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java
+++ jdk8/jdk/src/share/classes/com/sun/script/javascript/RhinoWrapFactory.java
@@ -27,7 +27,7 @@
import java.lang.reflect.*;
import static sun.security.util.SecurityConstants.*;
-import sun.org.mozilla.javascript.internal.*;
+import sun.org.mozilla.javascript.*;
/**
* This wrap factory is used for security reasons. JSR 223 script