8164748: Edit pad crashes when calling function
authorsundar
Thu, 25 Aug 2016 22:23:59 +0530
changeset 40576 50b33dfee46a
parent 40575 e49bc2deb2f0
child 40577 d48c4f63e546
8164748: Edit pad crashes when calling function Reviewed-by: jlaskey
nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java
--- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java	Wed Aug 24 14:02:41 2016 +0530
+++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/jdk/nashorn/tools/jjs/Main.java	Thu Aug 25 22:23:59 2016 +0530
@@ -172,7 +172,7 @@
                 final Consumer<String> evaluator = str -> {
                     // could be called from different thread (GUI), we need to handle Context set/reset
                     final Global _oldGlobal = Context.getGlobal();
-                    final boolean _globalChanged = (oldGlobal != global);
+                    final boolean _globalChanged = (_oldGlobal != global);
                     if (_globalChanged) {
                         Context.setGlobal(global);
                     }