Bug 1434737 - Move to ChromeUtils.import() - SeaMonkey part. r=frg

MozReview-Commit-ID: BywABWvaiZf
This commit is contained in:
Philipp Kewisch 2018-01-31 23:11:16 +01:00
Родитель b871dba1fe
Коммит 1bda1d563d
122 изменённых файлов: 332 добавлений и 347 удалений

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

@ -6,14 +6,13 @@
/* This content script should work in any browser or iframe and should not /* This content script should work in any browser or iframe and should not
* depend on the frame being contained in tabbrowser. */ * depend on the frame being contained in tabbrowser. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContent", ChromeUtils.defineModuleGetter(this, "LoginManagerContent",
"resource://gre/modules/LoginManagerContent.jsm"); "resource://gre/modules/LoginManagerContent.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "InsecurePasswordUtils", ChromeUtils.defineModuleGetter(this, "InsecurePasswordUtils",
"resource://gre/modules/InsecurePasswordUtils.jsm"); "resource://gre/modules/InsecurePasswordUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LoginFormFactory", ChromeUtils.defineModuleGetter(this, "LoginFormFactory",
"resource://gre/modules/LoginManagerContent.jsm"); "resource://gre/modules/LoginManagerContent.jsm");
addMessageListener("RemoteLogins:fillForm", message => { addMessageListener("RemoteLogins:fillForm", message => {

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

@ -171,7 +171,7 @@ function checkForImage(elem, htmllocalname)
.getService(Components.interfaces.nsILoadContextInfoFactory); .getService(Components.interfaces.nsILoadContextInfoFactory);
var loadContextInfo = opener.gPrivate ? LoadContextInfo.private : var loadContextInfo = opener.gPrivate ? LoadContextInfo.private :
LoadContextInfo.default; LoadContextInfo.default;
Components.utils.import("resource://gre/modules/NetUtil.jsm"); ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"] Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Components.interfaces.nsICacheStorageService) .getService(Components.interfaces.nsICacheStorageService)
.diskCacheStorage(loadContextInfo, false) .diskCacheStorage(loadContextInfo, false)
@ -518,7 +518,7 @@ function formatNumber(number)
function makeHrefAbsolute(href, elem) function makeHrefAbsolute(href, elem)
{ {
Components.utils.import("resource://gre/modules/NetUtil.jsm"); ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
try { try {
var baseURI = NetUtil.newURI(elem.baseURI, elem.ownerDocument.characterSet); var baseURI = NetUtil.newURI(elem.baseURI, elem.ownerDocument.characterSet);
href = NetUtil.newURI(href, elem.ownerDocument.characterSet, baseURI).spec; href = NetUtil.newURI(href, elem.ownerDocument.characterSet, baseURI).spec;

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

@ -3,12 +3,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/DownloadTaskbarProgress.jsm"); ChromeUtils.import("resource://gre/modules/DownloadTaskbarProgress.jsm");
Components.utils.import("resource:///modules/WindowsPreviewPerTab.jsm"); ChromeUtils.import("resource:///modules/WindowsPreviewPerTab.jsm");
this.__defineGetter__("PluralForm", function() { this.__defineGetter__("PluralForm", function() {
Components.utils.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
return this.PluralForm; return this.PluralForm;
}); });
this.__defineSetter__("PluralForm", function (val) { this.__defineSetter__("PluralForm", function (val) {
@ -16,7 +16,7 @@ this.__defineSetter__("PluralForm", function (val) {
return this.PluralForm = val; return this.PluralForm = val;
}); });
XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing", ChromeUtils.defineModuleGetter(this, "SafeBrowsing",
"resource://gre/modules/SafeBrowsing.jsm"); "resource://gre/modules/SafeBrowsing.jsm");
const REMOTESERVICE_CONTRACTID = "@mozilla.org/toolkit/remote-service;1"; const REMOTESERVICE_CONTRACTID = "@mozilla.org/toolkit/remote-service;1";
@ -532,7 +532,7 @@ function Startup()
if (!window.content.opener && if (!window.content.opener &&
Services.prefs.getBoolPref("browser.doorhanger.enabled")) { Services.prefs.getBoolPref("browser.doorhanger.enabled")) {
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/PopupNotifications.jsm", tmp); ChromeUtils.import("resource://gre/modules/PopupNotifications.jsm", tmp);
window.PopupNotifications = new tmp.PopupNotifications( window.PopupNotifications = new tmp.PopupNotifications(
getBrowser(), getBrowser(),
document.getElementById("notification-popup"), document.getElementById("notification-popup"),

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const nsISupports = Components.interfaces.nsISupports; const nsISupports = Components.interfaces.nsISupports;
const nsIBrowserDOMWindow = Components.interfaces.nsIBrowserDOMWindow; const nsIBrowserDOMWindow = Components.interfaces.nsIBrowserDOMWindow;

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

@ -6,8 +6,8 @@ const kSpace = " ".charCodeAt(0);
const kSlash = "/".charCodeAt(0); const kSlash = "/".charCodeAt(0);
const kApostrophe = "'".charCodeAt(0); const kApostrophe = "'".charCodeAt(0);
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
function findTypeController(aTypeAheadFind, aWindow) function findTypeController(aTypeAheadFind, aWindow)
{ {

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

@ -1,9 +1,8 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "FormHistory",
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory", "resource://gre/modules/FormHistory.jsm");
"resource://gre/modules/FormHistory.jsm");
function test() { function test() {
waitForExplicitFinish(); waitForExplicitFinish();
@ -27,7 +26,7 @@ function test2()
let textbox = findBar.getElement("findbar-textbox"); let textbox = findBar.getElement("findbar-textbox");
let temp = {}; let temp = {};
Components.utils.import("resource:///modules/Sanitizer.jsm", temp); ChromeUtils.import("resource:///modules/Sanitizer.jsm", temp);
let s = temp.Sanitizer; let s = temp.Sanitizer;
let prefBranch = prefService.getBranch("privacy.item."); let prefBranch = prefService.getBranch("privacy.item.");

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Cu.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const CRASH_URL = "http://example.com/browser/suite/browser/test/browser/pluginCrashCommentAndURL.html"; const CRASH_URL = "http://example.com/browser/suite/browser/test/browser/pluginCrashCommentAndURL.html";

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

@ -8,7 +8,7 @@ var gClickToPlayPluginActualEvents = 0;
var gClickToPlayPluginExpectedEvents = 5; var gClickToPlayPluginExpectedEvents = 5;
var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost); var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
// This listens for the next opened tab and checks it is of the right url. // This listens for the next opened tab and checks it is of the right url.
// opencallback is called when the new tab is fully loaded // opencallback is called when the new tab is fully loaded

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

@ -133,8 +133,8 @@ function unregisterPlayPreview() {
gPlayPreviewRegistration.unregister(); gPlayPreviewRegistration.unregister();
} }
Components.utils.import('resource://gre/modules/XPCOMUtils.jsm'); ChromeUtils.import('resource://gre/modules/XPCOMUtils.jsm');
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function test() { function test() {

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

@ -18,8 +18,8 @@ Browser context menu tests.
/** Test for Login Manager: multiple login autocomplete. **/ /** Test for Login Manager: multiple login autocomplete. **/
SpecialPowers.Cu.import("resource://gre/modules/InlineSpellChecker.jsm", window); SpecialPowers.ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm", window);
SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window); SpecialPowers.ChromeUtils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window);
const Cc = SpecialPowers.Cc; const Cc = SpecialPowers.Cc;
const Ci = SpecialPowers.Ci; const Ci = SpecialPowers.Ci;

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

@ -3,12 +3,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess", ChromeUtils.defineModuleGetter(this, "BrowserToolboxProcess",
"resource://devtools/client/framework/ToolboxProcess.jsm"); "resource://devtools/client/framework/ToolboxProcess.jsm");
XPCOMUtils.defineLazyGetter(this, "DeveloperToolbar", function() { XPCOMUtils.defineLazyGetter(this, "DeveloperToolbar", function() {
var tmp = {}; var tmp = {};
Components.utils.import("resource://devtools/shared/Loader.jsm", tmp); ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp);
var DeveloperToolbar = tmp.require("devtools/client/shared/developer-toolbar").DeveloperToolbar; var DeveloperToolbar = tmp.require("devtools/client/shared/developer-toolbar").DeveloperToolbar;
return new DeveloperToolbar(window); return new DeveloperToolbar(window);
}); });
@ -21,7 +21,7 @@ var ResponsiveUI = {
XPCOMUtils.defineLazyGetter(ResponsiveUI, "ResponsiveUIManager", function() { XPCOMUtils.defineLazyGetter(ResponsiveUI, "ResponsiveUIManager", function() {
var tmp = {}; var tmp = {};
Components.utils.import("resource://devtools/client/responsivedesign/responsivedesign.jsm", tmp); ChromeUtils.import("resource://devtools/client/responsivedesign/responsivedesign.jsm", tmp);
return tmp.ResponsiveUIManager; return tmp.ResponsiveUIManager;
}); });
@ -33,15 +33,15 @@ var Scratchpad = {
XPCOMUtils.defineLazyGetter(Scratchpad, "ScratchpadManager", function() { XPCOMUtils.defineLazyGetter(Scratchpad, "ScratchpadManager", function() {
var tmp = {}; var tmp = {};
Components.utils.import("resource://devtools/client/scratchpad/scratchpad-manager.jsm", tmp); ChromeUtils.import("resource://devtools/client/scratchpad/scratchpad-manager.jsm", tmp);
return tmp.ScratchpadManager; return tmp.ScratchpadManager;
}); });
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools", ChromeUtils.defineModuleGetter(this, "gDevTools",
"resource://devtools/client/framework/gDevTools.jsm"); "resource://devtools/client/framework/gDevTools.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "gDevToolsBrowser", ChromeUtils.defineModuleGetter(this, "gDevToolsBrowser",
"resource://devtools/client/framework/gDevTools.jsm"); "resource://devtools/client/framework/gDevTools.jsm");
function openEyedropper() { function openEyedropper() {
var eyedropper = new this.Eyedropper(this, { context: "menu", var eyedropper = new this.Eyedropper(this, { context: "menu",
@ -52,7 +52,7 @@ function openEyedropper() {
Object.defineProperty(this, "Eyedropper", { Object.defineProperty(this, "Eyedropper", {
get() { get() {
var tmp = {}; var tmp = {};
Components.utils.import("resource://devtools/shared/Loader.jsm", tmp); ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp);
return tmp.require("devtools/client/eyedropper/eyedropper").Eyedropper; return tmp.require("devtools/client/eyedropper/eyedropper").Eyedropper;
}, },
configurable: true, configurable: true,
@ -62,7 +62,7 @@ Object.defineProperty(this, "Eyedropper", {
Object.defineProperty(this, "HUDService", { Object.defineProperty(this, "HUDService", {
get() { get() {
var tmp = {}; var tmp = {};
Components.utils.import("resource://devtools/shared/Loader.jsm", tmp); ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp);
return tmp.require("devtools/client/webconsole/hudservice").HUDService; return tmp.require("devtools/client/webconsole/hudservice").HUDService;
}, },
configurable: true, configurable: true,

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
window.onload = function () { window.onload = function () {
// get release notes URL and vendor URL from prefs // get release notes URL and vendor URL from prefs

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
var gStateObject; var gStateObject;
var gTreeData; var gTreeData;

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

@ -1724,7 +1724,7 @@
<body> <body>
<![CDATA[ <![CDATA[
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
var notificationName = "addon-install-cancelled"; var notificationName = "addon-install-cancelled";
var messageString = this._stringBundle.GetStringFromName("addonDownloadCancelled"); var messageString = this._stringBundle.GetStringFromName("addonDownloadCancelled");
messageString = tmp.PluralForm.get(installInfo.installs.length, messageString); messageString = tmp.PluralForm.get(installInfo.installs.length, messageString);
@ -1758,8 +1758,8 @@
<body> <body>
<![CDATA[ <![CDATA[
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp); ChromeUtils.import("resource://gre/modules/AddonManager.jsm", tmp);
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
var notificationName = "addon-install-complete" var notificationName = "addon-install-complete"
var addonNotification = this.getNotificationWithValue(notificationName); var addonNotification = this.getNotificationWithValue(notificationName);
@ -1890,13 +1890,13 @@
<body> <body>
<![CDATA[ <![CDATA[
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp); ChromeUtils.import("resource://gre/modules/AddonManager.jsm", tmp);
if (installInfo.installs.every(function(aInstall) { if (installInfo.installs.every(function(aInstall) {
return aInstall.state == tmp.AddonManager.STATE_DOWNLOADED; return aInstall.state == tmp.AddonManager.STATE_DOWNLOADED;
})) }))
return; return;
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
var notificationName = "addon-install-started"; var notificationName = "addon-install-started";
var messageString = this._stringBundle.GetStringFromName("addonDownloading"); var messageString = this._stringBundle.GetStringFromName("addonDownloading");
messageString = tmp.PluralForm.get(installInfo.installs.length, messageString); messageString = tmp.PluralForm.get(installInfo.installs.length, messageString);
@ -1965,7 +1965,7 @@
if (reportName) { if (reportName) {
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/SafeBrowsing.jsm", tmp); ChromeUtils.import("resource://gre/modules/SafeBrowsing.jsm", tmp);
var reportUrl = tmp.SafeBrowsing.getReportURL(reportName, uri); var reportUrl = tmp.SafeBrowsing.getReportURL(reportName, uri);
buttons.push({ buttons.push({
@ -1992,8 +1992,8 @@
</method> </method>
<constructor> <constructor>
<![CDATA[ <![CDATA[
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/BrowserUtils.jsm"); ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
var os = Components.classes["@mozilla.org/observer-service;1"] var os = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService); .getService(Components.interfaces.nsIObserverService);
@ -2018,7 +2018,7 @@
this.addProgressListener(); this.addProgressListener();
if ("nsICrashReporter" in Components.interfaces) if ("nsICrashReporter" in Components.interfaces)
Components.utils.import("resource://gre/modules/CrashSubmit.jsm", this); ChromeUtils.import("resource://gre/modules/CrashSubmit.jsm", this);
]]> ]]>
</constructor> </constructor>
@ -2130,7 +2130,7 @@
this.notifyPopupCountChanged(); this.notifyPopupCountChanged();
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
if (this._prefs.getBoolPref("privacy.popups.showBrowserMessage")) if (this._prefs.getBoolPref("privacy.popups.showBrowserMessage"))
{ {
var brandShortName = this._brandStringBundle.GetStringFromName("brandShortName"); var brandShortName = this._brandStringBundle.GetStringFromName("brandShortName");
@ -2940,7 +2940,7 @@
<body> <body>
<![CDATA[ <![CDATA[
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
var messageString = this._stringBundle.GetStringFromName("addonDownloadCancelled"); var messageString = this._stringBundle.GetStringFromName("addonDownloadCancelled");
messageString = tmp.PluralForm.get(installInfo.installs.length, messageString); messageString = tmp.PluralForm.get(installInfo.installs.length, messageString);
var action = { var action = {
@ -2972,8 +2972,8 @@
<body> <body>
<![CDATA[ <![CDATA[
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp); ChromeUtils.import("resource://gre/modules/AddonManager.jsm", tmp);
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
var messageString; var messageString;
var mainAction = null; var mainAction = null;
@ -3111,13 +3111,13 @@
<body> <body>
<![CDATA[ <![CDATA[
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp); ChromeUtils.import("resource://gre/modules/AddonManager.jsm", tmp);
if (installInfo.installs.every(function(aInstall) { if (installInfo.installs.every(function(aInstall) {
return aInstall.state == tmp.AddonManager.STATE_DOWNLOADED; return aInstall.state == tmp.AddonManager.STATE_DOWNLOADED;
})) }))
return; return;
Components.utils.import("resource://gre/modules/PluralForm.jsm", tmp); ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp);
var messageString = this._stringBundle.GetStringFromName("addonDownloading"); var messageString = this._stringBundle.GetStringFromName("addonDownloading");
messageString = tmp.PluralForm.get(installInfo.installs.length, messageString); messageString = tmp.PluralForm.get(installInfo.installs.length, messageString);
var action = { var action = {
@ -3137,7 +3137,7 @@
</method> </method>
<constructor> <constructor>
<![CDATA[ <![CDATA[
Components.utils.import("resource://gre/modules/BrowserUtils.jsm"); ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
]]> ]]>
</constructor> </constructor>
</implementation> </implementation>
@ -3180,7 +3180,7 @@
var max = 0; var max = 0;
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp); ChromeUtils.import("resource://gre/modules/AddonManager.jsm", tmp);
this.installInfo.installs.forEach(function(aInstall) { this.installInfo.installs.forEach(function(aInstall) {
if (aInstall.maxProgress < 0) if (aInstall.maxProgress < 0)
max = -1; max = -1;
@ -3209,7 +3209,7 @@
this.lastUpdate = now; this.lastUpdate = now;
var elapsed = (now - this.startTime) / 1000; var elapsed = (now - this.startTime) / 1000;
var rate = elapsed && progress / elapsed; var rate = elapsed && progress / elapsed;
Components.utils.import("resource://gre/modules/DownloadUtils.jsm", tmp); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm", tmp);
var status; var status;
[status, this.lastSeconds] = tmp.DownloadUtils.getDownloadStatus(progress, max, rate, this.lastSeconds); [status, this.lastSeconds] = tmp.DownloadUtils.getDownloadStatus(progress, max, rate, this.lastSeconds);
this.setAttribute("status", status); this.setAttribute("status", status);
@ -3400,7 +3400,7 @@
var max = 0; var max = 0;
var tmp = {}; var tmp = {};
Components.utils.import("resource://gre/modules/AddonManager.jsm", tmp); ChromeUtils.import("resource://gre/modules/AddonManager.jsm", tmp);
this.installInfo.installs.forEach(function(aInstall) { this.installInfo.installs.forEach(function(aInstall) {
if (aInstall.maxProgress < 0) if (aInstall.maxProgress < 0)
max = -1; max = -1;
@ -3429,7 +3429,7 @@
this.lastUpdate = now; this.lastUpdate = now;
var elapsed = (now - this.startTime) / 1000; var elapsed = (now - this.startTime) / 1000;
var rate = elapsed && progress / elapsed; var rate = elapsed && progress / elapsed;
Components.utils.import("resource://gre/modules/DownloadUtils.jsm", tmp); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm", tmp);
var status; var status;
[status, this.lastSeconds] = tmp.DownloadUtils.getDownloadStatus(progress, max, rate, this.lastSeconds); [status, this.lastSeconds] = tmp.DownloadUtils.getDownloadStatus(progress, max, rate, this.lastSeconds);
this.setAttribute("status", status); this.setAttribute("status", status);

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

@ -118,7 +118,7 @@
<implementation> <implementation>
<constructor> <constructor>
<![CDATA[ <![CDATA[
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
// grab the first child tree and try to tie it to the prefpanes // grab the first child tree and try to tie it to the prefpanes
var tree = this.getElementsByTagName('tree')[0]; var tree = this.getElementsByTagName('tree')[0];

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

@ -224,7 +224,7 @@
this._draggableStarted = true; this._draggableStarted = true;
try { try {
let tmp = {}; let tmp = {};
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp); ChromeUtils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
let draggableThis = new tmp.WindowDraggingElement(this); let draggableThis = new tmp.WindowDraggingElement(this);
draggableThis.mouseDownCheck = function(e) { draggableThis.mouseDownCheck = function(e) {
// Don't move while customizing. // Don't move while customizing.

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

@ -3,9 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "BookmarkJSONUtils",
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils", "resource://gre/modules/BookmarkJSONUtils.jsm");
"resource://gre/modules/BookmarkJSONUtils.jsm");
var PlacesOrganizer = { var PlacesOrganizer = {
_places: null, _places: null,
@ -332,7 +331,7 @@ var PlacesOrganizer = {
fp.appendFilters(Components.interfaces.nsIFilePicker.filterHTML); fp.appendFilters(Components.interfaces.nsIFilePicker.filterHTML);
if (fp.show() != Components.interfaces.nsIFilePicker.returnCancel) { if (fp.show() != Components.interfaces.nsIFilePicker.returnCancel) {
if (fp.fileURL) { if (fp.fileURL) {
Components.utils.import("resource://gre/modules/BookmarkHTMLUtils.jsm"); ChromeUtils.import("resource://gre/modules/BookmarkHTMLUtils.jsm");
BookmarkHTMLUtils.importFromURL(fp.fileURL.spec, false) BookmarkHTMLUtils.importFromURL(fp.fileURL.spec, false)
.then(null, Components.utils.reportError); .then(null, Components.utils.reportError);
} }
@ -350,7 +349,7 @@ var PlacesOrganizer = {
fp.appendFilters(Components.interfaces.nsIFilePicker.filterHTML); fp.appendFilters(Components.interfaces.nsIFilePicker.filterHTML);
fp.defaultString = "bookmarks.html"; fp.defaultString = "bookmarks.html";
if (fp.show() != Components.interfaces.nsIFilePicker.returnCancel) { if (fp.show() != Components.interfaces.nsIFilePicker.returnCancel) {
Components.utils.import("resource://gre/modules/BookmarkHTMLUtils.jsm"); ChromeUtils.import("resource://gre/modules/BookmarkHTMLUtils.jsm");
BookmarkHTMLUtils.exportToFile(fp.file) BookmarkHTMLUtils.exportToFile(fp.file)
.then(null, Components.utils.reportError); .then(null, Components.utils.reportError);
} }

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

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const LAST_USED_ANNO = "bookmarkPropertiesDialog/folderLastUsed"; const LAST_USED_ANNO = "bookmarkPropertiesDialog/folderLastUsed";
const MAX_FOLDER_ITEM_IN_MENU_LIST = 5; const MAX_FOLDER_ITEM_IN_MENU_LIST = 5;

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

@ -18,9 +18,9 @@
<script type="application/javascript" <script type="application/javascript"
src="chrome://global/content/globalOverlay.js"/> src="chrome://global/content/globalOverlay.js"/>
<script type="application/javascript"><![CDATA[ <script type="application/javascript"><![CDATA[
Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
Components.utils.import("resource://gre/modules/PlacesBackups.jsm"); ChromeUtils.import("resource://gre/modules/PlacesBackups.jsm");
Components.utils.import("resource:///modules/PlacesUIUtils.jsm"); ChromeUtils.import("resource:///modules/PlacesUIUtils.jsm");
]]></script> ]]></script>
<script type="application/javascript" <script type="application/javascript"
src="chrome://communicator/content/places/controller.js"/> src="chrome://communicator/content/places/controller.js"/>

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

@ -6,7 +6,7 @@
<!DOCTYPE overlay SYSTEM "chrome://global/locale/charsetMenu.dtd"> <!DOCTYPE overlay SYSTEM "chrome://global/locale/charsetMenu.dtd">
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script> <script>
Components.utils.import("resource://gre/modules/CharsetMenu.jsm"); ChromeUtils.import("resource://gre/modules/CharsetMenu.jsm");
function UpdateCharsetMenu(aCharset, aNode) function UpdateCharsetMenu(aCharset, aNode)
{ {

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

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
var gConsole, gConsoleBundle, gTextBoxEval, gEvaluator, gCodeToEvaluate; var gConsole, gConsoleBundle, gTextBoxEval, gEvaluator, gCodeToEvaluate;
var gFilter; var gFilter;

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

@ -5,8 +5,8 @@
const Cc = Components.classes; const Cc = Components.classes;
const Ci = Components.interfaces; const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function jsConsoleHandler() {} function jsConsoleHandler() {}
jsConsoleHandler.prototype = { jsConsoleHandler.prototype = {

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

@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://services-common/async.js"); ChromeUtils.import("resource://services-common/async.js");
Components.utils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
// Load DownloadUtils module for convertByteUnits // Load DownloadUtils module for convertByteUnits
Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
// locally loaded services // locally loaded services
var gLocSvc = {}; var gLocSvc = {};
XPCOMUtils.defineLazyModuleGetter(gLocSvc, "FormHistory", ChromeUtils.defineModuleGetter(gLocSvc, "FormHistory",
"resource://gre/modules/FormHistory.jsm", "resource://gre/modules/FormHistory.jsm",
"FormHistory"); "FormHistory");
XPCOMUtils.defineLazyServiceGetter(gLocSvc, "url", XPCOMUtils.defineLazyServiceGetter(gLocSvc, "url",
"@mozilla.org/network/url-parser;1?auth=maybe", "@mozilla.org/network/url-parser;1?auth=maybe",
"nsIURLParser"); "nsIURLParser");

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

@ -17,7 +17,7 @@
extends="chrome://global/content/bindings/richlistbox.xml#richlistitem"> extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
<implementation> <implementation>
<constructor><![CDATA[ <constructor><![CDATA[
Components.utils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
var permLabel = this.type; var permLabel = this.type;
try { try {

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

@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
/** /**
* DownloadProgressListener "class" is used to help update download items shown * DownloadProgressListener "class" is used to help update download items shown
* in the Download Manager UI such as displaying amount transferred, transfer * in the Download Manager UI such as displaying amount transferred, transfer

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
Components.utils.import("resource://gre/modules/Downloads.jsm"); ChromeUtils.import("resource://gre/modules/Downloads.jsm");
const nsIDownloadManager = Components.interfaces.nsIDownloadManager; const nsIDownloadManager = Components.interfaces.nsIDownloadManager;
const nsLocalFile = Components.Constructor("@mozilla.org/file/local;1", const nsLocalFile = Components.Constructor("@mozilla.org/file/local;1",

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

@ -2,8 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
var gDownload; var gDownload;
var gDownloadBundle; var gDownloadBundle;

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

@ -54,7 +54,7 @@
<script type="application/javascript"> <script type="application/javascript">
<![CDATA[ <![CDATA[
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function test() function test()
{ {

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
const nsITreeView = Components.interfaces.nsITreeView; const nsITreeView = Components.interfaces.nsITreeView;
// const nsIDownloadManager is already defined in downloadmanager.js // const nsIDownloadManager is already defined in downloadmanager.js

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

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
const kInterval = 750; // Default to .75 seconds. const kInterval = 750; // Default to .75 seconds.

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

@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
# Set the default content pack to the Mozilla content pack. Use the # Set the default content pack to the Mozilla content pack. Use the
# setHelpFileURI function to set this value. # setHelpFileURI function to set this value.

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

@ -2,7 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
# Global Variables # Global Variables
var helpExternal; var helpExternal;

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

@ -12,8 +12,8 @@ var gDeleteByDomain;
var gHistoryStatus; var gHistoryStatus;
var gHistoryGrouping = "day"; var gHistoryGrouping = "day";
Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
Components.utils.import("resource:///modules/PlacesUIUtils.jsm"); ChromeUtils.import("resource:///modules/PlacesUIUtils.jsm");
function HistoryCommonInit() function HistoryCommonInit()
{ {

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

@ -3,8 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
/** /**
* This returns the key for any node/details object. * This returns the key for any node/details object.

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

@ -13,25 +13,25 @@
| longer term, this code will be restructured to make it more reusable. | | longer term, this code will be restructured to make it more reusable. |
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
var gContextMenuContentData = null; var gContextMenuContentData = null;
XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", function() { XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", function() {
let tmp = {}; let tmp = {};
Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm", tmp); ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm", tmp);
return new tmp.InlineSpellChecker(); return new tmp.InlineSpellChecker();
}); });
XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() { XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
let tmp = {}; let tmp = {};
Components.utils.import("resource://gre/modules/PageMenu.jsm", tmp); ChromeUtils.import("resource://gre/modules/PageMenu.jsm", tmp);
return new tmp.PageMenuParent(); return new tmp.PageMenuParent();
}); });
XPCOMUtils.defineLazyModuleGetter(this, "DevToolsShim", ChromeUtils.defineModuleGetter(this, "DevToolsShim",
"chrome://devtools-shim/content/DevToolsShim.jsm"); "chrome://devtools-shim/content/DevToolsShim.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "findCssSelector", ChromeUtils.defineModuleGetter(this, "findCssSelector",
"resource://gre/modules/css-selector.js"); "resource://gre/modules/css-selector.js");
function nsContextMenu(aXulMenu, aIsShift, aEvent) { function nsContextMenu(aXulMenu, aIsShift, aEvent) {

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

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
var kObserverService; var kObserverService;

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

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
/** /**
* The base view implements everything that's common to the toolbar and * The base view implements everything that's common to the toolbar and

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

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
// XXXmano: we should move most/all of these constants to PlacesUtils // XXXmano: we should move most/all of these constants to PlacesUtils
const ORGANIZER_ROOT_BOOKMARKS = "place:folder=BOOKMARKS_MENU&excludeItems=1&queryType=1"; const ORGANIZER_ROOT_BOOKMARKS = "place:folder=BOOKMARKS_MENU&excludeItems=1&queryType=1";

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

@ -4,14 +4,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", ChromeUtils.defineModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm"); "resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch", ChromeUtils.defineModuleGetter(this, "TelemetryStopwatch",
"resource://gre/modules/TelemetryStopwatch.jsm"); "resource://gre/modules/TelemetryStopwatch.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", ChromeUtils.defineModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm"); "resource://gre/modules/NetUtil.jsm");
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//// Constants //// Constants

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

@ -7,7 +7,7 @@ var Cc = Components.classes;
var Cr = Components.results; var Cr = Components.results;
var Cu = Components.utils; var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
// Import common head. // Import common head.
{ {

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

@ -43,7 +43,7 @@
* Bug 549192 * Bug 549192
* Ensures that history views are updated after deleting entries. * Ensures that history views are updated after deleting entries.
*/ */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const Cc = Components.classes; const Cc = Components.classes;
const Ci = Components.interfaces; const Ci = Components.interfaces;

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

@ -45,7 +45,7 @@
* Ensures that changing the details of places tree's root-node doesn't * Ensures that changing the details of places tree's root-node doesn't
* throw. * throw.
*/ */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const Cc = Components.classes; const Cc = Components.classes;
const Ci = Components.interfaces; const Ci = Components.interfaces;

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

@ -51,7 +51,7 @@
* *
* Ensures that date in places treeviews is correctly formatted. * Ensures that date in places treeviews is correctly formatted.
*/ */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const Cc = Components.classes; const Cc = Components.classes;
const Ci = Components.interfaces; const Ci = Components.interfaces;

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

@ -24,32 +24,32 @@ const TITLE_LENGTH_MAX = 4096;
Cu.importGlobalProperties(["URL"]); Cu.importGlobalProperties(["URL"]);
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", ChromeUtils.defineModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm"); "resource://gre/modules/FileUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", ChromeUtils.defineModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm"); "resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Promise", ChromeUtils.defineModuleGetter(this, "Promise",
"resource://gre/modules/Promise.jsm"); "resource://gre/modules/Promise.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Services", ChromeUtils.defineModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm"); "resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils", ChromeUtils.defineModuleGetter(this, "BookmarkJSONUtils",
"resource://gre/modules/BookmarkJSONUtils.jsm"); "resource://gre/modules/BookmarkJSONUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils", ChromeUtils.defineModuleGetter(this, "BookmarkHTMLUtils",
"resource://gre/modules/BookmarkHTMLUtils.jsm"); "resource://gre/modules/BookmarkHTMLUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups", ChromeUtils.defineModuleGetter(this, "PlacesBackups",
"resource://gre/modules/PlacesBackups.jsm"); "resource://gre/modules/PlacesBackups.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils", ChromeUtils.defineModuleGetter(this, "PlacesTestUtils",
"resource://testing-common/PlacesTestUtils.jsm"); "resource://testing-common/PlacesTestUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesTransactions", ChromeUtils.defineModuleGetter(this, "PlacesTransactions",
"resource://gre/modules/PlacesTransactions.jsm"); "resource://gre/modules/PlacesTransactions.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "OS", ChromeUtils.defineModuleGetter(this, "OS",
"resource://gre/modules/osfile.jsm"); "resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Sqlite", ChromeUtils.defineModuleGetter(this, "Sqlite",
"resource://gre/modules/Sqlite.jsm"); "resource://gre/modules/Sqlite.jsm");
// This imports various other objects in addition to PlacesUtils. // This imports various other objects in addition to PlacesUtils.
Cu.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "SMALLPNG_DATA_URI", function() { XPCOMUtils.defineLazyGetter(this, "SMALLPNG_DATA_URI", function() {
return NetUtil.newURI( return NetUtil.newURI(

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

@ -8,7 +8,7 @@ const Cc = Components.classes;
const Cr = Components.results; const Cr = Components.results;
const Cu = Components.utils; const Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
// Import common head. // Import common head.
var commonFile = do_get_file("../head_common.js", false); var commonFile = do_get_file("../head_common.js", false);
@ -19,7 +19,7 @@ Services.scriptloader.loadSubScript(uri.spec, this);
XPCOMUtils.defineLazyGetter(this, "PlacesUIUtils", function() { XPCOMUtils.defineLazyGetter(this, "PlacesUIUtils", function() {
Cu.import("resource:///modules/PlacesUIUtils.jsm"); ChromeUtils.import("resource:///modules/PlacesUIUtils.jsm");
return PlacesUIUtils; return PlacesUIUtils;
}); });
@ -29,7 +29,7 @@ const ORGANIZER_QUERY_ANNO = "PlacesOrganizer/OrganizerQuery";
// Needed by some test that relies on having an app registered. // Needed by some test that relies on having an app registered.
Cu.import("resource://testing-common/AppInfo.jsm", this); ChromeUtils.import("resource://testing-common/AppInfo.jsm", this);
updateAppInfo({ updateAppInfo({
name: "PlacesTest", name: "PlacesTest",
ID: "{230de50e-4cd1-11dc-8314-0800200c9a66}", ID: "{230de50e-4cd1-11dc-8314-0800200c9a66}",

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

@ -9,7 +9,7 @@
* database is corrupt and one backup is available. * database is corrupt and one backup is available.
*/ */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "bs", XPCOMUtils.defineLazyServiceGetter(this, "bs",
"@mozilla.org/browser/nav-bookmarks-service;1", "@mozilla.org/browser/nav-bookmarks-service;1",

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

@ -9,7 +9,7 @@
* is corrupt but a JSON backup is not available. * is corrupt but a JSON backup is not available.
*/ */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "bs", XPCOMUtils.defineLazyServiceGetter(this, "bs",
"@mozilla.org/browser/nav-bookmarks-service;1", "@mozilla.org/browser/nav-bookmarks-service;1",

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

@ -9,7 +9,7 @@
* corrupt, nor a JSON backup nor bookmarks.html are available. * corrupt, nor a JSON backup nor bookmarks.html are available.
*/ */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "bs", XPCOMUtils.defineLazyServiceGetter(this, "bs",
"@mozilla.org/browser/nav-bookmarks-service;1", "@mozilla.org/browser/nav-bookmarks-service;1",

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

@ -10,7 +10,7 @@
* bookmark on init, we should not try to import. * bookmark on init, we should not try to import.
*/ */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "bs", XPCOMUtils.defineLazyServiceGetter(this, "bs",
"@mozilla.org/browser/nav-bookmarks-service;1", "@mozilla.org/browser/nav-bookmarks-service;1",

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

@ -9,7 +9,7 @@
* database has been created and one backup is available. * database has been created and one backup is available.
*/ */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "bs", XPCOMUtils.defineLazyServiceGetter(this, "bs",
"@mozilla.org/browser/nav-bookmarks-service;1", "@mozilla.org/browser/nav-bookmarks-service;1",

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

@ -3,8 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
/** /**
* This returns the key for any node/details object. * This returns the key for any node/details object.

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

@ -5,7 +5,7 @@
// As pref-applications.js is always loaded, we can (and should!) reuse // As pref-applications.js is always loaded, we can (and should!) reuse
// the nsI* constants from there, if needed also any services we need. // the nsI* constants from there, if needed also any services we need.
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
var gAppManagerDialog = { var gAppManagerDialog = {
_removed: [], _removed: [],

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

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
function Startup() function Startup()
{ {

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

@ -34,7 +34,7 @@ function Startup()
function prefClearGlobalHistory() function prefClearGlobalHistory()
{ {
Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
PlacesUtils.history.clear(); PlacesUtils.history.clear();
} }

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function Startup() function Startup()
{ {

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function Startup() { function Startup() {
MakeList(); MakeList();

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
const PAGE_NO_ACCOUNT = 0; const PAGE_NO_ACCOUNT = 0;
const PAGE_HAS_ACCOUNT = 1; const PAGE_HAS_ACCOUNT = 1;

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

@ -4,7 +4,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
var gProfileBundle; var gProfileBundle;
var gBrandBundle; var gBrandBundle;

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/AddonManager.jsm"); ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function restartApp() { function restartApp() {
var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"] var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]

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

@ -23,7 +23,7 @@
<script type="application/javascript"> <script type="application/javascript">
<![CDATA[ <![CDATA[
Components.utils.import("resource:///modules/Sanitizer.jsm"); ChromeUtils.import("resource:///modules/Sanitizer.jsm");
function onLoad() function onLoad()
{ {

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

@ -2,12 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", ChromeUtils.defineModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm"); "resource://gre/modules/PlacesUtils.jsm");
const Ci = Components.interfaces; const Ci = Components.interfaces;
const Cc = Components.classes; const Cc = Components.classes;

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

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/FormHistory.jsm"); ChromeUtils.import("resource://gre/modules/FormHistory.jsm");
const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const kXULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const SEARCH_ENGINE_TOPIC = "browser-search-engine-modified"; const SEARCH_ENGINE_TOPIC = "browser-search-engine-modified";

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

@ -534,7 +534,7 @@
this._inputBox.setAttribute("suggestchecked", this._suggestEnabled); this._inputBox.setAttribute("suggestchecked", this._suggestEnabled);
Components.utils.import("resource://gre/modules/FormHistory.jsm", this); ChromeUtils.import("resource://gre/modules/FormHistory.jsm", this);
]]></constructor> ]]></constructor>
<destructor><![CDATA[ <destructor><![CDATA[

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

@ -7,7 +7,7 @@
// Import modules // Import modules
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Global variables // Global variables

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

@ -23,7 +23,7 @@
// Import modules // Import modules
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////
// Global variables // Global variables

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const SCRIPT = Components.interfaces.nsIAboutModule.ALLOW_SCRIPT; const SCRIPT = Components.interfaces.nsIAboutModule.ALLOW_SCRIPT;
const UNTRUSTED = Components.interfaces.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT; const UNTRUSTED = Components.interfaces.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT;

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

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
/* This is a simple module which can be used as a template for any newly /* This is a simple module which can be used as a template for any newly
unsupported protocol. In this case, it redirects gopher:// protocol unsupported protocol. In this case, it redirects gopher:// protocol

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

@ -30,8 +30,8 @@
/* :::::::: Constants and Helpers ::::::::::::::: */ /* :::::::: Constants and Helpers ::::::::::::::: */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const STATE_RUNNING_STR = "running"; const STATE_RUNNING_STR = "running";

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

@ -81,11 +81,11 @@ const TAB_EVENTS = ["TabOpen", "TabClose", "TabSelect", "TabShow", "TabHide"];
#define BROKEN_WM_Z_ORDER #define BROKEN_WM_Z_ORDER
#endif #endif
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/NetUtil.jsm"); ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
// debug.js adds NS_ASSERT. cf. bug 669196 // debug.js adds NS_ASSERT. cf. bug 669196
Components.utils.import("resource://gre/modules/debug.js"); ChromeUtils.import("resource://gre/modules/debug.js");
#ifdef MOZ_CRASH_REPORTER #ifdef MOZ_CRASH_REPORTER
XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter", XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter",
@ -98,7 +98,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager",
"@mozilla.org/gfx/screenmanager;1", "nsIScreenManager"); "@mozilla.org/gfx/screenmanager;1", "nsIScreenManager");
XPCOMUtils.defineLazyServiceGetter(this, "uuidGenerator", XPCOMUtils.defineLazyServiceGetter(this, "uuidGenerator",
"@mozilla.org/uuid-generator;1", "nsIUUIDGenerator"); "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator");
XPCOMUtils.defineLazyModuleGetter(this, "Utils", ChromeUtils.defineModuleGetter(this, "Utils",
"resource://gre/modules/sessionstore/Utils.jsm"); "resource://gre/modules/sessionstore/Utils.jsm");
function debug(aMsg) { function debug(aMsg) {

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

@ -35,8 +35,8 @@ const nsIClassInfo = Components.interfaces.nsIClassInfo;
// File extension for Sherlock search plugin description files // File extension for Sherlock search plugin description files
const SHERLOCK_FILE_EXT_REGEXP = /\.src$/i; const SHERLOCK_FILE_EXT_REGEXP = /\.src$/i;
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
function nsSidebar() function nsSidebar()
{ {

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
//// Constants //// Constants

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

@ -4,40 +4,40 @@
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/osfile.jsm"); ChromeUtils.import("resource://gre/modules/osfile.jsm");
Components.utils.import("resource://gre/modules/AddonManager.jsm"); ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
Components.utils.import("resource://gre/modules/LoginManagerParent.jsm"); ChromeUtils.import("resource://gre/modules/LoginManagerParent.jsm");
Components.utils.import("resource:///modules/Sanitizer.jsm"); ChromeUtils.import("resource:///modules/Sanitizer.jsm");
Components.utils.import("resource:///modules/mailnewsMigrator.js"); ChromeUtils.import("resource:///modules/mailnewsMigrator.js");
Components.utils.import("resource:///modules/extensionSupport.jsm"); ChromeUtils.import("resource:///modules/extensionSupport.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", ChromeUtils.defineModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm"); "resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", ChromeUtils.defineModuleGetter(this, "FileUtils",
"resource://gre/modules/FileUtils.jsm"); "resource://gre/modules/FileUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", ChromeUtils.defineModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm"); "resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups", ChromeUtils.defineModuleGetter(this, "PlacesBackups",
"resource://gre/modules/PlacesBackups.jsm"); "resource://gre/modules/PlacesBackups.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AutoCompletePopup", ChromeUtils.defineModuleGetter(this, "AutoCompletePopup",
"resource://gre/modules/AutoCompletePopup.jsm"); "resource://gre/modules/AutoCompletePopup.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils", ChromeUtils.defineModuleGetter(this, "BookmarkHTMLUtils",
"resource://gre/modules/BookmarkHTMLUtils.jsm"); "resource://gre/modules/BookmarkHTMLUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils", ChromeUtils.defineModuleGetter(this, "BookmarkJSONUtils",
"resource://gre/modules/BookmarkJSONUtils.jsm"); "resource://gre/modules/BookmarkJSONUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => { XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => {
var tmp = {}; var tmp = {};
Components.utils.import("resource://devtools/shared/Loader.jsm", tmp); ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp);
return tmp.require("devtools/server/main").DebuggerServer; return tmp.require("devtools/server/main").DebuggerServer;
}); });
@ -186,7 +186,7 @@ SuiteGlue.prototype = {
} }
delay = delay <= MAX_DELAY ? delay : MAX_DELAY; delay = delay <= MAX_DELAY ? delay : MAX_DELAY;
Components.utils.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
Weave.Service.scheduler.delayedAutoConnect(delay); Weave.Service.scheduler.delayedAutoConnect(delay);
}, },
@ -234,9 +234,9 @@ SuiteGlue.prototype = {
Components.classes["@mozilla.org/globalmessagemanager;1"] Components.classes["@mozilla.org/globalmessagemanager;1"]
.getService(Components.interfaces.nsIMessageListenerManager) .getService(Components.interfaces.nsIMessageListenerManager)
.loadFrameScript("chrome://navigator/content/content.js", true); .loadFrameScript("chrome://navigator/content/content.js", true);
Components.utils.import("resource://gre/modules/NotificationDB.jsm"); ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
Components.utils.import("resource://gre/modules/Downloads.jsm"); ChromeUtils.import("resource://gre/modules/Downloads.jsm");
Components.utils.import("resource://gre/modules/DownloadIntegration.jsm"); ChromeUtils.import("resource://gre/modules/DownloadIntegration.jsm");
DownloadIntegration.shouldPersistDownload = function() { return true; } DownloadIntegration.shouldPersistDownload = function() { return true; }
Downloads.getList(Downloads.ALL).then(list => list.addView(this)) Downloads.getList(Downloads.ALL).then(list => list.addView(this))
.then(() => gDownloadsLoaded = true); .then(() => gDownloadsLoaded = true);
@ -641,7 +641,7 @@ SuiteGlue.prototype = {
Components.classes["@mozilla.org/windows-taskbar;1"] Components.classes["@mozilla.org/windows-taskbar;1"]
.getService(Components.interfaces.nsIWinTaskbar).available) { .getService(Components.interfaces.nsIWinTaskbar).available) {
let temp = {}; let temp = {};
Components.utils.import("resource:///modules/WindowsJumpLists.jsm", temp); ChromeUtils.import("resource:///modules/WindowsJumpLists.jsm", temp);
temp.WinTaskbarJumpList.startup(); temp.WinTaskbarJumpList.startup();
} }

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

@ -4,10 +4,10 @@
const Cu = Components.utils; const Cu = Components.utils;
Cu.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
Cu.import("resource:///modules/PlacesUIUtils.jsm"); ChromeUtils.import("resource:///modules/PlacesUIUtils.jsm");
Cu.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
var RemoteTabViewer = { var RemoteTabViewer = {
_tabsList: null, _tabsList: null,

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

@ -6,8 +6,8 @@ const Ci = Components.interfaces;
const Cc = Components.classes; const Cc = Components.classes;
const Cu = Components.utils; const Cu = Components.utils;
Cu.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const PIN_PART_LENGTH = 4; const PIN_PART_LENGTH = 4;

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

@ -5,8 +5,8 @@
const Ci = Components.interfaces; const Ci = Components.interfaces;
const Cc = Components.classes; const Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
var Change = { var Change = {
_dialog: null, _dialog: null,

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

@ -15,8 +15,8 @@
<implementation> <implementation>
<constructor><![CDATA[ <constructor><![CDATA[
let localScope = {}; let localScope = {};
Components.utils.import("resource://services-common/observers.js", localScope); ChromeUtils.import("resource://services-common/observers.js", localScope);
Components.utils.import("resource://services-sync/notifications.js", localScope); ChromeUtils.import("resource://services-sync/notifications.js", localScope);
localScope.Observers.add("weave:notification:added", this.onNotificationAdded, this); localScope.Observers.add("weave:notification:added", this.onNotificationAdded, this);
localScope.Observers.add("weave:notification:removed", this.onNotificationRemoved, this); localScope.Observers.add("weave:notification:removed", this.onNotificationRemoved, this);
@ -25,7 +25,7 @@
<destructor><![CDATA[ <destructor><![CDATA[
let localScope = {}; let localScope = {};
Components.utils.import("resource://services-common/observers.js", localScope); ChromeUtils.import("resource://services-common/observers.js", localScope);
localScope.Observers.remove("weave:notification:added", this.onNotificationAdded, this); localScope.Observers.remove("weave:notification:added", this.onNotificationAdded, this);
localScope.Observers.remove("weave:notification:removed", this.onNotificationRemoved, this); localScope.Observers.remove("weave:notification:removed", this.onNotificationRemoved, this);
]]></destructor> ]]></destructor>
@ -73,7 +73,7 @@
<method name="close"> <method name="close">
<body><![CDATA[ <body><![CDATA[
let localScope = {}; let localScope = {};
Components.utils.import("resource://services-sync/notifications.js", localScope); ChromeUtils.import("resource://services-sync/notifications.js", localScope);
localScope.Notifications.remove(this.notification); localScope.Notifications.remove(this.notification);
// We should be able to call the base class's close method here // We should be able to call the base class's close method here

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

@ -7,8 +7,8 @@ const Cc = Components.classes;
const Cr = Components.results; const Cr = Components.results;
const Cu = Components.utils; const Cu = Components.utils;
Cu.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/DownloadUtils.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm");
var gSyncQuota = { var gSyncQuota = {

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

@ -24,11 +24,11 @@ const SETUP_SUCCESS_PAGE = 8;
// See discussion in Bugs 508112 and 653307. // See discussion in Bugs 508112 and 653307.
const RECAPTCHA_DOMAIN = "https://www.google.com"; const RECAPTCHA_DOMAIN = "https://www.google.com";
Cu.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
Cu.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
var gSyncSetup = { var gSyncSetup = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports, QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports,

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

@ -216,7 +216,7 @@ var gSyncUtils = {
} }
}; };
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyGetter(gSyncUtils, "_stringBundle", function() { XPCOMUtils.defineLazyGetter(gSyncUtils, "_stringBundle", function() {
return Components.classes["@mozilla.org/intl/stringbundle;1"] return Components.classes["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService) .getService(Components.interfaces.nsIStringBundleService)

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

@ -3,8 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
function toNavigator() function toNavigator()
{ {

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function browserWindowsCount() { function browserWindowsCount() {
let count = 0; let count = 0;

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

@ -1,7 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function browserWindowsCount() { function browserWindowsCount() {
let count = 0; let count = 0;

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function browserWindowsCount() { function browserWindowsCount() {
let count = 0; let count = 0;

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

@ -9,13 +9,13 @@
**/ **/
// Services = object with smart getters for common XPCOM services // Services = object with smart getters for common XPCOM services
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/BrowserUtils.jsm"); ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm");
// XPCOMUtils.defineLazyGetter(this, "Weave", function() { // XPCOMUtils.defineLazyGetter(this, "Weave", function() {
// let tmp = {}; // let tmp = {};
// Components.utils.import("resource://services-sync/main.js", tmp); // ChromeUtils.import("resource://services-sync/main.js", tmp);
// return tmp.Weave; // return tmp.Weave;
// }); // });

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

@ -4,8 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/AddonManager.jsm"); ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager", ChromeUtils.defineModuleGetter(this, "LightweightThemeManager",
"resource://gre/modules/LightweightThemeManager.jsm"); "resource://gre/modules/LightweightThemeManager.jsm");
var gThemes = []; var gThemes = [];

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

@ -3,9 +3,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/debug.js"); ChromeUtils.import("resource://gre/modules/debug.js");
const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed"; const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
const TYPE_MAYBE_VIDEO_FEED = "application/vnd.mozilla.maybe.video.feed"; const TYPE_MAYBE_VIDEO_FEED = "application/vnd.mozilla.maybe.video.feed";

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

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const FEEDWRITER_CID = Components.ID("{49bb6593-3aff-4eb3-a068-2712c28bd58e}"); const FEEDWRITER_CID = Components.ID("{49bb6593-3aff-4eb3-a068-2712c28bd58e}");
const FEEDWRITER_CONTRACTID = "@mozilla.org/browser/feeds/result-writer;1"; const FEEDWRITER_CONTRACTID = "@mozilla.org/browser/feeds/result-writer;1";

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

@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const WCCR_CONTRACTID = "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"; const WCCR_CONTRACTID = "@mozilla.org/embeddor.implemented/web-content-handler-registrar;1";
const WCCR_CLASSID = Components.ID("{792a7e82-06a0-437c-af63-b2d12e808acc}"); const WCCR_CLASSID = Components.ID("{792a7e82-06a0-437c-af63-b2d12e808acc}");

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

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource:///modules/mailServices.js"); ChromeUtils.import("resource:///modules/mailServices.js");
Components.utils.import("resource:///modules/IOUtils.js"); ChromeUtils.import("resource:///modules/IOUtils.js");
var gDirTree = null; var gDirTree = null;
var abList = null; var abList = null;

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

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource:///modules/ABQueryUtils.jsm"); ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
var addressbook = 0; var addressbook = 0;
var composeWindow = 0; var composeWindow = 0;

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

@ -7,7 +7,7 @@
* depends on jsTreeView.js being loaded before this script is loaded. * depends on jsTreeView.js being loaded before this script is loaded.
*/ */
Components.utils.import("resource:///modules/IOUtils.js"); ChromeUtils.import("resource:///modules/IOUtils.js");
/** /**
* Each abDirTreeItem corresponds to one row in the tree view. * Each abDirTreeItem corresponds to one row in the tree view.

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

@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource:///modules/ABQueryUtils.jsm"); ChromeUtils.import("resource:///modules/ABQueryUtils.jsm");
Components.utils.import("resource:///modules/mailServices.js"); ChromeUtils.import("resource:///modules/mailServices.js");
Components.utils.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
const nsIAbListener = Components.interfaces.nsIAbListener; const nsIAbListener = Components.interfaces.nsIAbListener;
const kPrefMailAddrBookLastNameFirst = "mail.addr_book.lastnamefirst"; const kPrefMailAddrBookLastNameFirst = "mail.addr_book.lastnamefirst";

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

@ -8,8 +8,8 @@
* Command-specific code. This stuff should be called by the widgets * Command-specific code. This stuff should be called by the widgets
*/ */
Components.utils.import("resource:///modules/iteratorUtils.jsm"); ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
//NOTE: gMessengerBundle and gBrandBundle must be defined and set //NOTE: gMessengerBundle and gBrandBundle must be defined and set
// for this Overlay to work properly // for this Overlay to work properly

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

@ -3,14 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm");
Components.utils.import("resource://gre/modules/InlineSpellChecker.jsm"); ChromeUtils.import("resource:///modules/folderUtils.jsm");
Components.utils.import("resource:///modules/folderUtils.jsm"); ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
Components.utils.import("resource:///modules/iteratorUtils.jsm"); ChromeUtils.import("resource:///modules/mailServices.js");
Components.utils.import("resource:///modules/mailServices.js");
/** /**
* interfaces * interfaces

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

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource:///modules/mailServices.js"); ChromeUtils.import("resource:///modules/mailServices.js");
top.MAX_RECIPIENTS = 1; /* for the initial listitem created in the XUL */ top.MAX_RECIPIENTS = 1; /* for the initial listitem created in the XUL */

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

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
function GetNewMessages(selectedFolders, server) function GetNewMessages(selectedFolders, server)
{ {

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

@ -3,7 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource:///modules/mailServices.js"); ChromeUtils.import("resource:///modules/mailServices.js");
//NOTE: gMessengerBundle must be defined and set or this Overlay won't work //NOTE: gMessengerBundle must be defined and set or this Overlay won't work

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

@ -4,11 +4,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
Components.utils.import("resource:///modules/FeedUtils.jsm"); ChromeUtils.import("resource:///modules/FeedUtils.jsm");
Components.utils.import("resource:///modules/folderUtils.jsm"); ChromeUtils.import("resource:///modules/folderUtils.jsm");
Components.utils.import("resource:///modules/mailServices.js"); ChromeUtils.import("resource:///modules/mailServices.js");
var kClassicMailLayout = 0; var kClassicMailLayout = 0;
var kWideMailLayout = 1; var kWideMailLayout = 1;

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

@ -45,8 +45,8 @@
<script type="application/javascript" src="chrome://global/content/printUtils.js"/> <script type="application/javascript" src="chrome://global/content/printUtils.js"/>
<script type="application/javascript" src="chrome://messenger/content/folderDisplay.js"/> <script type="application/javascript" src="chrome://messenger/content/folderDisplay.js"/>
<script type="application/javascript"><![CDATA[ <script type="application/javascript"><![CDATA[
Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
Components.utils.import("resource:///modules/PlacesUIUtils.jsm"); ChromeUtils.import("resource:///modules/PlacesUIUtils.jsm");
]]></script> ]]></script>
<stringbundleset id="stringbundleset"> <stringbundleset id="stringbundleset">

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

@ -7,8 +7,8 @@ var EXPORTED_SYMBOLS = ["MailUtils"];
const Cc = Components.classes; const Cc = Components.classes;
const Ci = Components.interfaces; const Ci = Components.interfaces;
Components.utils.import("resource:///modules/iteratorUtils.jsm"); ChromeUtils.import("resource:///modules/iteratorUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm");
/** /**
* This module has several utility functions for use by both core and * This module has several utility functions for use by both core and

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше