In <searchBar.js>, "Warning: redeclaration of var i" and others

RESOLVED FIXED in mozilla1.8alpha6

Status

--
trivial
RESOLVED FIXED
14 years ago
9 years ago

People

(Reporter: sgautherie, Assigned: sgautherie)

Tracking

({fixed1.8.1})

Trunk
mozilla1.8alpha6
fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed1.8.1: Bv1b-TB])

Attachments

(3 attachments, 1 obsolete attachment)

(Assignee)

Description

14 years ago
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a4) Gecko/20040927] (release) (W98SE)

{{
Warning: redeclaration of var i
Source File: chrome://messenger/content/searchBar.js
Line: 386, Column: 11
Source Code:
  for (var i = 0; i < termsArray.Count(); i++)
}}
(Assignee)

Comment 1

14 years ago
Created attachment 161083 [details] [diff] [review]
(Av1-MAS) <searchBar.js>
[Checked in: Comment 2]
Assignee: sspitzer → gautheri
Status: NEW → ASSIGNED
(Assignee)

Updated

14 years ago
Attachment #161083 - Flags: superreview?(bienvenu)
Attachment #161083 - Flags: review?(bienvenu)

Updated

14 years ago
Attachment #161083 - Flags: superreview?(bienvenu)
Attachment #161083 - Flags: superreview+
Attachment #161083 - Flags: review?(bienvenu)
Attachment #161083 - Flags: review+

Comment 2

14 years ago
fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
(Assignee)

Updated

14 years ago
Attachment #161083 - Attachment description: (Av1) <searchBar.js> (SeaMonkey part) → (Av1) <searchBar.js> (SeaMonkey part) [Checked in: Comment 2]
Attachment #161083 - Attachment is obsolete: true
(Assignee)

Comment 3

14 years ago
Created attachment 161202 [details] [diff] [review]
(Bv1-TB) <searchBar.js>
(Assignee)

Updated

14 years ago
Attachment #161202 - Flags: superreview?(bienvenu)
Attachment #161202 - Flags: review?(bienvenu)
(Assignee)

Updated

14 years ago
Target Milestone: --- → mozilla1.8alpha5
(Assignee)

Updated

14 years ago
Attachment #161202 - Attachment is obsolete: true
Attachment #161202 - Flags: superreview?(bienvenu)
Attachment #161202 - Flags: review?(bienvenu)
(Assignee)

Comment 4

14 years ago
Created attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]
(Assignee)

Updated

14 years ago
Attachment #161206 - Flags: superreview?(bienvenu)
Attachment #161206 - Flags: review?(bienvenu)
Product: Browser → Seamonkey
(Assignee)

Comment 5

14 years ago
Re-opening, for the Toolkit part, which missed "Mozilla v1.8a5".
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

14 years ago
Status: REOPENED → ASSIGNED
(Assignee)

Updated

14 years ago
Target Milestone: mozilla1.8alpha5 → mozilla1.8alpha6
(Assignee)

Comment 6

14 years ago
Comment on attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]

No (super-)review from <bienvenu@nventure.com> since "2004-10-05" :-(
Attachment #161206 - Flags: superreview?(mscott)
Attachment #161206 - Flags: superreview?(bienvenu)
Attachment #161206 - Flags: review?(bryner)
Attachment #161206 - Flags: review?(bienvenu)
Attachment #161206 - Flags: review?(bryner) → review+
(Assignee)

Updated

14 years ago
Attachment #161083 - Attachment description: (Av1) <searchBar.js> (SeaMonkey part) [Checked in: Comment 2] → (Av1-MAS) <searchBar.js> [Checked in: Comment 2]
(Assignee)

Updated

14 years ago
Attachment #161202 - Attachment description: (Bv1) <searchBar.js> (Toolkit part) → (Bv1-TB) <searchBar.js>
(Assignee)

Updated

14 years ago
Attachment #161206 - Attachment description: (Bv1b) <searchBar.js> (Toolkit part) → (Bv1b-TB) <searchBar.js>
(Assignee)

Comment 7

14 years ago
Comment on attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]

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

Scott:
Oddly, I don't get this (strict enabled) warning, w/o the patch ... anyway.
I don't know how to get into the |for (i in srchFolderUriArray)|...

Please, provide me with some steps if further testing is needed.

Else, could you sr & check in this patch ?
(Assignee)

Comment 8

14 years ago
(In reply to comment #7)
> (From update of attachment 161206 [details] [diff] [review] [edit])
> [Mozilla Thunderbird, version 1.0.1 (20050309)] (nightly) (W98SE)
> 
> Scott:
> Oddly, I don't get this (strict enabled) warning, w/o the patch ... anyway.

Brendan, Am I missing something here, or ... ?
(Assignee)

Comment 9

13 years ago
(In reply to comment #8)
> (In reply to comment #7)
> > (From update of attachment 161206 [details] [diff] [review] [edit] [edit])
> > 
> > Oddly, I don't get this (strict enabled) warning, w/o the patch ... anyway.
> 
> Brendan, Am I missing something here, or ... ?

Afterward, I think that reporting this warning was removed from the "JS Engine" at some point.
(Assignee)

Comment 10

13 years ago
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1b1) Gecko/20060804 SeaMonkey/1.1a] (nightly) (W98SE)

1. Press "Enter" in the (empty) criteria field.
R.
[
Warning: reference to undefined property gSearchInput.showingSearchCriteria
Source File: chrome://messenger/content/searchBar.js
Line: 188
]

***

1. Type some string to search for.
2. Press "Enter".
R. (In addition to the above warning, get some errors)
[
Error: gSearchBundle has no properties
Source File: chrome://messenger/content/searchBar.js
Line: 105

Error: gSearchBundle has no properties
Source File: chrome://messenger/content/searchBar.js
Line: 58
]
NB: Actually, the 3 w. & e. appear twice...
Summary: In <searchBar.js>, "Warning: redeclaration of var i" → In <searchBar.js>, "Warning: redeclaration of var i" and others
Whiteboard: helpwanted
(Assignee)

Comment 11

13 years ago
(In reply to comment #10)
> 1. Type some string to search for.
> 2. Press "Enter".

Step 2 is unneeded.

> NB: Actually, the 3 w. & e. appear twice...

This was because of step 2: I didn't now the search happened at "each" keypress.

Summary:
A) Search without a string: 1 warning.
B) Search with a string: 1 warning + 2 errors.

Updated

13 years ago
Attachment #161206 - Flags: superreview?(mscott) → superreview+
(Assignee)

Updated

13 years ago
Keywords: helpwanted
Whiteboard: helpwanted → [checkin needed: Bv1-TB] [New errors: in comment 10 & 11]
(Assignee)

Comment 12

13 years ago
Comment on attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]

'approval1.8.1=?': (Thunderbird only)
Trivial JS warning fix, no risk.
(To stay in sync'.)
Attachment #161206 - Flags: approval1.8.1?
Comment on attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]

a=drivers, assuming bienvenu and scott are OK with this (since it's been on trunk for a while)
Attachment #161206 - Flags: approval1.8.1? → approval1.8.1+
(Assignee)

Updated

13 years ago
Whiteboard: [checkin needed: Bv1-TB] [New errors: in comment 10 & 11] → [checkin needed (Trunk & 1.8 branch): Bv1-TB] [New errors: in comment 10 & 11]

Comment 14

13 years ago
Note: Bv1b-TB was checked in on trunk already, so it only needs branch checkin.
Whiteboard: [checkin needed (Trunk & 1.8 branch): Bv1-TB] [New errors: in comment 10 & 11] → [checkin needed (1.8 branch): Bv1-TB] [New errors: in comment 10 & 11]
(Assignee)

Comment 15

13 years ago
Comment on attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]

Checkin: {
2006-08-14 12:26	bugzilla%standard8.demon.co.uk 	mozilla/mail/base/content/searchBar.js 	1.37
}
Attachment #161206 - Attachment description: (Bv1b-TB) <searchBar.js> → (Bv1b-TB) <searchBar.js> [Checked in: Comment 15]
(Assignee)

Comment 16

13 years ago
Comment on attachment 161206 [details] [diff] [review]
(Bv1b-TB) <searchBar.js>
[Checked in: Comment 15 & 16]


Checkin: {
2006-08-24 10:28	bugzilla%standard8.demon.co.uk 	mozilla/mail/base/content/searchBar.js 	1.25.2.11 	MOZILLA_1_8_BRANCH
}
Attachment #161206 - Attachment description: (Bv1b-TB) <searchBar.js> [Checked in: Comment 15] → (Bv1b-TB) <searchBar.js> [Checked in: Comment 15 & 16]
Attachment #161206 - Attachment is obsolete: true
(Assignee)

Updated

13 years ago
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch): Bv1-TB] [New errors: in comment 10 & 11] → [New errors: in comment 10 & 11] [fixed1.8.1: Bv1b-TB]
(Assignee)

