Details
-
Enhancement
-
Resolution: Fixed
-
P2
-
None
-
None
-
b84
Description
For debuggabilty this patch would help a lot:
diff -r d5d80b52cf1c src/jdk/nashorn/internal/runtime/options/Options.java
--- a/src/jdk/nashorn/internal/runtime/options/Options.java Fri Mar 15 16:07:13 2013 +0100
+++ b/src/jdk/nashorn/internal/runtime/options/Options.java Tue Mar 19 18:16:36 2013 +0100
@@ -386,6 +386,13 @@
final LinkedList<String> argList = new LinkedList<>();
Collections.addAll(argList, args);
+ final String extra = getStringProperty("nashorn.args", null);
+ if (extra != null) {
+ for (final StringTokenizer st = new StringTokenizer(extra); st.hasMoreTokens(); ) {
+ argList.add(st.nextToken());
+ }
+ }
+
while (!argList.isEmpty()) {
final String arg = argList.remove(0);
@@ -406,7 +413,7 @@
files.add(arg);
continue;
}
-
+
if (arg.startsWith(definePropPrefix)) {
final String value = arg.substring(definePropPrefix.length());
final int eq = value.indexOf('=');
I.e. setting an environment variable like -Dnashorn.args="--lazy-compilation --log=codegen" would pass the corresponding flags to Nashorn. This would help me both with node debugging and the current JavaFX debugging. If this has no security implications - please tell me if it does, can we go ahead and push this?
diff -r d5d80b52cf1c src/jdk/nashorn/internal/runtime/options/Options.java
--- a/src/jdk/nashorn/internal/runtime/options/Options.java Fri Mar 15 16:07:13 2013 +0100
+++ b/src/jdk/nashorn/internal/runtime/options/Options.java Tue Mar 19 18:16:36 2013 +0100
@@ -386,6 +386,13 @@
final LinkedList<String> argList = new LinkedList<>();
Collections.addAll(argList, args);
+ final String extra = getStringProperty("nashorn.args", null);
+ if (extra != null) {
+ for (final StringTokenizer st = new StringTokenizer(extra); st.hasMoreTokens(); ) {
+ argList.add(st.nextToken());
+ }
+ }
+
while (!argList.isEmpty()) {
final String arg = argList.remove(0);
@@ -406,7 +413,7 @@
files.add(arg);
continue;
}
-
+
if (arg.startsWith(definePropPrefix)) {
final String value = arg.substring(definePropPrefix.length());
final int eq = value.indexOf('=');
I.e. setting an environment variable like -Dnashorn.args="--lazy-compilation --log=codegen" would pass the corresponding flags to Nashorn. This would help me both with node debugging and the current JavaFX debugging. If this has no security implications - please tell me if it does, can we go ahead and push this?