The default bug view has changed. See this FAQ.

In <mailWindowOverlay.js>, "Warning: redeclaration of var i" and "Warning: assignment to undeclared variable pop3Server"

RESOLVED FIXED in mozilla1.8beta1

Status

SeaMonkey
MailNews: Message Display
--
minor
RESOLVED FIXED
13 years ago
10 years ago

People

(Reporter: sgautherie, Assigned: sgautherie)

Tracking

(Blocks: 1 bug, {fixed-seamonkey1.1, fixed1.8.1.2, regression})

Trunk
mozilla1.8beta1
fixed-seamonkey1.1, fixed1.8.1.2, regression
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

13 years ago
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a3) Gecko/20040817] (release) (W98SE)

{{
Warning: redeclaration of var i
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 769, Column: 17
Source Code:
        for (var i = 0; i < pop3DownloadServersArray.length; i++)
}}

when opening MailNews.
(Assignee)

Comment 1

13 years ago
There is another warning:
{{
Warning: assignment to undeclared variable pop3Server
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 746
}}
Assignee: sspitzer → gautheri
Summary: In <mailWindowOverlay.js>, " Warning: redeclaration of var i" → In <mailWindowOverlay.js>, "Warning: redeclaration of var i" and "Warning: assignment to undeclared variable pop3Server"
Target Milestone: --- → mozilla1.8alpha4
(Assignee)

Comment 2

13 years ago
Created attachment 156703 [details] [diff] [review]
(Av1) <mailwindowoverlay.js> (SeaMonkey part)

2 warning fixes, plus 2 little "optimizations".
(Assignee)

Updated

13 years ago
Attachment #156703 - Flags: superreview?(sspitzer)
Attachment #156703 - Flags: review?(neil.parkwaycc.co.uk)

Comment 3

13 years ago
Comment on attachment 156703 [details] [diff] [review]
(Av1) <mailwindowoverlay.js> (SeaMonkey part)

I shouldn't review this because I don't have any deferred pop3 accounts, try
bienvenu as it's his code. He might give you sr too as it's a small patch, if
not you can ask me after you have his review.

That said, in my opinion you should leave the indenting at 4 spaces, and the
only "optimization" I think you should keep is the [index].AppendElement one.
Attachment #156703 - Flags: review?(neil.parkwaycc.co.uk)
(Assignee)

Comment 4

13 years ago
Comment on attachment 156703 [details] [diff] [review]
(Av1) <mailwindowoverlay.js> (SeaMonkey part)

David:
Neil wrote
{{
... in my opinion you should leave the indenting at 4 spaces, and the
only "optimization" I think you should keep is the [index].AppendElement one.
}}
If you (likely) confirm this, I'll prepare a new patch for checkin...
Attachment #156703 - Flags: superreview?(sspitzer)
Attachment #156703 - Flags: superreview?(bienvenu)
Attachment #156703 - Flags: review?(bienvenu)

Comment 5

13 years ago
Comment on attachment 156703 [details] [diff] [review]
(Av1) <mailwindowoverlay.js> (SeaMonkey part)

can you just remove this, instead of commenting out the already commented out
line?

+/*
+	 else
+	 {
+	   //dump(currentServer.serverURI + "...skipping, already opened\n");
+	 }
+*/

If you want, I can make that change when I check in...
Attachment #156703 - Flags: superreview?(bienvenu)
Attachment #156703 - Flags: superreview+
Attachment #156703 - Flags: review?(bienvenu)
Attachment #156703 - Flags: review+
(Assignee)

Comment 6

13 years ago
Comment on attachment 156703 [details] [diff] [review]
(Av1) <mailwindowoverlay.js> (SeaMonkey part)

(In reply to comment #5)
> (From update of attachment 156703 [details] [diff] [review])
> can you just remove this, instead of commenting out the already commented out
> line?

That was the idea ;-)

> If you want, I can make that change when I check in...

Your Edit+Checkin would be fine with me,
(unless you prefer that I edit it myself, which I could do later today.)
(Assignee)

Comment 7

13 years ago
'blocking1.8a5=?': No big deal, but we need an Edit+Checkin only, see comment 6.
Flags: blocking1.8a5?
(Assignee)

Updated

13 years ago
Attachment #156703 - Attachment is obsolete: true
(Assignee)

Comment 8

13 years ago
New additional warnings:
{{
Warning: redeclaration of var i
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 1969, Column: 13
Source Code:
    for (var i = 0; i < pop3DownloadServersArray.length; i++)

Warning: reference to undefined property defaultServer.msgFolder
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 749

Warning: assignment to undeclared variable pop3Server
Source File: chrome://messenger/content/mailWindowOverlay.js
Line: 1919
}}

|Warning: reference to undefined property defaultServer.msgFolder|:
I don't know how to fix this one: helpwanted.
Flags: blocking1.8a5?
Keywords: helpwanted
Target Milestone: mozilla1.8alpha4 → mozilla1.8alpha5
(Assignee)

Comment 9

13 years ago
Created attachment 166208 [details] [diff] [review]
(Av2) <mailWindowOverlay.js> (SeaMonkey part)
[Checked in: Comment 13]
(Assignee)

Comment 10

13 years ago
Comment on attachment 166208 [details] [diff] [review]
(Av2) <mailWindowOverlay.js> (SeaMonkey part)
[Checked in: Comment 13]

Can you check it in too ?
Attachment #166208 - Flags: superreview?(bienvenu)
Attachment #166208 - Flags: review?(bienvenu)
Product: Browser → Seamonkey
(Assignee)

Comment 11

12 years ago
David:
Would you have time to r+sr this more than 1 month old patch ? Thanks.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.8alpha5 → mozilla1.8alpha6
(Assignee)

Comment 12

12 years ago
+ (K) Regression: see bug 270343 comment 6.
Keywords: regression

Updated

12 years ago
Attachment #166208 - Flags: superreview?(bienvenu)
Attachment #166208 - Flags: superreview+
Attachment #166208 - Flags: review?(bienvenu)
Attachment #166208 - Flags: review+
(Assignee)

Comment 13

12 years ago
Comment on attachment 166208 [details] [diff] [review]
(Av2) <mailWindowOverlay.js> (SeaMonkey part)
[Checked in: Comment 13]


Check in: { 2005-01-04 16:51	neil%parkwaycc.co.uk	mozilla/ mailnews/
base/ resources/ content/ mailWindowOverlay.js	     1.212   9/13    Bug 256477
Fix JavaScript strict warnings p=gautheri@noos.fr r+sr=bienvenu }
(nit: wrong bug number ;-<)
Attachment #166208 - Attachment description: (Av2) <mailWindowOverlay.js> (SeaMonkey part) → (Av2) <mailWindowOverlay.js> (SeaMonkey part) [Checked in: Comment 13]
Attachment #166208 - Attachment is obsolete: true
(Assignee)

Comment 14

12 years ago
Created attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]

Same as Av2-SM.

I don't use TB: Could you test/review/check in this patch ? Thanks.
Attachment #170411 - Flags: review?(mscott)
(Assignee)

Updated

12 years ago
Whiteboard: [Comment 8: the two |defaultServer.msgFolder| warnings remain to be solved...]
(Assignee)

Updated

12 years ago
Depends on: 260447
Flags: blocking1.8b?
(Assignee)

Comment 15

12 years ago
(In reply to comment #8)
> |Warning: reference to undefined property defaultServer.msgFolder|:

Fixed by bug 270343 patch Cv1.
Flags: blocking1.8b? → blocking-aviary1.1?
Keywords: helpwanted
Whiteboard: [Comment 8: the two |defaultServer.msgFolder| warnings remain to be solved...]
Target Milestone: mozilla1.8alpha6 → mozilla1.8beta
(Assignee)

Comment 16

12 years ago
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]


No review from <mscott@mozilla.org> since "2005-01-05" :-(
Attachment #170411 - Attachment description: (Bv1) <mailWindowOverlay.js> (ThunderBird part) → (Bv1-TB) <mailWindowOverlay.js>
Attachment #170411 - Flags: review?(mscott) → review?(arnaud.bienvenu)
(Assignee)

Updated

12 years ago
Attachment #170411 - Flags: review?(arnaud.bienvenu) → review?(bienvenu)
(Assignee)

Comment 17

12 years ago
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]

[Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE)

No review from <bienvenu@nventure.com> aither since "2005-02-07" :-(

Could you (super-)review/check in this patch ? Thanks.
Attachment #170411 - Flags: superreview?(mscott)
Attachment #170411 - Flags: review?(mscott)
Attachment #170411 - Flags: review?(bienvenu)
(Assignee)

Comment 18

12 years ago
(In reply to comment #17)
> (From update of attachment 170411 [details] [diff] [review] [edit])
> [Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE)

Brendan, here too, I'm surprised not to get the warning about |pop3Server|...
Is the question "why doesn't the undeclared global variable set at
http://lxr.mozilla.org/mozilla/source/mail/base/content/mailWindowOverlay.js#1988
in CoalesceGetMsgsForPop3ServersByDestFolder cause a strict warning?"

I don't know.  It will warn only the first time per chrome window, after which
the global var exists and reassignment to it won't cause any warning.  Someone
needs to debug.

Serge, I know I've said this before: don't nominate warning fixes and cleanups
at the last minute for releases, especially for security releases.  Fix them in
alpha milestones only.

/be
(Assignee)

Comment 20

12 years ago
Created attachment 177026 [details] [diff] [review]
(Cv1) <mailWindowOverlay.js>

[Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE)

1 fix, plus a little more.

Could you (super-)review/check in this patch ? Thanks.
Attachment #177026 - Flags: superreview?(mscott)
Attachment #177026 - Flags: review?(mscott)
(Assignee)

Comment 21

12 years ago
Comment on attachment 177026 [details] [diff] [review]
(Cv1) <mailWindowOverlay.js>

This one came from
{{
1.29	scott%scott-macgregor.org	2003-11-30 12:36		Add a
try/catch around a method call in HandleMDNResponse to catch a weird JS error I
have not tracked down yet.
}}
(Assignee)

Comment 22

12 years ago
(In reply to comment #19)
> Is the question "why doesn't the undeclared global variable set at
> http://lxr.mozilla.org/mozilla/source/mail/base/content/mailWindowOverlay.js#1988
> in CoalesceGetMsgsForPop3ServersByDestFolder cause a strict warning?"

Yes.

> I don't know.  It will warn only the first time per chrome window, after which
> the global var exists and reassignment to it won't cause any warning.  Someone
> needs to debug.

I'm unskilled for this :-<
(Assignee)

Updated

12 years ago
Depends on: 266066
(Assignee)

Comment 23

11 years ago
Created attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

Cv1, unbitrotted.

(Hoping to get a r/sr before next year: still wondering how others achieve to fix the same bugs I already have patch waiting :-/)
Attachment #177026 - Attachment is obsolete: true
Attachment #217503 - Flags: superreview?(mscott)
Attachment #217503 - Flags: review?(mscott)
Attachment #177026 - Flags: superreview?(mscott)
Attachment #177026 - Flags: review?(mscott)
Serge, how does this relate to bug 260447?  you set the dependency
Could David do the r and mscott the sr?
(Assignee)

Comment 25

11 years ago
(In reply to comment #24)
> Serge, how does this relate to bug 260447?  you set the dependency

Looking back at this after so long:
that bug seems related to, at least, comment 15 and bug 270343 comment 20;
it's where (some of) the regression/warnings comes from.

> Could David do the r and mscott the sr?

Yes, any r/sr-er would have my thanks...
(Assignee)

Updated

11 years ago
Attachment #170411 - Flags: review?(mscott) → review?(bienvenu)
(Assignee)

Updated

11 years ago
Attachment #217503 - Flags: review?(mscott) → review?(bienvenu)

Comment 26

11 years ago
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

is this the right patch? I don't see how it could have to do with any warnings...

Updated

11 years ago
Attachment #170411 - Flags: review?(bienvenu) → review+
(Assignee)

Comment 27

11 years ago
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

(In reply to comment #26)
> is this the right patch?

Yes:
in the Cv1 patch, the fix was
[
-  } catch (ex) { return 0;}
+  } catch (ex) { return; }
]
but in Cv1a only the little rewrite part stands: no more warning issue.

Updated

11 years ago
Attachment #217503 - Flags: review?(bienvenu) → review+

Updated

11 years ago
Attachment #170411 - Flags: superreview?(mscott) → superreview+

Updated

11 years ago
Attachment #217503 - Flags: superreview?(mscott) → superreview+
(Assignee)

Updated

11 years ago
Depends on: 325098
(Assignee)

Comment 28

11 years ago
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]


Checkin: {
2006-11-26 11:27	bugzilla%standard8.demon.co.uk
}

'approval1.8.1.1=?': (Thunderbird only)
'approval-seamonkey1.1=?':
Trivial U.I. code cleanup, no risk.
(To stay in sync, before other potentialy upcoming patches.)
Attachment #217503 - Attachment description: (Cv1a) <mailWindowOverlay.js> → (Cv1a) <mailWindowOverlay.js> [Checkin: Comment 28]
Attachment #217503 - Flags: approval1.8.1.1?
Attachment #217503 - Flags: approval-seamonkey1.1?

Comment 29

11 years ago
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

a=me for SeaMonkey 1.1 (mailnews/ part)
Attachment #217503 - Flags: approval-seamonkey1.1? → approval-seamonkey1.1+
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

approved for 1.8 branch, a=mscott (via PM)
Attachment #217503 - Flags: approval1.8.1.1? → approval1.8.1.1+
(Assignee)

Updated

11 years ago
Whiteboard: [checkin needed: Cv1a (1.8 branch)]
(Assignee)

Updated

10 years ago
No longer depends on: 325098
Whiteboard: [checkin needed: Cv1a (1.8 branch)] → [checkin needed: Bv1-TB (Trunk), Cv1a (1.8 branch)]
(Assignee)

Comment 31

10 years ago
*** Bug 325098 has been marked as a duplicate of this bug. ***
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

missed 1.8.1.1, removing approval. Will try to get it next time.
Attachment #217503 - Flags: approval1.8.1.2+
Attachment #217503 - Flags: approval1.8.1.1-
Attachment #217503 - Flags: approval1.8.1.1+
Attachment #217503 - Flags: approval1.8.1.2+ → approval1.8.1.2?
(Assignee)

Comment 33

10 years ago
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]


Checkin: {
2006-12-04 09:09	bugzilla%standard8.demon.co.uk 	mozilla/mail/base/content/mailWindowOverlay.js 	1.153
}
Attachment #170411 - Attachment description: (Bv1-TB) <mailWindowOverlay.js> → (Bv1-TB) <mailWindowOverlay.js> [Checkin: Comment 33]
(Assignee)

Comment 34

10 years ago
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]


'approval1.8.1.2=?': (Thunderbird only)
Trivial U.I. code cleanup, no risk.
(Sync' SM->TB.)
Attachment #170411 - Flags: approval1.8.1.2?
(Assignee)

Updated

10 years ago
Whiteboard: [checkin needed: Bv1-TB (Trunk), Cv1a (1.8 branch)] → [checkin needed: Cv1a (1.8 branch, /MailNews part only)]

Updated

10 years ago
Keywords: fixed-seamonkey1.1
Whiteboard: [checkin needed: Cv1a (1.8 branch, /MailNews part only)]
(Assignee)

Comment 35

10 years ago
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]


Checkin (/MailNews part): {
2006-12-22 07:13	neil%parkwaycc.co.uk 	mozilla/mailnews/base/resources/content/mailWindowOverlay.js 	1.222.2.20 	MOZILLA_1_8_BRANCH
}
Attachment #217503 - Attachment description: (Cv1a) <mailWindowOverlay.js> [Checkin: Comment 28] → (Cv1a) <mailWindowOverlay.js> [Checkin: Comment 28 & 35]

Comment 36

10 years ago
Comment on attachment 217503 [details] [diff] [review]
(Cv1a) <mailWindowOverlay.js>
[Checkins: Comment 28 & 35 & 38]

Approved for 1.8 branch, a=jay for drivers.
Attachment #217503 - Flags: approval1.8.1.2? → approval1.8.1.2+
(Assignee)

Updated

10 years ago
Whiteboard: [checkin needed: Cv1a (1.8 branch, /Mail part only)]

Comment 37

