Closed Bug 806770 Opened 13 years ago Closed 13 years ago

Strict mode warning in richlistbox.xml

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: Yoric, Assigned: darkowlzz)

Details

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

Attachments

(1 file, 1 obsolete file)

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
Attached patch Modified getId definition (obsolete) — Splinter Review
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+
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)
Patch formatted as per the guidelines.
Attachment #704336 - Attachment is obsolete: true
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: