зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1667455 - Part 10: Stop importing Services.jsm from chrome-priv HTML code, multi-line cases. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D150899
This commit is contained in:
Родитель
52c95734e7
Коммит
03b55aae15
|
@ -24,9 +24,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1339722
|
|||
* 4. Verify that it doesn't crash.
|
||||
**/
|
||||
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
// This topic used to be http-on-useragent-request, but that got removed in
|
||||
// bug 1513574. on-modify-request is called around the same time, and should
|
||||
// behave similarly.
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
|
||||
var chromeScript;
|
||||
chromeScript = SpecialPowers.loadChromeScript(_ => {
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
|
||||
Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_ALL, value => resolve());
|
||||
});
|
||||
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
"resource://gre/modules/AppConstants.jsm"
|
||||
);
|
||||
const { Assert } = ChromeUtils.import("resource://testing-common/Assert.jsm");
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
|
||||
const UNRECOGNIZED_PATH = /Could not initialize path: NS_ERROR_FILE_UNRECOGNIZED_PATH/;
|
||||
const EMPTY_PATH = /PathUtils does not support empty paths/;
|
||||
|
|
|
@ -58,9 +58,6 @@ let chromeScriptHandle = null;
|
|||
function startListeningForClickEventsInChrome() {
|
||||
/* eslint-env mozilla/frame-script */
|
||||
function chromeScript() {
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
let topWin = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
if (!topWin) {
|
||||
topWin = Services.wm.getMostRecentWindow("navigator:geckoview");
|
||||
|
|
|
@ -38,9 +38,6 @@ let chromeScriptHandle = null;
|
|||
function startListeningForContextmenuEventsInChrome() {
|
||||
/* eslint-env mozilla/frame-script */
|
||||
function chromeScript() {
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
let topWin = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
if (!topWin) {
|
||||
topWin = Services.wm.getMostRecentWindow("navigator:geckoview");
|
||||
|
|
|
@ -41,9 +41,6 @@ add_task(async function check_startup_canary() {
|
|||
|
||||
async function canaryExists() {
|
||||
let chromeScript = loadChromeScript(async () => {
|
||||
const {
|
||||
Services,
|
||||
} = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
// This file is called FILE_STARTUP_INCOMPLETE in nsAppRunner.cpp and
|
||||
// referenced via mozilla::startup::GetIncompleteStartupFile:
|
||||
let file = Services.dirsvc.get("ProfLD", Ci.nsIFile);
|
||||
|
|
|
@ -25,11 +25,6 @@ function addLoginsInParent(...aLogins) {
|
|||
let initialCount = 5;
|
||||
|
||||
addMessageListener("initLogins", logins => {
|
||||
// eslint-disable-next-line no-shadow
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
|
||||
let nsLoginInfo = Components.Constructor(
|
||||
"@mozilla.org/login-manager/loginInfo;1",
|
||||
Ci.nsILoginInfo,
|
||||
|
|
|
@ -35,9 +35,6 @@ let proxyAuthinfo = {
|
|||
modalType = authPromptModalType;
|
||||
|
||||
let chromeScript = runInParent(() => {
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
const promptFac = Cc[
|
||||
"@mozilla.org/passwordmanager/authpromptfactory;1"
|
||||
].getService(Ci.nsIPromptFactory);
|
||||
|
|
|
@ -14,10 +14,6 @@ async function runTests() {
|
|||
|
||||
var chromeScript;
|
||||
chromeScript = SpecialPowers.loadChromeScript(_ => {
|
||||
const { Services } = ChromeUtils.import(
|
||||
"resource://gre/modules/Services.jsm"
|
||||
);
|
||||
|
||||
function onExamResp(subject, topic, data) {
|
||||
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
|
||||
let classifiedChannel = subject.QueryInterface(Ci.nsIClassifiedChannel);
|
||||
|
|
Загрузка…
Ссылка в новой задаче