Bug 1229874: Part 2 - Fix the major errors detected by ESLint. r=billm

--HG--
extra : commitid : 8MfFtdlzGEG
extra : rebase_source : 744d65868d5a3d217bd5f6428a3486e95fa14716
extra : source : 880fc261adae00a344e227ea2fa246b771cd57a6
This commit is contained in:
Kris Maglione 2015-12-02 16:58:24 -08:00
Родитель 51e9466a0f
Коммит 62d3c9701a
4 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -33,7 +33,7 @@ function contextMenuObserver(subject, topic, data) {
// calculated in nsContextMenu.jsm we simple reuse its flags here.
// For remote processes there is a gContextMenuContentData where all
// the important info is stored from the child process. We get
// this data in |contentData|.
// this data in |contextData|.
var menuBuilder = {
build: function(contextData) {
// TODO: icons should be set for items
@ -98,7 +98,7 @@ var menuBuilder = {
top.setAttribute("ext-type", "top-level-menu");
let menupopup = doc.createElement("menupopup");
top.appendChild(menupopup);
for (i of topLevelItems) {
for (let i of topLevelItems) {
menupopup.appendChild(i);
}
xulMenu.appendChild(top);
@ -326,13 +326,13 @@ MenuItem.prototype = {
}
if (this.documentUrlMatchPattern &&
!this.documentUrlMatchPattern.matches(contentData.documentURIObject)) {
!this.documentUrlMatchPattern.matches(contextData.documentURIObject)) {
return false;
}
if (this.targetUrlPatterns &&
(contextData.onImage || contextData.onAudio || contextData.onVideo) &&
!this.targetUrlPatterns.matches(contentData.mediaURL)) {
!this.targetUrlPatterns.matches(contextData.mediaURL)) {
// TODO: double check if mediaURL is always set when we need it
return false;
}

Просмотреть файл

@ -473,7 +473,7 @@ global.WindowManager = {
};
if (getInfo && getInfo.populate) {
results.tabs = TabManager.for(extension).getTabs(window);
result.tabs = TabManager.for(extension).getTabs(window);
}
return result;

Просмотреть файл

@ -350,7 +350,7 @@ var GlobalManager = {
if (event.target != docShell.contentViewer.DOMDocument) {
return;
}
eventHandler.removeEventListener("unload", listener);
eventHandler.removeEventListener("unload", listener, true);
context.unload();
};
eventHandler.addEventListener("unload", listener, true);
@ -581,7 +581,7 @@ ExtensionData.prototype = {
if (!locales.has(defaultLocale)) {
this.manifestError('Value for "default_locale" property must correspond to ' +
'a directory in "_locales/". Not found: ' +
JSON.stringify(`_locales/${default_locale}/`));
JSON.stringify(`_locales/${this.manifest.default_locale}/`));
}
} else if (locales.size) {
this.manifestError('The "default_locale" property is required when a ' +

Просмотреть файл

@ -105,6 +105,7 @@ add_task(function* testAsyncConvert() {
// nonexistent WebExtension fails.
add_task(function* testInvalidUUID() {
let uri = NetUtil.newURI("moz-extension://eb4f3be8-41c9-4970-aa6d-b84d1ecc02b2/file.css");
let stream = StringStream("Foo __MSG_xxx__ bar __MSG_yyy__ baz");
Assert.throws(() => {
convService.convert(stream, FROM_TYPE, TO_TYPE, uri);