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

Can't call foreign constructor

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P3
    • Resolution: Fixed
    • None
    • 8
    • core-libs
    • None
    • b98
    • generic
    • generic
    • Verified

    Description

      A function loaded and returned from a foreign context can't be called with new operator.

      Test case:

      var se = new javax.script.ScriptEngineManager();
      var e = se.getEngineByName("nashorn");
      e.eval("function doIt2(){}");
      var b = e.getBindings(javax.script.ScriptContext.ENGINE_SCOPE);
      for( k in b){
          new b[k]();
      }

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: