You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.4 KiB

--- !ditz.rubyforge.org,2008-03-06/issue
title: global code 'this' binding is undefined when global code is strict
desc: |-
Currently the caller is expected to provide the proper binding, and the
call handling then coerces the 'this' binding is it would for a function.
In the non-strict case this yields the correct result even if the caller
misbehaves and provides a null/undefined as the this binding (perhaps the
calling code uses duk_call() instead of duk_call_method(), for instance,
like duk_cmdline.c used to do).
In the strict case the 'undefined' value stands and causes various problems.
There is no problem if the caller uses duk_call_method() and pushes the
global object as the 'this' binding, and this is actually as designed.
But perhaps this is unnecessarily brittle, and global/eval code should get
their 'this' binding disregarding the 'this' binding provided on the
value stack?
type: :task
component: duk
release: v0.11
reporter: sva <sami.vaarala@iki.fi>
status: :unstarted
disposition:
creation_time: 2014-01-18 00:44:39.705752 Z
references: []
id: 65b8a608c526e37b4fd27b3e0255b462c568c450
log_events:
- - 2014-01-18 00:44:40.513830 Z
- sva <sami.vaarala@iki.fi>
- created
- ""
- - 2014-01-31 22:57:48.587952 Z
- sva <sami.vaarala@iki.fi>
- assigned to release v0.10 from v0.9
- ""
- - 2014-04-10 19:47:19.717491 Z
- Sami Vaarala <sami.vaarala@iki.fi>
- assigned to release v0.11 from v0.10
- ""