-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b70
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136288 | emb-9 | Hannes Wallnoefer | P3 | Resolved | Fixed | team |
JDK-8131004 | 8u65 | Hannes Wallnoefer | P3 | Resolved | Fixed | b05 |
JDK-8098832 | 8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | b22 |
JDK-8138556 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b05 |
JDK-8130612 | emb-8u60 | Hannes Wallnoefer | P3 | Resolved | Fixed | b22 |
Strict eval creates a new scope to avoid spilling declarations in the containing scope. It uses global.newObject() to create the scope object, which returns a generic JavaScript object.
However, Nashorn splitter expects scopes to implement the Scope interface. Loading a very large script that require splitting therefore leads to a ClassCastException:
jjs> "use strict"; var s = readFully("../octane/mandreel.js"); eval(s);
java.lang.ClassCastException: jdk.nashorn.internal.scripts.JD cannot be cast to jdk.nashorn.internal.runtime.Scope
However, Nashorn splitter expects scopes to implement the Scope interface. Loading a very large script that require splitting therefore leads to a ClassCastException:
jjs> "use strict"; var s = readFully("../octane/mandreel.js"); eval(s);
java.lang.ClassCastException: jdk.nashorn.internal.scripts.JD cannot be cast to jdk.nashorn.internal.runtime.Scope
- backported by
-
JDK-8098832 Strict eval throws ClassCastException with large scripts
-
- Resolved
-
-
JDK-8130612 Strict eval throws ClassCastException with large scripts
-
- Resolved
-
-
JDK-8131004 Strict eval throws ClassCastException with large scripts
-
- Resolved
-
-
JDK-8136288 Strict eval throws ClassCastException with large scripts
-
- Resolved
-
-
JDK-8138556 Strict eval throws ClassCastException with large scripts
-
- Resolved
-