Closed
Bug 126810
Opened 24 years ago
Closed 24 years ago
javascript strict warnings in sidebarOverlay.js
Categories
(SeaMonkey :: Sidebar, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: stdowa+bugzilla, Assigned: stdowa+bugzilla)
References
Details
Attachments
(2 files)
|
2.55 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.38 KB,
patch
|
bzbarsky
:
review+
jag+mozilla
:
superreview+
scc
:
approval+
|
Details | Diff | Splinter Review |
Using today's trunk build.
Warning: redeclaration of var tabs
Source File: chrome://communicator/content/sidebar/sidebarOverlay.js
Line: 1268, Column: 12
Source Code:
var tabs = sidebarObj.panels.node.childNodes;
Warning: redeclaration of var i
Source File: chrome://communicator/content/sidebar/sidebarOverlay.js
Line: 1346, Column: 13
Source Code:
for (var i = 2; i < tabs.length; i += 2)
Warning: redeclaration of var currHeader
Source File: chrome://communicator/content/sidebar/sidebarOverlay.js
Line: 1348, Column: 10
Source Code:
var currHeader = tabs[i];
Warning: redeclaration of var currTab
Source File: chrome://communicator/content/sidebar/sidebarOverlay.js
Line: 1349, Column: 10
Source Code:
var currTab = new sbPanel(currHeader.getAttribute("id"), currHeader, i);
| Assignee | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Comment on attachment 70607 [details] [diff] [review]
patch
>Index: mozilla/xpfe/components/sidebar/resources/sidebarOverlay.js
>===================================================================
>RCS file: /cvsroot/mozilla/xpfe/components/sidebar/resources/sidebarOverlay.js,v
>retrieving revision 1.97
>diff -u -r1.97 sidebarOverlay.js
>--- mozilla/xpfe/components/sidebar/resources/sidebarOverlay.js 2002/02/20 21:31:00 1.97
>+++ mozilla/xpfe/components/sidebar/resources/sidebarOverlay.js 2002/02/20 23:54:03
>@@ -1231,10 +1231,11 @@
> // if we ex/included a tab in view then add/remove another one
> if (panel.is_in_view())
> {
>+ var tabs = sidebarObj.panels.node.childNodes;
> if (did_exclude)
> {
> // we excluded one so let's try to bring a non-excluded one into view
>- var tabs = sidebarObj.panels.node.childNodes;
>+ tabs = sidebarObj.panels.node.childNodes;
If we have already set it to sidebarObj.panels.node.childNodes above we don't
need to set it again.
> var newFirst = null;
> var added = false;
> for (var i = 2; i < tabs.length ; i += 2)
>@@ -1265,7 +1266,7 @@
> if (sidebarObj.panels.num_panels_in_view() > gNumTabsInViewPref)
> {
> // we included a new tab so let's take the last one out of view
>- var tabs = sidebarObj.panels.node.childNodes;
>+ tabs = sidebarObj.panels.node.childNodes;
If we have already set it to sidebarObj.panels.node.childNodes above we don't
need to set it again.
> for (i = 2; i < tabs.length; i += 2)
> {
> var currHeader = tabs[i];
>@@ -1292,16 +1293,19 @@
> debug("SidebarNavigate " + aDirection);
>
> var tabs = sidebarObj.panels.node.childNodes;
>+ var i = 2;
Don't initalize it. Just declare it. It'll get initialized in the for loop.
>+ var currHeader = tabs[i];
Don't initalize it. Just declare it.
>+ var currTab = new sbPanel(currHeader.getAttribute("id"), currHeader, i);
Don't initalize it. Just declare it.
Attachment #70607 -
Flags: needs-work+
| Assignee | ||
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
*** Bug 127558 has been marked as a duplicate of this bug. ***
Comment 6•24 years ago
|
||
r=gemal on 70653 if if helps
Comment 7•24 years ago
|
||
Comment on attachment 70653 [details] [diff] [review]
patch rev. 2
r=bzbarsky
Attachment #70653 -
Flags: review+
Comment 8•24 years ago
|
||
Comment on attachment 70653 [details] [diff] [review]
patch rev. 2
sr=jag
Attachment #70653 -
Flags: superreview+
Comment 9•24 years ago
|
||
Comment on attachment 70653 [details] [diff] [review]
patch rev. 2
a=scc
Attachment #70653 -
Flags: approval+
Comment 10•24 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 11•24 years ago
|
||
Stephen, can you verify this is fixed? thanks.
| Assignee | ||
Comment 12•24 years ago
|
||
verified using a build from today on win2k.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•