src/jdk/nashorn/tools/Shell.java

Print this page

        

@@ -451,11 +451,11 @@
                     err.println(JSType.toString(res));
                 }
             }
         } finally {
             if (globalChanged) {
-                Context.setGlobal(global);
+                Context.setGlobal(oldGlobal);
             }
         }
 
         return SUCCESS;
     }