JDK-8032068 : implement @sourceURL and #sourceURL directives
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-01-17
  • Updated: 2014-07-29
  • Resolved: 2014-01-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b02Fixed
Related Reports
Relates :  
Description
//@sourceURL (and the newer //#sourceURL) directive comment allows a name to associated with the script being evaluated. This helps debugging eval, Function code that is unnamed. Nashorn has 'load' from object with 'name' and 'script' properties. But @sourceURL is supported by other tools/implementations like firebug, v8.

See also: 

http://blog.getfirebug.com/2009/08/11/give-your-eval-a-name-with-sourceurl/
https://bugzilla.mozilla.org/show_bug.cgi?id=583083
https://developers.google.com/chrome-developer-tools/docs/javascript-debugging
http://updates.html5rocks.com/2013/06/sourceMappingURL-and-sourceURL-syntax-changed