mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 08:48:07 +00:00
Bug 1230369 - Manually fix some remaining instances of Ci/Cc/Cu definitions and switch Components.* to using the shorthand in some places. r=florian
MozReview-Commit-ID: 9SmoR9RlvZE --HG-- extra : rebase_source : 054e14150921615ed67415ddb91b45169cc868d4
This commit is contained in:
parent
196444ef40
commit
606beee3f2
@ -2,8 +2,6 @@
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
var {Ci: interfaces, Cc: classes} = Components;
|
||||
|
||||
var HasFindClipboard = Services.clipboard.supportsFindClipboard();
|
||||
|
||||
add_task(async function() {
|
||||
|
@ -683,7 +683,6 @@ var gMainPane = {
|
||||
revertCheckbox();
|
||||
return;
|
||||
case CONFIRM_RESTART_PROMPT_RESTART_NOW:
|
||||
const Cc = Components.classes, Ci = Components.interfaces;
|
||||
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"]
|
||||
.createInstance(Ci.nsISupportsPRBool);
|
||||
Services.obs.notifyObservers(cancelQuit, "quit-application-requested",
|
||||
@ -886,11 +885,8 @@ var gMainPane = {
|
||||
},
|
||||
|
||||
_getTabsForHomePage() {
|
||||
var win;
|
||||
var tabs = [];
|
||||
|
||||
const Cc = Components.classes, Ci = Components.interfaces;
|
||||
win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
var win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
|
||||
if (win && win.document.documentElement
|
||||
.getAttribute("windowtype") == "navigator:browser") {
|
||||
|
@ -8,8 +8,8 @@ updateAppInfo({
|
||||
|
||||
registerManifests([do_get_file("data/test_abi.manifest")]);
|
||||
|
||||
const catman = Components.classes["@mozilla.org/categorymanager;1"].
|
||||
getService(Components.interfaces.nsICategoryManager);
|
||||
const catman = Cc["@mozilla.org/categorymanager;1"].
|
||||
getService(Ci.nsICategoryManager);
|
||||
|
||||
function is_registered(name) {
|
||||
try {
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
/* globals gChromeWin */
|
||||
|
||||
var Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
@ -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/. */
|
||||
|
||||
var Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://services-common/utils.js"); /* global: CommonUtils */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
@ -7,6 +7,7 @@
|
||||
/* import-globals-from ../../devtools/server/main.js */
|
||||
/* eslint "mozilla/use-chromeutils-import": ["error", {allowCu: true}] */
|
||||
|
||||
// eslint-disable-next-line mozilla/no-define-cc-etc
|
||||
const Cu = Components.utils;
|
||||
const { Promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
|
@ -22,12 +22,6 @@
|
||||
// Boilerplate used to be able to import this module both from the main
|
||||
// thread and from worker threads.
|
||||
|
||||
// Since const is lexically scoped, hoist the
|
||||
// conditionally-useful definition ourselves.
|
||||
const Cu = typeof Components != "undefined" ? Components.utils : undefined;
|
||||
const Ci = typeof Components != "undefined" ? Components.interfaces : undefined;
|
||||
const Cc = typeof Components != "undefined" ? Components.classes : undefined;
|
||||
|
||||
/**
|
||||
* A constructor for messages that require transfers instead of copies.
|
||||
*
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
var Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
|
||||
|
||||
this.EXPORTED_SYMBOLS = [ "AboutReader" ];
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["PopupNotifications"];
|
||||
|
||||
var Cc = Components.classes, Ci = Components.interfaces, Cu = Components.utils;
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm");
|
||||
|
@ -44,9 +44,11 @@
|
||||
// This is allowed in workers.
|
||||
/* global setImmediate:false */
|
||||
|
||||
/* eslint-disable mozilla/no-define-cc-etc */
|
||||
var Cu = this.require ? require("chrome").Cu : Components.utils;
|
||||
var Cc = this.require ? require("chrome").Cc : Components.classes;
|
||||
var Ci = this.require ? require("chrome").Ci : Components.interfaces;
|
||||
/* eslint-enable mozilla/no-define-cc-etc */
|
||||
// If we can access Components, then we use it to capture an async
|
||||
// parent stack trace; see scheduleWalkerLoop. However, as it might
|
||||
// not be available (see above), users of this must check it first.
|
||||
|
@ -7,7 +7,7 @@ function run_test() {
|
||||
do_test_pending();
|
||||
|
||||
sendCommand("let v = 'test';", function() {
|
||||
let codeCoverage = Components.classes["@mozilla.org/tools/code-coverage;1"].getService(Components.interfaces.nsICodeCoverage);
|
||||
let codeCoverage = Cc["@mozilla.org/tools/code-coverage;1"].getService(Ci.nsICodeCoverage);
|
||||
|
||||
codeCoverage.dumpCounters();
|
||||
codeCoverage.resetCounters();
|
||||
|
@ -14,7 +14,7 @@ QuitterObserver.prototype = {
|
||||
classDescription: "Quitter Observer for use in testing.",
|
||||
classID: Components.ID("{c235a986-5ac1-4f28-ad73-825dae9bad90}"),
|
||||
contractID: "@mozilla.org/quitter-observer;1",
|
||||
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIObserver]),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
|
||||
_xpcom_categories: [{category: "profile-after-change", service: true }],
|
||||
isFrameScriptLoaded: false,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user