Status: New
Owner: ----
New issue 1199 by [email protected]: expression '{get length () {return
this.a.length;}}' raises error "TypeError: Cannot read property 'length' of
undefined"
http://code.google.com/p/v8/issues/detail?id=1199
V8 Version: 2.5.9.15
Chrome Version: 9.0.597.98 (Official Build 74359)
URLs: about:blank
Other browsers tested:
Firefox 4.0beta10: OK
What steps will reproduce the problem?
Go to URI 'about:blank'.
Open JavaScript console.
Enter 'demo = {get length () {return this.a.length;}}' and submit.
Read error "TypeError: Cannot read property 'length' of undefined".
What is the expected result?
An object with accessor 'length' that returns its 'a' property's 'length'.
What happens instead?
An error. Evaluation fails with error "TypeError: Cannot read
property 'length' of undefined".
Please provide any additional information below. Attach a screenshot if
possible.
Replacing 'length' with 'b' in the last step, ie, submitting
'demo = {get b () {return this.a.b;}}'
produces no error. It creates an object with accessor 'b'.
Attachments:
TypeError.PNG 65.1 KB
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev