Bug 1229603 - Make most of browser/base lintable by removing non-standard syntax. r=Mossop

This commit is contained in:
Felipe Gomes 2015-12-02 17:51:26 -02:00
parent a0c053a354
commit 26bf843a09
6 changed files with 15 additions and 9 deletions

View File

@ -57,7 +57,11 @@ xulrunner/**
# browser/ exclusions
browser/app/**
browser/base/**
browser/base/content/browser-social.js
browser/base/content/nsContextMenu.js
browser/base/content/sanitizeDialog.js
browser/base/content/test/**
browser/base/content/newtab/**
browser/components/customizableui/**
browser/components/downloads/**
browser/components/feeds/**

View File

@ -255,4 +255,4 @@ var AboutTabCrashed = {
},
};
AboutTabCrashed.init();
AboutTabCrashed.init();

View File

@ -255,7 +255,7 @@ var gGestureSupport = {
* Source array containing any number of elements
* @yield Array that is a subset of the input array from full set to empty
*/
_power: function GS__power(aArray) {
_power: function* GS__power(aArray) {
// Create a bitmask based on the length of the array
let num = 1 << aArray.length;
while (--num >= 0) {

View File

@ -4456,8 +4456,11 @@ var XULBrowserWindow = {
try {
gCrashReporter.annotateCrashReport("URL", uri.spec);
} catch (ex if ex.result == Components.results.NS_ERROR_NOT_INITIALIZED) {
} catch (ex) {
// Don't make noise when the crash reporter is built but not enabled.
if (ex.result != Components.results.NS_ERROR_NOT_INITIALIZED) {
throw ex;
}
}
}
},

View File

@ -297,14 +297,13 @@ function initPluginsRow() {
}
}
let entries = [{name: item[1], permission: item[0]} for (item of permissionMap)];
let entries = Array.from(permissionMap, item => ({ name: item[1], permission: item[0] }));
entries.sort(function(a, b) {
return a.name < b.name ? -1 : (a.name == b.name ? 0 : 1);
});
let permissionEntries = [
fillInPluginPermissionTemplate(p.name, p.permission) for (p of entries)
];
let permissionEntries = entries.map(p => fillInPluginPermissionTemplate(p.name, p.permission));
let permPluginsRow = document.getElementById("perm-plugins-row");
clearPluginPermissionTemplate();

View File

@ -450,7 +450,7 @@ Sanitizer.prototype = {
{
let refObj = {};
TelemetryStopwatch.start("FX_SANITIZE_DOWNLOADS", refObj);
Task.spawn(function () {
Task.spawn(function*() {
let filterByTime = null;
if (this.range) {
// Convert microseconds back to milliseconds for date comparisons.