Backed out changeset fc7f502a43a1 (bug 1336070)

This commit is contained in:
Sebastian Hengst 2017-02-03 13:26:41 +01:00
parent c5dbb5ded6
commit c7958d1860
15 changed files with 22 additions and 59 deletions

View File

@ -7,6 +7,6 @@ module.exports = {
"rules": {
"no-shadow": "error",
"no-undef": "error"
"no-undef": "off"
}
};

View File

@ -1,7 +1,4 @@
"use strict";
module.exports = {
rules: {
"no-undef": "off"
}
};

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
rules: {
"no-undef": "off"
}
};

View File

@ -42,7 +42,6 @@
// TODO : [nice to have] - Immediately save, buffer the actions in a local queue and send (so it works offline, works like our native extensions)
/* eslint-disable no-shadow */
/* eslint "mozilla/import-browserjs-globals": "error" */
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",

View File

@ -58,8 +58,7 @@ var Presentation = {
init() {
log("init");
// Register PresentationDevicePrompt into a XPCOM component.
let {PresentationDevicePrompt} = Cu.import(PRESENTATION_DEVICE_PROMPT_PATH, {});
this.PresentationDevicePrompt = PresentationDevicePrompt;
Cu.import(PRESENTATION_DEVICE_PROMPT_PATH);
this._register();
},
@ -67,7 +66,6 @@ var Presentation = {
log("uninit");
// Unregister PresentationDevicePrompt XPCOM component.
this._unregister();
delete this.PresentationDevicePrompt;
Cu.unload(PRESENTATION_DEVICE_PROMPT_PATH);
},
@ -75,7 +73,7 @@ var Presentation = {
_register() {
log("_register");
this._devicePromptFactory = new Factory();
this._devicePromptFactory.register(this.PresentationDevicePrompt);
this._devicePromptFactory.register(PresentationDevicePrompt);
},
_unregister() {

View File

@ -4,8 +4,6 @@
"use strict";
const {utils: Cu} = Components;
this.EXPORTED_SYMBOLS = ["CleanupManager"];
const cleanupHandlers = new Set();

View File

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global APP_SHUTDOWN:false */
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -31,8 +31,7 @@ let WebCompatReporter = {
},
init() {
let TabListener = Cu.import(TABLISTENER_JSM, {});
this.TabListener = TabListener;
Cu.import(TABLISTENER_JSM);
let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"]
.getService(Ci.nsIStyleSheetService);
@ -62,7 +61,7 @@ let WebCompatReporter = {
.getInterface(Ci.nsIDOMWindowUtils)
.addSheet(this._cachedSheet, this._sheetType);
// Attach listeners to new window.
win._webcompatReporterTabListener = new this.TabListener(win);
win._webcompatReporterTabListener = new TabListener(win);
},
onWindowClosed(win) {
@ -84,7 +83,6 @@ let WebCompatReporter = {
}
CustomizableUI.removeListener(this);
delete this.TabListener;
Cu.unload(TABLISTENER_JSM);
},

View File

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global content:false, sendAsyncMessage:false */
let { utils: Cu } = Components;
const TABDATA_MESSAGE = "WebCompat:SendTabData";

View File

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global content:false, addMessageListener:false, removeMessageListener: false */
let { utils: Cu } = Components;
const SCREENSHOT_MESSAGE = "WebCompat:SendScreenshot";

View File

@ -1,7 +0,0 @@
"use strict";
module.exports = {
"extends": [
"../../../../testing/mochitest/browser.eslintrc.js"
]
};

View File

@ -19,12 +19,11 @@ function* getPriority(aBrowser) {
aBrowser = aBrowser.linkedBrowser;
return yield ContentTask.spawn(aBrowser, null, function* () {
return content.document.docShell
.QueryInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocumentLoader)
.loadGroup
.QueryInterface(Components.interfaces.nsISupportsPriority)
.priority;
return docShell.QueryInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocumentLoader)
.loadGroup
.QueryInterface(Components.interfaces.nsISupportsPriority)
.priority;
});
}
@ -33,12 +32,11 @@ function* setPriority(aBrowser, aPriority) {
aBrowser = aBrowser.linkedBrowser;
yield ContentTask.spawn(aBrowser, aPriority, function* (contentPriority) {
content.document.docShell
.QueryInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocumentLoader)
.loadGroup
.QueryInterface(Ci.nsISupportsPriority)
.priority = contentPriority;
docShell.QueryInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocumentLoader)
.loadGroup
.QueryInterface(Ci.nsISupportsPriority)
.priority = contentPriority;
});
}

View File

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global addMessageListener:false, sendAsyncMessage:false, XPCOMUtils */
const TEST_MSG = "ContentSearchTest";
const SERVICE_EVENT_TYPE = "ContentSearchService";
const CLIENT_EVENT_TYPE = "ContentSearchClient";
@ -40,8 +38,8 @@ addMessageListener(TEST_MSG, msg => {
function waitForLoadAndStopIt(expectedURL, callback) {
let Ci = Components.interfaces;
let webProgress = content.document.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebProgress);
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebProgress);
let listener = {
onStateChange(webProg, req, flags, status) {
if (req instanceof Ci.nsIChannel) {

View File

@ -54,16 +54,13 @@ const SCRIPTS = [
module.exports = function(context) {
return {
Program: function(node) {
let filepath = helpers.getAbsoluteFilePath(context);
let root = helpers.getRootDir(filepath);
let relativepath = path.relative(root, filepath);
if ((helpers.getTestType(this) != "browser" &&
!helpers.getIsHeadFile(this)) &&
!relativepath.includes("content")) {
if (helpers.getTestType(this) != "browser" &&
!helpers.getIsHeadFile(this)) {
return;
}
let filepath = helpers.getAbsoluteFilePath(context);
let root = helpers.getRootDir(filepath);
for (let script of SCRIPTS) {
let fileName = path.join(root, script);
try {

View File

@ -1,6 +1,6 @@
{
"name": "eslint-plugin-mozilla",
"version": "0.2.18",
"version": "0.2.17",
"description": "A collection of rules that help enforce JavaScript coding standard in the Mozilla project.",
"keywords": [
"eslint",