Closed
Bug 345542
Opened 18 years ago
Closed 18 years ago
Use of let in let-scoped for loops shows assertion
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1beta2
People
(Reporter: nanto, Assigned: mrbkap)
Details
(Keywords: verified1.8.1)
Attachments
(1 file)
1023 bytes,
patch
|
brendan
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 An assertion is shown when using let statements/expressions/declarations in let-scoped for/for...in/for-each...in loops and repeating more than one time. Reproducible: Always Steps to Reproduce: js> var f = []; js> for (let i = 0; i < 1; i++) f[i] = let (n = i) function () { return n; }; function () { return n; } js> for (let i = 0; i < 2; i++) f[i] = let (n = i) function () { return n; }; Actual Results: Assertion failure: OBJ_GET_PARENT(cx, obj) == fp->blockChain, at jsinterp.c:5959 Expected Results: No assetion is shown.
Assignee | ||
Comment 1•18 years ago
|
||
Yes, quite. Patch forthcoming. Nanto, so you know, we've given you canconfirm bugzilla privileges so you can start filing these bugs as NEW instead of UNCONFIRMED. These reports are really appreciated.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.8.1beta2
Assignee | ||
Comment 2•18 years ago
|
||
The first time we went around the while loop, we captured the scope chain, so blockChain was null'd out. Brendan and I went through all of the uses of fp->blockChain and determined that this was actually the right "fix".
Updated•18 years ago
|
Attachment #230222 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 3•18 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 4•18 years ago
|
||
Comment on attachment 230222 [details] [diff] [review] Fix Assertion-only fix, should be automatically approved. /be
Attachment #230222 -
Flags: approval1.8.1?
Comment 5•18 years ago
|
||
Checking in regress-345542.js; /cvsroot/mozilla/js/tests/js1_7/block/regress-345542.js,v <-- regress-345542.js initial revision: 1.1
Flags: in-testsuite+
Comment 6•18 years ago
|
||
Comment on attachment 230222 [details] [diff] [review] Fix a=drivers. Automatic approval given. :)
Attachment #230222 -
Flags: approval1.8.1? → approval1.8.1+
Comment 7•18 years ago
|
||
verified fixed trunk 20060723 win/mac*/linux mrbkap: Can you check this into 1.8 today? Thanks.
Status: RESOLVED → VERIFIED
Comment 9•18 years ago
|
||
verified fixed 1.8.1 windows/mac(ppc|tel)/linux 20060728
Keywords: fixed1.8.1 → verified1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•