You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Running 2.1.18 under Java 8+Nashorn with optimize=closure, minification fails with an error:
TypeError: Cannot read property "invoke" from undefined
It is caused by this code in jslib/rhino/optimize.js:
//Bind to Closure compiler, but if it is not available, do not sweat it.try{// Try older closure compiler that worked on Java 6JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]);}catch(e){try{// Try for newer closure compiler that needs Java 7+JSSourceFilefromCode=java.lang.Class.forName('com.google.javascript.jscomp.SourceFile').getMethod('fromCode',[java.lang.String,java.lang.String]);}catch(e){}}//Helper for closure compiler, because of weird Java-JavaScript interactions.functionclosurefromCode(filename,content){returnJSSourceFilefromCode.invoke(null,[filename,content]);// <-- error happens here**}
Under Nashorn, the calls to java.lang.Class.forName(...) throw, which cause an error on the indicated line.
The text was updated successfully, but these errors were encountered:
Running 2.1.18 under Java 8+Nashorn with
optimize=closure, minification fails with an error:TypeError: Cannot read property "invoke" from undefinedIt is caused by this code in
jslib/rhino/optimize.js:Under Nashorn, the calls to
java.lang.Class.forName(...)throw, which cause an error on the indicated line.The text was updated successfully, but these errors were encountered: