It has been backported to 8u already! https://bugs.openjdk.java.net/browse/JDK-8157926
http://hg.openjdk.java.net/jdk8u/jdk8u-dev/nashorn/rev/133a3c6c906e -Sundar On 6/1/2016 7:02 PM, Silas Baronda wrote: > Sorry for the late reply, but is this [1] going to be backported to > 8u? This would be extremely helpful for webpack generated files used > for Server Side Rendering. > > [1]: https://bugs.openjdk.java.net/browse/JDK-8156714 > > —Silas > > On Fri, May 13, 2016 at 12:12 PM, Sundararajan Athijegannathan > <sundararajan.athijegannat...@oracle.com > <mailto:sundararajan.athijegannat...@oracle.com>> wrote: > > +1 > > > On 5/13/2016 9:22 PM, Hannes Wallnoefer wrote: > > Please review JDK-8156714: Parsing issue with automatic semicolon > > insertion: > > > > http://cr.openjdk.java.net/~hannesw/8156714/webrev/ > <http://cr.openjdk.java.net/%7Ehannesw/8156714/webrev/> > > > > Comments are irrelevant for newline detection so we should > ignore them > > when assigning to AbstractParser.last. > > > > Note that this causes three endPositions to change in > > test/script/nosecurity/parserapi.js.EXPECTED. This is caused by the > > parser API no longer including trailing comments to functions. > > > > For example consider the following code (taken from parserapi.js > > itself, this is the first changed endPosition): > > > > function Parser() { > > // create nashorn parser > > this._parser = Parser.create(); > > } > > > > // Java types used > > > > > > Previously the endPosition of the Parser function would be the > end of > > the trailing comment. With this change, the function's > endPosition is > > before the trailing comment starts, which seems more correct. > > > > Hannes > >