This seems to be working as expected. I tested your modifications on jdk8 nashorn-dev
Good catch Hannes! Please review the updated webrev : > http://cr.openjdk.java.net/~sundar/8170565/webrev.01/ > > PS. Had to use Function.prototype.call.call to pass undefined this > explicitly (as JSObject.call can't be called from script). > > -Sundar