Closed Bug 1115293 Opened 5 years ago Closed 5 years ago

Remove deprecated SpiderMonkey language extensions from about:permissions

Categories

(Toolkit :: General, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: cpeterson, Assigned: cpeterson)

Details

Attachments

(1 file)

let blocks and for-each-in loops are nonstandard SpiderMonkey language extensions and should be replaced with standard JS. This patch fixes following JS warnings from opening about:permissions.

Note that the patch I've submitted ignores whitespace to make the diff easier to read (because removing the let blocks unindents a lot of otheriwse unchanged code). My local patch has proper indentation. :)

JavaScript warning: chrome://browser/content/preferences/aboutPermissions.js, line 572: JavaScript 1.7's let blocks are deprecated
and `for each`

JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 52: JavaScript 1.7's let blocks are deprecated
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 65: JavaScript 1.7's let blocks are deprecated
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 76: JavaScript 1.7's let blocks are deprecated
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 87: JavaScript 1.7's let blocks are deprecated
JavaScript strict warning: resource://gre/modules/ForgetAboutSite.jsm, line 128: SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 116: JavaScript 1.7's let blocks are deprecated
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 164: JavaScript 1.7's let blocks are deprecated
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 185: JavaScript 1.7's let blocks are deprecated
JavaScript warning: resource://gre/modules/ForgetAboutSite.jsm, line 197: JavaScript 1.7's let blocks are deprecated
Attachment #8541118 - Flags: review?(dtownsend)
Attachment #8541118 - Flags: review?(dtownsend) → review+
https://hg.mozilla.org/mozilla-central/rev/9096b9b4aa73
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.