Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u60
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description


      jjs> try{ x={}; (function(){ try { throw null; } catch(x) { with({}) return; } finally { eval("'a'.replace('a', Function.apply)"); }})() }catch(e){e.printStackTrace()}
      java.lang.ClassCastException: jdk.nashorn.internal.scripts.JO1P0 cannot be cast to jdk.nashorn.internal.runtime.WithObject
         at jdk.nashorn.internal.runtime.WithObject.withExpressionGuard(WithObject.java:363)
         at jdk.nashorn.internal.scripts.Script$Recompilation$15$\^shell\_#1\!84\^eval\_.:program(<shell>#1:84<eval>:1)
         at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)
         at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
         at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
         at jdk.nashorn.internal.runtime.Context.eval(Context.java:711)
         at jdk.nashorn.internal.objects.Global.directEval(Global.java:941)
         at jdk.nashorn.internal.scripts.Script$Recompilation$13$12$\^shell\_.L:1(<shell>:1)
         at jdk.nashorn.internal.scripts.Script$Recompilation$11$\^shell\_.:program(<shell>:1)
         at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:636)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                attila Attila Szegedi
                Reporter:
                lagergren Marcus Lagergren
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: