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

Indirect evals should be strict with -strict option

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • core-libs
    • None
    • b70
    • generic
    • generic

    Backports

      Description

        When -strict option, all evals regardless of "direct" or "indirect" have to be strict. This rule is consistent with Rhino.

        With nashorn, all Functions are strict with -strict flag. But indirect evals are not strict with -strict.

        Test script:

        // indirect eval. Undefined variable assignment
        this.eval("x = 44");

        The above should result in ReferenceError with -strict option.

        Attachments

          Issue Links

            Activity

              People

                sundar Sundararajan Athijegannathan
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: