Closed
Bug 487209
Opened 16 years ago
Closed 16 years ago
erroneous redeclaration of let ... with try {...} catch(e) {var e...}
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b4
People
(Reporter: bc, Assigned: brendan)
References
Details
(Keywords: fixed1.9.1, regression, testcase, Whiteboard: fixed-in-tracemonkey)
Attachments
(5 files, 2 obsolete files)
ecma_3/ExecutionContexts/regress-448595-01.js and js1_5/Regress/regress-146596.js
fail with redeclaration of let ... errors due to
try {...} catch(e) { var e ...}
regressed by upvar2 bug 452498
Flags: in-testsuite+
Flags: blocking1.9.1?
| Assignee | ||
Comment 1•16 years ago
|
||
Dammit, can't restrict this case -- catch makes an implicit let, we must tolerate the oddly-hoisted var e. It's easier to handle because catch does not hoist.
/be
Assignee: general → brendan
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.9.1b4
Comment 2•16 years ago
|
||
I think we should permit var-vs-let for FF3.5, since we made compatibility promises to extension authors as of b3. Is this change "merely" virtuous strictness, or is it required for something else in upvar2?
Updated•16 years ago
|
Flags: blocking1.9.1? → blocking1.9.1+
| Assignee | ||
Comment 3•16 years ago
|
||
var vs. let is not only future-proofing, it helped avoid a conundrum in one-pass name binding judgments in upvar2. We don't have time to redo using two passes and doing so has risks for perf as well as correctness.
Maybe a fresh look would find a way, but var vs. let is another bug than this one, which clearly must be fixed.
Again the problem is hoisting.
/be
| Assignee | ||
Comment 4•16 years ago
|
||
Attachment #371758 -
Flags: review?(mrbkap)
Comment 5•16 years ago
|
||
Comment on attachment 371758 [details] [diff] [review]
fix
I worried to brendan in person than this will lead to inconsistent results with
(function() { {let x; var x }})
vs.
(function() { {let x; try{}catch(x){var x} }})
Attachment #371758 -
Flags: review?(mrbkap)
| Assignee | ||
Comment 6•16 years ago
|
||
| Assignee | ||
Comment 7•16 years ago
|
||
| Assignee | ||
Comment 8•16 years ago
|
||
| Assignee | ||
Comment 9•16 years ago
|
||
C++ optional parameters ftw.
/be
Attachment #371758 -
Attachment is obsolete: true
| Assignee | ||
Comment 10•16 years ago
|
||
Testcases attached in case there's something I reconstructed that's not in the testsuite.
/be
| Assignee | ||
Comment 11•16 years ago
|
||
| Assignee | ||
Comment 12•16 years ago
|
||
Yeah, the testsuite definitely does not cover the last case.
/be
Attachment #371774 -
Attachment is obsolete: true
Attachment #371778 -
Flags: review?(mrbkap)
Updated•16 years ago
|
Attachment #371778 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 13•16 years ago
|
||
Fixed in tm:
http://hg.mozilla.org/tracemonkey/rev/d9eafbebdd78
/be
Whiteboard: fixed-in-tracemonkey
| Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+ → in-testsuite?
Comment 14•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 15•16 years ago
|
||
I botched the 1.9.1 checkin comment for this, but landed it correctly:
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/58633e0035ee
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•