Bug 1315617 - Fix remaining no-unused-vars for local scope in browser/ and enable the rule for all of browser/ r=mossop

MozReview-Commit-ID: FO1p5G5K3zg

--HG--
extra : rebase_source : 24b1793eff129370f23ad054543471fd3bf860be
This commit is contained in:
Mark Banner 2016-11-03 11:56:28 +00:00
parent 5afec92baa
commit be75c1f909
5 changed files with 8 additions and 36 deletions

View File

@ -4,4 +4,12 @@ module.exports = {
"extends": [
"../toolkit/.eslintrc.js"
],
"rules": {
"no-unused-vars": ["error", {
"vars": "local",
"varsIgnorePattern": "^Cc|Ci|Cu|Cr|EXPORTED_SYMBOLS",
"args": "none",
}]
}
};

View File

@ -648,12 +648,6 @@ BrowserGlue.prototype = {
this._sanitizer.onStartup();
// check if we're in safe mode
if (Services.appinfo.inSafeMode) {
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1231112#c7 . We need to
// register the observer early if we have to migrate tab groups
let currentUIVersion = 0;
try {
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
} catch (ex) {}
Services.ww.openWindow(null, "chrome://browser/content/safeMode.xul",
"_blank", "chrome,centerscreen,modal,resizable=no", null);
}

View File

@ -643,23 +643,6 @@ var PlacesOrganizer = {
if (selectedNode && !PlacesUtils.nodeIsSeparator(selectedNode)) {
detailsDeck.selectedIndex = 1;
// Using the concrete itemId is arguably wrong. The bookmarks API
// does allow setting properties for folder shortcuts as well, but since
// the UI does not distinct between the couple, we better just show
// the concrete item properties for shortcuts to root nodes.
let concreteId = PlacesUtils.getConcreteItemId(selectedNode);
var isRootItem = concreteId != -1 && PlacesUtils.isRootItem(concreteId);
var readOnly = isRootItem ||
selectedNode.parent.itemId == PlacesUIUtils.leftPaneFolderId;
var useConcreteId = isRootItem ||
PlacesUtils.nodeIsTagQuery(selectedNode);
var itemId = -1;
if (concreteId != -1 && useConcreteId)
itemId = concreteId;
else if (selectedNode.itemId != -1)
itemId = selectedNode.itemId;
else
itemId = PlacesUtils._uri(selectedNode.uri);
gEditItemOverlay.initPanel({ node: selectedNode
, hiddenRows: ["folderPicker"] });
@ -1059,9 +1042,6 @@ var ViewMenu = {
var popup = event.target;
var pivot = this._clean(popup, startID, endID);
// If no column is "sort-active", the "Unsorted" item needs to be checked,
// so track whether or not we find a column that is sort-active.
var isSorted = false;
var content = document.getElementById("placeContent");
var columns = content.columns;
for (var i = 0; i < columns.count; ++i) {
@ -1087,7 +1067,6 @@ var ViewMenu = {
// This column is the sort key. Its item is checked.
if (column.getAttribute("sortDirection") != "") {
menuitem.setAttribute("checked", "true");
isSorted = true;
}
}
else if (type == "checkbox") {

View File

@ -147,7 +147,6 @@ let gContainersManager = {
let icon = document.getElementById("icon").value;
let color = document.getElementById("color").value;
let name = document.getElementById("name").value;
let userContextId = false;
if (this.icons.indexOf(icon) == -1) {
throw "Internal error. The icon value doesn't match.";

View File

@ -526,7 +526,6 @@ var DirectoryLinksProvider = {
* @return download promise
*/
reportSitesAction: function DirectoryLinksProvider_reportSitesAction(sites, action, triggeringSiteIndex) {
let pastImpressions;
// Check if the suggested tile was shown
if (action == "view") {
sites.slice(0, triggeringSiteIndex + 1).filter(s => s).forEach(site => {
@ -544,13 +543,6 @@ var DirectoryLinksProvider = {
// suggested tile has targetedSite, or frecent_sites if it was pinned
let {frecent_sites, targetedSite, url} = sites[triggeringSiteIndex].link;
if (frecent_sites || targetedSite) {
// skip past_impressions for "unpin" to avoid chance of tracking
if (this._frequencyCaps[url] && action != "unpin") {
pastImpressions = {
total: this._frequencyCaps[url].totalViews,
daily: this._frequencyCaps[url].dailyViews
};
}
this._setFrequencyCapClick(url);
}
}