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

Can't call foreign constructor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • None
    • 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: