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

Indirect eval fails when used as an element of an array or as a property of an object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8u60, 9
    • core-libs
    • None
    • b54
    • generic
    • generic

        var args = [ eval ];
        args[0]("print('hello')"); // TypeError thrown here

        var obj = { foo: eval };
        obj.foo("print('hello')"); // // TypeError thrown here

        Bug reported by Marcus Lagergren.

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

                Created:
                Updated:
                Resolved: