Closed
Bug 205709
Opened 21 years ago
Closed 21 years ago
javascript script warning in abDragDrop.js
Categories
(SeaMonkey :: MailNews: Address Book & Contacts, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stephend, Assigned: schapel)
Details
Attachments
(1 file, 1 obsolete file)
615 bytes,
patch
|
stephend
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Warning: redeclaration of var i Source File: chrome://messenger/content/addressbook/abDragDrop.js Line: 163, Column: 15 Source Code: for (var i=0;i<numrows;i++) { the local variable i is already declared in: 111 for (var i = 0; i < dragSession.numDropItems; i++) { and since JS is function-scoped for locals declared with the var keyword, we can just drop the declaration in line 163. patch coming up.
Reporter | ||
Comment 1•21 years ago
|
||
Reporter | ||
Updated•21 years ago
|
Attachment #123316 -
Flags: superreview?(sspitzer)
Attachment #123316 -
Flags: review?(cavin)
Comment 2•21 years ago
|
||
Comment on attachment 123316 [details] [diff] [review] Patch Seems like this change will affect/alter the control var 'i' in the top level for loop (ie, line 111) right?
But we can't be in two loops at the same time, can we? And both times, i is initialized back to 0 in each loop.
Comment on attachment 123316 [details] [diff] [review] Patch until I get a clue about scope inside of iterating |for| loops...
Attachment #123316 -
Flags: superreview?(sspitzer)
Attachment #123316 -
Flags: review?(cavin)
Attachment #123316 -
Attachment is obsolete: true
Comment 5•21 years ago
|
||
Comment on attachment 123316 [details] [diff] [review] Patch I'd prefer that we just rename this inner, shadowed, i to j.
Attachment #123316 -
Flags: superreview-
Assignee | ||
Comment 6•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #125624 -
Flags: review?(sspitzer)
Assignee | ||
Updated•21 years ago
|
Attachment #125624 -
Flags: superreview?(bzbarsky)
![]() |
||
Updated•21 years ago
|
Attachment #125624 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Updated•21 years ago
|
Attachment #125624 -
Flags: review?(sspitzer) → review?(stephend)
Reassigning.
Assignee: stephend → stevechapel
Comment on attachment 125624 [details] [diff] [review] recommended patch r=stephend, assuming you've tested, as well
Attachment #125624 -
Flags: review?(stephend) → review+
Assignee | ||
Comment 9•21 years ago
|
||
timeless checked this in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 10•20 years ago
|
||
Verified FIXED using build 2004-09-15-12 on Windows XP, Seamonkey trunk.
Status: RESOLVED → VERIFIED
Updated•19 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•