RESOLVED INVALID 35282
Old catch-clause scoping bug still unfixed
https://bugs.webkit.org/show_bug.cgi?id=35282
Summary Old catch-clause scoping bug still unfixed
Mark S. Miller
Reported 2010-02-22 20:28:08 PST
The old ES3 behavior function foo(){this.x = 11;} var x = 'bar'; try { throw foo; } catch(e) { e(); print(x); } // prints 11 is still present, despite 1) violating ES5 semantics, and 2) fatally violates ES5-strict semantics, as much of the motivation of ES5-strict is static scoping. This catch bug prevents static scoping.
Attachments
Mark S. Miller
Comment 1 2010-02-22 21:48:02 PST
Oops. Thanks to Brendan for the correction. I was thinking about the code example in a nested scope as follows, but I hadn't tested that way. Tested nested, it works fine. Sorry for the misunderstanding. (function(){ function foo(){this.x = 11;} var x = 'bar'; try { throw foo; } catch(e) { e(); print(x); } })(); // prints bar
Note You need to log in before you can comment on or make changes to this bug.