Unnecessary return in tabScrolling property in XPFE autocomplete.xml.

RESOLVED FIXED in Firefox 40

Status

defect
--
minor
RESOLVED FIXED
4 years ago
2 years ago

People

(Reporter: philip.chee, Assigned: philip.chee)

Tracking

Trunk
seamonkey2.37
Dependency tree / graph

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

4 years ago
Sat May 02 2015 21:51:07
Warning: SyntaxError: unreachable code after return statement
Source file: chrome://global/content/autocomplete.xml
Line: 279, Column: 47
Source code:
return this.setAttribute('tabscrolling', val); return val;

(From Bug 1155055 comment #0)
> https://dxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/
> autocomplete.xml#306
> >       <property name="tabScrolling"
> >                 onset="return this.setAttribute('tabscrolling', val); return val;"
> >                 onget="return this.getAttribute('tabscrolling') == 'true';"/>
> 
> onset returns the value returned from setAttribute, which is void.
Attachment #8600601 - Flags: review?(neil) → review+
Why the return val; at all?
https://hg.mozilla.org/mozilla-central/rev/f703c5483fa0
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.37
Assignee

Comment 6

4 years ago
(In reply to :Ms2ger from comment #4)
> Why the return val; at all?
I don't know. Firefox also does it this way:
http://hg.mozilla.org/mozilla-central/diff/ad8fc5dffc9c/toolkit/content/widgets/autocomplete.xml

Comment 7

2 years ago
Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/58e10a572314
Unnecessary return in tabScrolling property in XPFE autocomplete.xml NPOTB r=Neil DONTBUILD
You need to log in before you can comment on or make changes to this bug.