10 years ago
Serge:  Could you please get (Bv1-TB) <mailWindowOverlay.js> [Checkin: Comment 33] re-reviewed, it's been a while since that patch was looked at.   If mscott or bienvenu want this other patch, we can take it. 
Already checked in:
mozilla/mail/base/content/mailWindowOverlay.js 1.95.2.49 by bugzilla%standard8.demon.co.uk
Whiteboard: [checkin needed: Cv1a (1.8 branch, /Mail part only)]
(Assignee)

Updated

10 years ago
Attachment #217503 - Attachment description: (Cv1a) <mailWindowOverlay.js> [Checkin: Comment 28 & 35] → (Cv1a) <mailWindowOverlay.js> [Checkins: Comment 28 & 35 & 38]
(Assignee)

Comment 39

10 years ago
(In reply to comment #37)
> Serge:  Could you please get (Bv1-TB) <mailWindowOverlay.js> [Checkin: Comment
> 33] re-reviewed, it's been a while since that patch was looked at.   If mscott

{
bienvenu@nventure.com  	2006-11-12 04:49:53 PST  	  Attachment #170411 [details] [diff]Flag  	review?(bienvenu@nventure.com)  	review+
mscott@mozilla.org  	2006-11-25 17:51:05 PST  	  Attachment #170411 [details] [diff]Flag  	superreview?(mscott@mozilla.org)  	superreview+
}

Is 1(+) month that old ?

> or bienvenu want this other patch, we can take it. 

{
sgautherie.bz@free.fr  	2006-12-04 15:50:32 PST  	  Attachment #170411 [details] [diff]Flag  	  	approval1.8.1.2?
}

What is really missing is the approval, requested 9 days "only" after sr...
Keywords: fixed1.8.1.2
(In reply to comment #38)
> Already checked in:
> mozilla/mail/base/content/mailWindowOverlay.js 1.95.2.49 by

That's attachment 217503 [details] [diff] [review], I was asking about attachment 170411 [details] [diff] [review] which is in the same file which confuses us as to whether one supersedes the other.
(Assignee)

Comment 41

10 years ago
(In reply to comment #40)
> {...} which is in the same file which confuses us as to whether one supersedes the other.

B and C patches are not related to one another, apart from applying to the same file.
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]

approved for 1.8 branch, a=dveditz for drivers
Attachment #170411 - Flags: approval1.8.1.2? → approval1.8.1.2+
(Assignee)

Updated

10 years ago
Whiteboard: [checkin needed: Bv1-TB (1.8 branch)]
(Assignee)

Comment 43

10 years ago
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]

'approval1.8.1.3=?': (Thunderbird only)
It had 'dveditz: approval1.8.1.2+',
but noone actually checked it in :-/
Attachment #170411 - Flags: approval1.8.1.3?
Scott or David, is the appoved patch too late for TB2? It also waits for checkin for two months.
Blocks: 303545
Comment on attachment 170411 [details] [diff] [review]
(Bv1-TB) <mailWindowOverlay.js>
[Checkin: Comment 33]

Doesn't meet the 1.8.1.4 criteria, especially since we're not shipping a tbird update (2.0 will be out around then). You can try again later maybe when there is going to be a tbird update.
Attachment #170411 - Flags: approval1.8.1.4? → approval1.8.1.4-

Comment 46

10 years ago
Removing 'checkin needed' as it is unclear what should (not) be checked in. If the flag is still needed, please add a comment explaining *exactly* which of the patches should be checked in where, and make sure to have the appropriate reviews and/or approvals.

Somewhat related, is there a particular reason this bug is not marked FIXED yet? Given the confusion (in discussion on IRC as well as, cf, comment #37, 39, 40 and 41), it might even be more appropriate to file a separate bug for followup issues.
Whiteboard: [checkin needed: Bv1-TB (1.8 branch)]
(Assignee)

Updated

10 years ago
Attachment #166208 - Attachment is obsolete: false
(Assignee)

Comment 47

10 years ago
Confusion started when Bv1-TB got approval1.8.1.2+, but was not checked in.
Then, it got approval1.8.1.3? unanswered, then approval1.8.1.4-.
Let's say I don't care any longer :-|

R.Fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.