Last Comment Bug 806770 - Strict mode warning in richlistbox.xml
: Strict mode warning in richlistbox.xml
Status: RESOLVED FIXED
[mentor=Yoric][lang=js]
:
Product: Core
Classification: Components
Component: XUL (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla21
Assigned To: Sunny [:darkowlzz]
:
: Neil Deakin
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-30 00:56 PDT by David Teller [:Yoric] (please use "needinfo")
Modified: 2013-01-26 16:43 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Modified getId definition (1.10 KB, patch)
2013-01-20 09:55 PST, Sunny [:darkowlzz]
dteller: review+
Details | Diff | Splinter Review
Modified getId definition (1.27 KB, patch)
2013-01-25 11:17 PST, Sunny [:darkowlzz]
no flags Details | Diff | Splinter Review

Description David Teller [:Yoric] (please use "needinfo") 2012-10-30 00:56:42 PDT
When executing test browser_urlbarAutoFillTrimURLs.js, I get the following warning:

JavaScript Warning: "in strict mode code, functions may be declared only at top level or immediately within another function" {file: "chrome://global/content/bindings/richlistbox.xml" line: 63 column: 23 source: "              function getId(aItem) { return aItem.id; }
"}

It looks like this could be changed trivially by turning the definition to «
let getId = function getId(aItem) { return aItem.id; }
»
Comment 1 Sunny [:darkowlzz] 2013-01-20 09:55:18 PST
Created attachment 704336 [details] [diff] [review]
Modified getId definition
Comment 2 David Teller [:Yoric] (please use "needinfo") 2013-01-20 10:06:59 PST
Comment on attachment 704336 [details] [diff] [review]
Modified getId definition

Review of attachment 704336 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks :)
Comment 3 David Teller [:Yoric] (please use "needinfo") 2013-01-23 05:06:52 PST
Comment on attachment 704336 [details] [diff] [review]
Modified getId definition

Review of attachment 704336 [details] [diff] [review]:
-----------------------------------------------------------------

You should format the patch as per the following guidelines:
http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed
Comment 4 Sunny [:darkowlzz] 2013-01-25 11:17:09 PST
Created attachment 706505 [details] [diff] [review]
Modified getId definition

Patch formatted as per the guidelines.
Comment 5 Ryan VanderMeulen [:RyanVM] 2013-01-26 10:01:57 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad7031235de1
Comment 6 Ryan VanderMeulen [:RyanVM] 2013-01-26 16:43:37 PST
https://hg.mozilla.org/mozilla-central/rev/ad7031235de1

Note You need to log in before you can comment on or make changes to this bug.