Created attachment 581280 [details] test.js User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 Steps to reproduce: Rhino generates negative lengths for some AST nodes when using labels in some cases, like the simple attached test. Actual results: The LabeledStatement that contains the while for the second function has a length of -10. If you remove the first empty function, the length is positive again, but as far as I know, also incorrect (because length for the inside While node is greater)
I made a fix and created a pull request here: https://github.com/mozilla/rhino/pull/26
Thanks, fixed in master and rhino_1_8 branches: https://github.com/mozilla/rhino/commit/a518c4e1128a5dac63dc110d8ce5e7619694a015
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.