Possible scope leak in Nashorn
André Bargull
andrebargull at googlemail.com
Tue Dec 10 08:52:23 PST 2013
> Thanks, I adapted the code to use ScriptUtils.wrap() and encountered a
> strange situation where JSON.stringify returns undefined for a valid JS
> object. Maybe another scope problem?
>
> Here is a reproducer:https://gist.github.com/purplefox/7893408
No, it's not a scope problem. JSON.stringify isn't able to process
ScriptObjectMirror objects, see ll. 263-270 in NativeJSON.java [1].
- André
[1]
http://hg.openjdk.java.net/nashorn/jdk8/nashorn/file/tip/src/jdk/nashorn/internal/objects/NativeJSON.java
More information about the nashorn-dev
mailing list