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.

          Attachments

            Issue Links

              Activity

                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: