Bug 1237340: Fix browser and toolkit eslint failures. r=Felipe

This commit is contained in:
Dave Townsend 2016-01-06 10:10:35 -08:00
parent ebdf64b7b9
commit 7ce0e0df27
13 changed files with 16 additions and 27 deletions

View File

@ -83,6 +83,7 @@ browser/components/tabview/**
browser/components/translation/**
browser/components/uitour/**
browser/extensions/pdfjs/**
browser/extensions/pocket/content/panels/js/vendor/**
browser/extensions/shumway/**
browser/fuel/**
browser/locales/**

View File

@ -197,7 +197,7 @@ var pktUI = (function() {
// Send error message for invalid url
if (!isValidURL) {
// TODO: Pass key for localized error in error object
var error = {
let error = {
message: 'Only links can be saved',
localizedKey: "onlylinkssaved"
};
@ -208,7 +208,7 @@ var pktUI = (function() {
// Check online state
if (!navigator.onLine) {
// TODO: Pass key for localized error in error object
var error = {
let error = {
message: 'You must be connected to the Internet in order to save to Pocket. Please connect to the Internet and try again.'
};
pktUIMessaging.sendErrorMessageToPanel(panelId, saveLinkMessageId, error);

View File

@ -75,4 +75,4 @@ var pktPanelMessaging = (function() {
removeMessageListener : removeMessageListener,
sendMessage: sendMessage
};
}());
}());

View File

@ -147,4 +147,4 @@ templates['signupstoryboard_shell'] = template({"1":function(depth0,helpers,part
+ escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"loginnow","hash":{},"data":data}) : helper)))
+ "</a>.</p>\n</div>";
},"useData":true});
})();
})();

View File

@ -123,7 +123,7 @@ var pktApi = (function() {
// https://developer.mozilla.org/en-US/Add-ons/Overlay_Extensions/XUL_School/Local_Storage
if (!prefBranch.prefHasUserValue(key))
return;
return undefined;
return prefBranch.getComplexValue(key, Components.interfaces.nsISupportsString).data;
}

View File

@ -1,8 +1,6 @@
// Parent config file for all browser-chrome files.
{
"rules": {
// Head files want to define globals so don't warn for unused globals
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"mozilla/import-headjs-globals": 1,
"mozilla/import-browserjs-globals": 1,
},

View File

@ -1,8 +1,6 @@
// Parent config file for all mochitest files.
{
rules: {
// Head files want to define globals so don't warn for unused globals
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"mozilla/import-headjs-globals": 1,
},

View File

@ -1,8 +1,6 @@
// Parent config file for all mochitest files.
{
rules: {
// Head files want to define globals so don't warn for unused globals
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"mozilla/import-headjs-globals": 1,
},

View File

@ -1,8 +1,6 @@
// Parent config file for all xpcshell files.
{
rules: {
// Head files want to define globals so don't warn for unused globals
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
"mozilla/import-headjs-globals": 1,
},

View File

@ -659,7 +659,7 @@ Port.prototype = {
function getMessageManager(target) {
if (target instanceof Ci.nsIFrameLoaderOwner) {
return target.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.messageManager;
}
}
return target;
}

View File

@ -8,6 +8,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import('resource://gre/modules/Services.jsm');
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import('resource://gre/modules/AppConstants.jsm');
XPCOMUtils.defineLazyServiceGetter(
this,
@ -176,15 +177,13 @@ function display(profileData) {
if (dir) {
td.appendChild(document.createTextNode(' '));
let button = document.createElement('button');
let buttonText = document.createTextNode(bundle.GetStringFromName(
#ifdef XP_WIN
'winOpenDir'
#elif XP_MACOSX
'macOpenDir'
#else
'openDir'
#endif
));
let string = 'openDir';
if (AppConstants.platform == "win") {
string = 'winOpenDir';
} else if (AppConstants.platform == "macosx") {
string = 'macOpenDir';
}
let buttonText = document.createTextNode(bundle.GetStringFromName(string));
button.appendChild(buttonText);
td.appendChild(button);

View File

@ -24,7 +24,7 @@ toolkit.jar:
content/global/aboutNetworking.js
content/global/aboutNetworking.xhtml
#ifndef ANDROID
* content/global/aboutProfiles.js
content/global/aboutProfiles.js
content/global/aboutProfiles.xhtml
#endif
content/global/aboutServiceWorkers.js

View File

@ -28,7 +28,6 @@ var PLUGINS = [{
get disabled() {
return this.enabledState == Ci.nsIPluginTag.STATE_DISABLED;
},
filename: "",
filename: "/usr/lib/plugins/dupplugin1.so"
}, {
name: "Duplicate Plugin 2",
@ -49,7 +48,6 @@ var PLUGINS = [{
get disabled() {
return this.enabledState == Ci.nsIPluginTag.STATE_DISABLED;
},
filename: "",
filename: "/usr/lib/plugins/dupplugin2.so"
}, {
name: "Non-duplicate Plugin", // 3
@ -70,7 +68,6 @@ var PLUGINS = [{
get disabled() {
return this.enabledState == Ci.nsIPluginTag.STATE_DISABLED;
},
filename: "",
filename: "/usr/lib/plugins/dupplugin4.so"
}, {
name: "Another Non-duplicate Plugin", // 5