Inadvertent global variable creation in mail/base/content/folderPane.js

RESOLVED FIXED in Thunderbird 11.0

Status

Thunderbird
Folder and Message Lists
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Jonathan Kamens, Assigned: Jonathan Kamens)

Tracking

Trunk
Thunderbird 11.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
An add-on which I recently wrote was fully reviewed,but the reviewer (Kent James) commented as follows:

Interesting little issue: We normally don't allow addons to add new unnamespaced global variables to global windows. However, running your addon causes several new names, including "acct" and "folderWithFlag" that comes from bugs in the core folderPane.js with code like this:

  for each (folderWithFlag in fixIterator(foldersWithFlag.enumerate()

which should be

 for each (let folderWithFlag in fixIterator(foldersWithFlag.enumerate()

I'm not sure if that code is ever run in standard TB 8 with the folder switch feature removed.  If it isn't, then technically your code does not meet our AMO standards. Hmmm... at least for now I'll ignore this.

The patch I'm about to attach (submitting the bug first to get the bug # so I can put it in the patch title) fixes the inadvertent global variable creations in folderPane.js.
(Assignee)

Comment 1

6 years ago
Created attachment 568923 [details] [diff] [review]
patch to fix inadvertent global variables
Assignee: nobody → jik
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #568923 - Flags: review?(squibblyflabbetydoo)
Status: NEW → ASSIGNED

Comment 2

6 years ago
Comment on attachment 568923 [details] [diff] [review]
patch to fix inadvertent global variables

Review of attachment 568923 [details] [diff] [review]:
-----------------------------------------------------------------

Sorry about the delay on this. I was swamped with stuff leading up to the last release/merge. I ran with this for a while, and everything looks ok to me.
Attachment #568923 - Flags: review?(squibblyflabbetydoo) → review+
Keywords: checkin-needed
Checked in as http://hg.mozilla.org/comm-central/rev/2320a8ec2c1e
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 11.0
You need to log in before you can comment on or make changes to this bug.