Closed Bug 1160770 Opened 9 years ago Closed 9 years ago

Unnecessary return in tabScrolling property in XPFE autocomplete.xml.

Categories

(SeaMonkey :: Autocomplete, defect)

defect
Not set
minor

Tracking

(firefox40 fixed)

RESOLVED FIXED
seamonkey2.37
Tracking Status
firefox40 --- fixed

People

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

References

Details

Attachments

(1 file)

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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.37
(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
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.