Comment 17

12 years ago
(In reply to comment #10)
> [
> Warning: reference to undefined property gSearchInput.showingSearchCriteria
> Source File: chrome://messenger/content/searchBar.js
> Line: 188
> ]

<http://lxr.mozilla.org/mozilla/search?string=showingSearchCriteria>
lists
[
/mail/base/content/search.xml, line 88 -- <property name="showingSearchCriteria" onget="return this.getAttribute('searchCriteria') == 'true';"
/mail/base/content/search.xml, line 125 -- this.showingSearchCriteria = true;
]
with no </mailnews> XML equivalent lines.

Our JS code "comes" from
[
2004-10-01 12:06	bienvenu%nventure.com 	mozilla/mailnews/base/resources/content/searchBar.js 	1.36

fix 261682 sr=mscott when in non-default view, automatic update of folder causes a re-search which recreates the view
]

David, could you have a look at this and possibly take care of it ?
(Assignee)

Comment 18

12 years ago
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2pre) Gecko/20070117 SeaMonkey/1.1] (nightly) (W2Ksp4)
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a2pre) Gecko/20070116 SeaMonkey/1.5a] (nightly) (W2Ksp4)

(In reply to comment #10)

Now (and with W2K), I get the following warning (only once at a time and) only when using the Clear button.
{
Warning: reference to undefined property gSearchInput.showingSearchCriteria
Source File: chrome://messenger/content/searchBar.js
Line: 469
}
(The line number has changed. And is the same in both builds.)

> ***
> 
> [
> Error: gSearchBundle has no properties
> Source File: chrome://messenger/content/searchBar.js
> Line: 105
> 
> Error: gSearchBundle has no properties
> Source File: chrome://messenger/content/searchBar.js
> Line: 58
> ]

I don't get theses anymore.
(Assignee)

Updated

12 years ago
Depends on: 325817
(Assignee)

Updated

11 years ago
Depends on: 286367
No longer depends on: 325817
Whiteboard: [New errors: in comment 10 & 11] [fixed1.8.1: Bv1b-TB] → [New errors: in comment 17] [fixed1.8.1: Bv1b-TB]

Updated

11 years ago
Component: MailNews: Search → MailNews: Message Display
QA Contact: search
QA Contact: search → message-display

Comment 19

9 years ago
Created attachment 459335 [details] [diff] [review]
(Cv1) Remove dead code (gSearchInput.showingSearchCriteria)

(Serge never got around to the final bit here.)
The code removed in this patch was commented out six years ago in Bug 259484.
Attachment #459335 - Flags: superreview?(neil)
Attachment #459335 - Flags: review?(neil)
Comment on attachment 459335 [details] [diff] [review]
(Cv1) Remove dead code (gSearchInput.showingSearchCriteria)

I notice that abContactsPanel still has a reference, does Thunderbird have a bug for that?

>         if (gCurrentVirtualFolderUri &&
>-         (!gSearchInput || gSearchInput.value == "" || gSearchInput.showingSearchCriteria))
>+          (!gSearchInput || gSearchInput.value == ""))
Nit: might as well line this up correctly i.e.
if (gCurrentVirtualFolderUri &&
    (!gSearchInput || gSearchInput.value == ""))
Attachment #459335 - Flags: superreview?(neil)
Attachment #459335 - Flags: superreview+
Attachment #459335 - Flags: review?(neil)
Attachment #459335 - Flags: review+

Comment 21

9 years ago
> >         if (gCurrentVirtualFolderUri &&
> >-         (!gSearchInput || gSearchInput.value == "" || gSearchInput.showingSearchCriteria))
> >+          (!gSearchInput || gSearchInput.value == ""))
> Nit: might as well line this up correctly i.e.
> if (gCurrentVirtualFolderUri &&
>     (!gSearchInput || gSearchInput.value == ""))
Fixed locally.

Pushed to comm-central.
http://hg.mozilla.org/comm-central/rev/7223e8b0311f

Closing this !@#$%^&* bug so it gets off my bug queries finally.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago9 years ago
Resolution: --- → FIXED

Updated

9 years ago
Keywords: helpwanted
Whiteboard: [New errors: in comment 17] [fixed1.8.1: Bv1b-TB] → [fixed1.8.1: Bv1b-TB]
(Assignee)

Updated

9 years ago
Attachment #161083 - Attachment is obsolete: false
(Assignee)

Updated

9 years ago
Attachment #161206 - Attachment is obsolete: false
You need to log in before you can comment on or make changes to this bug.