Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8156896

Script stack trace should display function names

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b119
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Currently Nashorn script stack traces display Java method names instead of JS function names. Java method names are composed from the function name appended to the names of its parent functions using '$' as separator. If any function in the chain is anonymous, the function itself will be displayed as "<anonymous>" in the stack trace.

        To solve this, we need to use a character that is not a valid ECMA identifier character as method separator name, but is allowed in Java method names. This would allow us to get the original function name from the Java method name and display it in script stack traces.

          Activity

          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/809ef81502ed
          User: hannesw
          Date: 2016-05-13 12:31:37 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/809ef81502ed User: hannesw Date: 2016-05-13 12:31:37 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/809ef81502ed
          User: lana
          Date: 2016-05-18 20:42:21 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/809ef81502ed User: lana Date: 2016-05-18 20:42:21 +0000

            People

            • Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              hannesw Hannes Wallnoefer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: