Strict mode warning in richlistbox.xml

RESOLVED FIXED in mozilla21

Status

()

Core
XUL
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Yoric, Assigned: darkowlzz)

Tracking

unspecified
mozilla21
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mentor=Yoric][lang=js])

Attachments

(1 attachment, 1 obsolete attachment)

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; }
»
Summary: Warning in richlistbox.xml: → Strict mode warning in richlistbox.xml
(Assignee)

Comment 1

5 years ago
Created attachment 704336 [details] [diff] [review]
Modified getId definition
Attachment #704336 - Flags: review?(dteller)
Assignee: nobody → indiasuny000
Comment on attachment 704336 [details] [diff] [review]
Modified getId definition

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

Looks good, thanks :)
Attachment #704336 - Flags: review?(dteller) → review+
(Assignee)

Updated

5 years ago
Attachment #704336 - Flags: checkin?(dteller)
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
Attachment #704336 - Flags: checkin?(dteller)
(Assignee)

Comment 4

5 years ago
Created attachment 706505 [details] [diff] [review]
Modified getId definition

Patch formatted as per the guidelines.
Attachment #704336 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad7031235de1
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ad7031235de1
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.