Re: RFR 8170565: JSObject call() is passed undefined for the argument 'thiz'

2016-12-02 Thread Sundararajan Athijegannathan
Thanks. I've tested the patch on jdk8u. I've sent for approval request: http://mail.openjdk.java.net/pipermail/jdk8u-dev/2016-December/006186.html -Sundar On 12/2/2016 12:56 PM, Art Fiedler wrote: > This seems to be working as expected. I tested your modifications on jdk8 > nashorn-dev > > Good

Re: RFR 8170565: JSObject call() is passed undefined for the argument 'thiz'

2016-12-01 Thread Attila Szegedi
+1 > On 01 Dec 2016, at 13:48, Sundararajan Athijegannathan > wrote: > > 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

Re: RFR 8170565: JSObject call() is passed undefined for the argument 'thiz'

2016-12-01 Thread Jim Laskey (Oracle)
+1 > On Dec 1, 2016, at 8:48 AM, Sundararajan Athijegannathan > wrote: > > 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

Re: RFR 8170565: JSObject call() is passed undefined for the argument 'thiz'

2016-12-01 Thread Hannes Wallnöfer
+1 Nice solution, of course much simpler than what I proposed below :) Hannes > Am 01.12.2016 um 13:48 schrieb Sundararajan Athijegannathan > : > > Good catch Hannes! Please review the updated webrev : >

Re: RFR 8170565: JSObject call() is passed undefined for the argument 'thiz'

2016-12-01 Thread Hannes Wallnöfer
Hi Sundar, The problem with this approach is that it will replace any occurrence of undefined this with the global object. However, this should only occur for scope calls. For example, the following call would see undefined replaced with global: func.call(undefined) This is probably not a