# HG changeset patch # User Philipp Kewisch # Date 1517436676 -3600 # Node ID 87ca394913b168cc6141189cb440b9fb0ed200e7 # Parent 1212694d22db1312e75cdf2099cd4f7652a310dd Bug 1434737 - Move to ChromeUtils.import() - SeaMonkey part. r=frg MozReview-Commit-ID: BywABWvaiZf diff --git a/suite/base/content/defaultClientDialog.js b/suite/base/content/defaultClientDialog.js --- a/suite/base/content/defaultClientDialog.js +++ b/suite/base/content/defaultClientDialog.js @@ -1,18 +1,18 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); // this dialog can only be opened if we have a shell service -XPCOMUtils.defineLazyModuleGetter(this, "ShellService", - "resource:///modules/ShellService.jsm"); +ChromeUtils.defineModuleGetter(this, "ShellService", + "resource:///modules/ShellService.jsm"); const nsIPrefBranch = Ci.nsIPrefBranch; function onLoad() { var defaultList = document.getElementById("defaultList"); var appTypes = ShellService.shouldBeDefaultClientFor; /* Iterate through the list of possible default client types and check for diff --git a/suite/base/content/nsContextMenu.js b/suite/base/content/nsContextMenu.js --- a/suite/base/content/nsContextMenu.js +++ b/suite/base/content/nsContextMenu.js @@ -23,27 +23,27 @@ XPCOMUtils.defineLazyGetter(this, "Inlin }); XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() { let tmp = {}; ChromeUtils.import("resource://gre/modules/PageMenu.jsm", tmp); return new tmp.PageMenuParent(); }); -XPCOMUtils.defineLazyModuleGetter(this, "DevToolsShim", - "chrome://devtools-shim/content/DevToolsShim.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "findCssSelector", - "resource://gre/modules/css-selector.js"); -XPCOMUtils.defineLazyModuleGetter(this, "ShellService", - "resource:///modules/ShellService.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper", +ChromeUtils.defineModuleGetter(this, "DevToolsShim", + "chrome://devtools-shim/content/DevToolsShim.jsm"); +ChromeUtils.defineModuleGetter(this, "findCssSelector", + "resource://gre/modules/css-selector.js"); +ChromeUtils.defineModuleGetter(this, "ShellService", + "resource:///modules/ShellService.jsm"); +ChromeUtils.defineModuleGetter(this, "NetUtil", + "resource://gre/modules/NetUtil.jsm"); +ChromeUtils.defineModuleGetter(this, "LoginHelper", "resource://gre/modules/LoginHelper.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContent", +ChromeUtils.defineModuleGetter(this, "LoginManagerContent", "resource://gre/modules/LoginManagerContent.jsm"); var gContextMenuContentData = null; function nsContextMenu(aXulMenu, aIsShift, aEvent) { this.shouldDisplay = true; this.initMenu(aXulMenu, aIsShift, aEvent); } diff --git a/suite/base/content/utilityOverlay.js b/suite/base/content/utilityOverlay.js --- a/suite/base/content/utilityOverlay.js +++ b/suite/base/content/utilityOverlay.js @@ -8,18 +8,18 @@ * for shared application glue for the Communicator suite of applications **/ // Services = object with smart getters for common XPCOM services ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); +ChromeUtils.defineModuleGetter(this, "RecentWindow", + "resource:///modules/RecentWindow.jsm"); // XPCOMUtils.defineLazyGetter(this, "Weave", function() { // let tmp = {}; // ChromeUtils.import("resource://services-sync/main.js", tmp); // return tmp.Weave; // }); /* diff --git a/suite/base/content/viewApplyThemeOverlay.js b/suite/base/content/viewApplyThemeOverlay.js --- a/suite/base/content/viewApplyThemeOverlay.js +++ b/suite/base/content/viewApplyThemeOverlay.js @@ -1,17 +1,17 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- * 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager", +ChromeUtils.defineModuleGetter(this, "LightweightThemeManager", "resource://gre/modules/LightweightThemeManager.jsm"); var gThemes = []; var gApplyThemeBundle; var gBackgroundIsActive; function reloadThemes() { diff --git a/suite/browser/content.js b/suite/browser/content.js --- a/suite/browser/content.js +++ b/suite/browser/content.js @@ -4,29 +4,29 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* This content script should work in any browser or iframe and should not * depend on the frame being contained in tabbrowser. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerContent", +ChromeUtils.defineModuleGetter(this, "LoginManagerContent", "resource://gre/modules/LoginManagerContent.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "InsecurePasswordUtils", +ChromeUtils.defineModuleGetter(this, "InsecurePasswordUtils", "resource://gre/modules/InsecurePasswordUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", +ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "LoginFormFactory", +ChromeUtils.defineModuleGetter(this, "LoginFormFactory", "resource://gre/modules/LoginManagerContent.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "setTimeout", +ChromeUtils.defineModuleGetter(this, "setTimeout", "resource://gre/modules/Timer.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Feeds", +ChromeUtils.defineModuleGetter(this, "Feeds", "resource:///modules/Feeds.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUIUtils", +ChromeUtils.defineModuleGetter(this, "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm"); addMessageListener("RemoteLogins:fillForm", message => { LoginManagerContent.receiveMessage(message, content); }); addEventListener("DOMFormHasPassword", event => { LoginManagerContent.onDOMFormHasPassword(event, content); diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js --- a/suite/browser/navigator.js +++ b/suite/browser/navigator.js @@ -12,20 +12,20 @@ this.__defineGetter__("PluralForm", func ChromeUtils.import("resource://gre/modules/PluralForm.jsm"); return this.PluralForm; }); this.__defineSetter__("PluralForm", function (val) { delete this.PluralForm; return this.PluralForm = val; }); -XPCOMUtils.defineLazyModuleGetter(this, "SitePermissions", +ChromeUtils.defineModuleGetter(this, "SitePermissions", "resource:///modules/SitePermissions.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing", +ChromeUtils.defineModuleGetter(this, "SafeBrowsing", "resource://gre/modules/SafeBrowsing.jsm"); XPCOMUtils.defineLazyScriptGetter(this, "gEditItemOverlay", "chrome://communicator/content/places/editBookmarkOverlay.js"); const REMOTESERVICE_CONTRACTID = "@mozilla.org/toolkit/remote-service;1"; const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const nsIWebNavigation = Ci.nsIWebNavigation; diff --git a/suite/browser/pageinfo/pageInfo.js b/suite/browser/pageinfo/pageInfo.js --- a/suite/browser/pageinfo/pageInfo.js +++ b/suite/browser/pageinfo/pageInfo.js @@ -2,18 +2,18 @@ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/FileUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Downloads", - "resource://gre/modules/Downloads.jsm"); +ChromeUtils.defineModuleGetter(this, "Downloads", + "resource://gre/modules/Downloads.jsm"); //******** define a js object to implement nsITreeView function pageInfoTreeView(treeid, copycol) { /* copycol is the index number for the column that we want to add to * the copy-n-paste buffer when the user hits accel-c. */ this.treeid = treeid; diff --git a/suite/browser/test/browser/browser_bug409624.js b/suite/browser/test/browser/browser_bug409624.js --- a/suite/browser/test/browser/browser_bug409624.js +++ b/suite/browser/test/browser/browser_bug409624.js @@ -1,15 +1,15 @@ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "FormHistory", - "resource://gre/modules/FormHistory.jsm"); +ChromeUtils.defineModuleGetter(this, "FormHistory", + "resource://gre/modules/FormHistory.jsm"); function test() { waitForExplicitFinish(); // This test relies on the form history being empty to start with delete // all the items first. FormHistory.update({ op: "remove" }, { handleError: function (error) { diff --git a/suite/browser/webDeveloperOverlay.js b/suite/browser/webDeveloperOverlay.js --- a/suite/browser/webDeveloperOverlay.js +++ b/suite/browser/webDeveloperOverlay.js @@ -1,15 +1,15 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -XPCOMUtils.defineLazyModuleGetter(this, "BrowserToolboxProcess", - "resource://devtools/client/framework/ToolboxProcess.jsm"); +ChromeUtils.defineModuleGetter(this, "BrowserToolboxProcess", + "resource://devtools/client/framework/ToolboxProcess.jsm"); XPCOMUtils.defineLazyGetter(this, "DeveloperToolbar", function() { var tmp = {}; ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp); var DeveloperToolbar = tmp.require("devtools/client/shared/developer-toolbar").DeveloperToolbar; return new DeveloperToolbar(window); }); @@ -32,18 +32,18 @@ var Scratchpad = { }; XPCOMUtils.defineLazyGetter(Scratchpad, "ScratchpadManager", function() { var tmp = {}; ChromeUtils.import("resource://devtools/client/scratchpad/scratchpad-manager.jsm", tmp); return tmp.ScratchpadManager; }); -XPCOMUtils.defineLazyModuleGetter(this, "gDevTools", - "resource://devtools/client/framework/gDevTools.jsm"); +ChromeUtils.defineModuleGetter(this, "gDevTools", + "resource://devtools/client/framework/gDevTools.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "gDevToolsBrowser", "resource://devtools/client/framework/gDevTools.jsm"); function openEyedropper() { var eyedropper = new this.Eyedropper(this, { context: "menu", copyOnSelect: true }); eyedropper.open(); diff --git a/suite/components/dataman/content/dataman.js b/suite/components/dataman/content/dataman.js --- a/suite/components/dataman/content/dataman.js +++ b/suite/components/dataman/content/dataman.js @@ -6,19 +6,19 @@ ChromeUtils.import("resource://gre/modul ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://services-common/async.js"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); // Load DownloadUtils module for convertByteUnits ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm"); // locally loaded services var gLocSvc = {}; -XPCOMUtils.defineLazyModuleGetter(gLocSvc, "FormHistory", - "resource://gre/modules/FormHistory.jsm", - "FormHistory"); +ChromeUtils.defineModuleGetter(gLocSvc, "FormHistory", + "resource://gre/modules/FormHistory.jsm", + "FormHistory"); XPCOMUtils.defineLazyServiceGetter(gLocSvc, "url", "@mozilla.org/network/url-parser;1?auth=maybe", "nsIURLParser"); XPCOMUtils.defineLazyServiceGetter(gLocSvc, "clipboard", "@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper"); XPCOMUtils.defineLazyServiceGetter(gLocSvc, "idn", "@mozilla.org/network/idn-service;1", diff --git a/suite/components/downloads/DownloadsCommon.jsm b/suite/components/downloads/DownloadsCommon.jsm --- a/suite/components/downloads/DownloadsCommon.jsm +++ b/suite/components/downloads/DownloadsCommon.jsm @@ -24,32 +24,32 @@ var EXPORTED_SYMBOLS = [ * Downloads API data, and provides asynchronous notifications allowing * to build a consistent view of the available data. */ // Globals ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", - "resource://gre/modules/PluralForm.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadHistory", - "resource://gre/modules/DownloadHistory.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Downloads", - "resource://gre/modules/Downloads.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUIHelper", - "resource://gre/modules/DownloadUIHelper.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils", - "resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "OS", - "resource://gre/modules/osfile.jsm"); +ChromeUtils.defineModuleGetter(this, "NetUtil", + "resource://gre/modules/NetUtil.jsm"); +ChromeUtils.defineModuleGetter(this, "PluralForm", + "resource://gre/modules/PluralForm.jsm"); +ChromeUtils.defineModuleGetter(this, "AppConstants", + "resource://gre/modules/AppConstants.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadHistory", + "resource://gre/modules/DownloadHistory.jsm"); +ChromeUtils.defineModuleGetter(this, "Downloads", + "resource://gre/modules/Downloads.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadUIHelper", + "resource://gre/modules/DownloadUIHelper.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadUtils", + "resource://gre/modules/DownloadUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "OS", + "resource://gre/modules/osfile.jsm"); XPCOMUtils.defineLazyGetter(this, "DownloadsLogger", () => { let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm", {}); let consoleOptions = { maxLogLevelPref: "browser.download.loglevel", prefix: "Downloads" }; return new ConsoleAPI(consoleOptions); diff --git a/suite/components/downloads/DownloadsTaskbar.jsm b/suite/components/downloads/DownloadsTaskbar.jsm --- a/suite/components/downloads/DownloadsTaskbar.jsm +++ b/suite/components/downloads/DownloadsTaskbar.jsm @@ -6,18 +6,18 @@ var EXPORTED_SYMBOLS = [ "DownloadsTaskbar", ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Downloads", - "resource://gre/modules/Downloads.jsm"); +ChromeUtils.defineModuleGetter(this, "Downloads", + "resource://gre/modules/Downloads.jsm"); XPCOMUtils.defineLazyGetter(this, "gWinTaskbar", function() { if (!("@mozilla.org/windows-taskbar;1" in Cc)) { return null; } let winTaskbar = Cc["@mozilla.org/windows-taskbar;1"] .getService(Ci.nsIWinTaskbar); return winTaskbar.available && winTaskbar; diff --git a/suite/components/downloads/content/downloadmanager.js b/suite/components/downloads/content/downloadmanager.js --- a/suite/components/downloads/content/downloadmanager.js +++ b/suite/components/downloads/content/downloadmanager.js @@ -2,22 +2,22 @@ * 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/. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/PluralForm.jsm"); ChromeUtils.import("resource://gre/modules/Downloads.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", - "resource://gre/modules/FileUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadsCommon", + "resource:///modules/DownloadsCommon.jsm"); +ChromeUtils.defineModuleGetter(this, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "FileUtils", + "resource://gre/modules/FileUtils.jsm"); var gDownloadTree; var gDownloadTreeView; var gDownloadList; var gDownloadStatus; var gDownloadListener; var gSearchBox; diff --git a/suite/components/downloads/content/progressDialog.js b/suite/components/downloads/content/progressDialog.js --- a/suite/components/downloads/content/progressDialog.js +++ b/suite/components/downloads/content/progressDialog.js @@ -1,18 +1,18 @@ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadsCommon", + "resource:///modules/DownloadsCommon.jsm"); var gDownload; var gDownloadBundle; var gTkDlBundle; var gDlList; var gDlStatus; var gDlListener; diff --git a/suite/components/downloads/content/treeView.js b/suite/components/downloads/content/treeView.js --- a/suite/components/downloads/content/treeView.js +++ b/suite/components/downloads/content/treeView.js @@ -1,21 +1,21 @@ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadsCommon", + "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadHistory", - "resource://gre/modules/DownloadHistory.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadHistory", + "resource://gre/modules/DownloadHistory.jsm"); function DownloadTreeView() { this._dlList = []; this._searchTerms = []; this.dateTimeFormatter = new Services.intl.DateTimeFormat(undefined, {dateStyle: "short", timeStyle: "long"}); diff --git a/suite/components/nsSuiteGlue.js b/suite/components/nsSuiteGlue.js --- a/suite/components/nsSuiteGlue.js +++ b/suite/components/nsSuiteGlue.js @@ -7,57 +7,57 @@ const XULNS = "http://www.mozilla.org/ke ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/osfile.jsm"); ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); ChromeUtils.import("resource://gre/modules/LoginManagerParent.jsm"); ChromeUtils.import("resource:///modules/Sanitizer.jsm"); ChromeUtils.import("resource:///modules/mailnewsMigrator.js"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); +ChromeUtils.defineModuleGetter(this, "NetUtil", + "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "FileUtils", - "resource://gre/modules/FileUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "FileUtils", + "resource://gre/modules/FileUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", - "resource://gre/modules/PlacesUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "PlacesUtils", + "resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups", - "resource://gre/modules/PlacesBackups.jsm"); +ChromeUtils.defineModuleGetter(this, "PlacesBackups", + "resource://gre/modules/PlacesBackups.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown", - "resource://gre/modules/AsyncShutdown.jsm"); +ChromeUtils.defineModuleGetter(this, "AsyncShutdown", + "resource://gre/modules/AsyncShutdown.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AutoCompletePopup", - "resource://gre/modules/AutoCompletePopup.jsm"); +ChromeUtils.defineModuleGetter(this, "AutoCompletePopup", + "resource://gre/modules/AutoCompletePopup.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "BookmarkHTMLUtils", - "resource://gre/modules/BookmarkHTMLUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "BookmarkHTMLUtils", + "resource://gre/modules/BookmarkHTMLUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils", - "resource://gre/modules/BookmarkJSONUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "BookmarkJSONUtils", + "resource://gre/modules/BookmarkJSONUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); +ChromeUtils.defineModuleGetter(this, "RecentWindow", + "resource:///modules/RecentWindow.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "Integration", - "resource://gre/modules/Integration.jsm"); +ChromeUtils.defineModuleGetter(this, "Integration", + "resource://gre/modules/Integration.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PermissionUI", - "resource:///modules/PermissionUI.jsm"); +ChromeUtils.defineModuleGetter(this, "PermissionUI", + "resource:///modules/PermissionUI.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon", - "resource:///modules/DownloadsCommon.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadsCommon", + "resource:///modules/DownloadsCommon.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "ShellService", - "resource:///modules/ShellService.jsm"); +ChromeUtils.defineModuleGetter(this, "ShellService", + "resource:///modules/ShellService.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); +ChromeUtils.defineModuleGetter(this, "AppConstants", + "resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyGetter(this, "DebuggerServer", () => { var tmp = {}; ChromeUtils.import("resource://devtools/shared/Loader.jsm", tmp); return tmp.require("devtools/server/main").DebuggerServer; }); const global = this; diff --git a/suite/components/places/PlacesUIUtils.jsm b/suite/components/places/PlacesUIUtils.jsm --- a/suite/components/places/PlacesUIUtils.jsm +++ b/suite/components/places/PlacesUIUtils.jsm @@ -7,28 +7,28 @@ var EXPORTED_SYMBOLS = ["PlacesUIUtils"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); // PlacesUtils exposes multiple symbols, so we can't use defineLazyModuleGetter. ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", - "resource://gre/modules/PluralForm.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow", - "resource:///modules/RecentWindow.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesTransactions", - "resource://gre/modules/PlacesTransactions.jsm"); -// XPCOMUtils.defineLazyModuleGetter(this, "Weave", -// "resource://services-sync/main.js"); +ChromeUtils.defineModuleGetter(this, "PluralForm", + "resource://gre/modules/PluralForm.jsm"); +ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils", + "resource://gre/modules/PrivateBrowsingUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "NetUtil", + "resource://gre/modules/NetUtil.jsm"); +ChromeUtils.defineModuleGetter(this, "RecentWindow", + "resource:///modules/RecentWindow.jsm"); +ChromeUtils.defineModuleGetter(this, "PlacesTransactions", + "resource://gre/modules/PlacesTransactions.jsm"); +// ChromeUtils.defineModuleGetter(this, "Weave", +// "resource://services-sync/main.js"); const gInContentProcess = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT; const FAVICON_REQUEST_TIMEOUT = 60 * 1000; // Map from windows to arrays of data about pending favicon loads. var gFaviconLoadDataMap = new Map(); // copied from utilityOverlay.js const TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab"; diff --git a/suite/components/places/content/bookmarkProperties.js b/suite/components/places/content/bookmarkProperties.js --- a/suite/components/places/content/bookmarkProperties.js +++ b/suite/components/places/content/bookmarkProperties.js @@ -54,21 +54,20 @@ * - "folderPicker" - hides both the tree and the menu. * * window.arguments[0].performed is set to true if any transaction has * been performed by the dialog. */ /* import-globals-from editBookmarkOverlay.js */ -ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils", - "resource://gre/modules/PromiseUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils", + "resource://gre/modules/PrivateBrowsingUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "PromiseUtils", + "resource://gre/modules/PromiseUtils.jsm"); const BOOKMARK_ITEM = 0; const BOOKMARK_FOLDER = 1; const LIVEMARK_CONTAINER = 2; const ACTION_EDIT = 0; const ACTION_ADD = 1; diff --git a/suite/components/places/content/controller.js b/suite/components/places/content/controller.js --- a/suite/components/places/content/controller.js +++ b/suite/components/places/content/controller.js @@ -1,19 +1,19 @@ /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* 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 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -XPCOMUtils.defineLazyModuleGetter(this, "ForgetAboutSite", - "resource://gre/modules/ForgetAboutSite.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", - "resource://gre/modules/NetUtil.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils", - "resource://gre/modules/PrivateBrowsingUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "ForgetAboutSite", + "resource://gre/modules/ForgetAboutSite.jsm"); +ChromeUtils.defineModuleGetter(this, "NetUtil", + "resource://gre/modules/NetUtil.jsm"); +ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils", + "resource://gre/modules/PrivateBrowsingUtils.jsm"); // XXXmano: we should move most/all of these constants to PlacesUtils const ORGANIZER_ROOT_BOOKMARKS = "place:folder=BOOKMARKS_MENU&excludeItems=1&queryType=1"; // No change to the view, preserve current selection const RELOAD_ACTION_NOTHING = 0; // Inserting items new to the view, select the inserted rows const RELOAD_ACTION_INSERT = 1; diff --git a/suite/components/places/content/places.js b/suite/components/places/content/places.js --- a/suite/components/places/content/places.js +++ b/suite/components/places/content/places.js @@ -5,26 +5,26 @@ /* import-globals-from editBookmarkOverlay.js */ /* import-globals-from ../../../../toolkit/content/contentAreaUtils.js */ ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "MigrationUtils", - "resource:///modules/MigrationUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "BookmarkJSONUtils", - "resource://gre/modules/BookmarkJSONUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "PlacesBackups", - "resource://gre/modules/PlacesBackups.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils", - "resource://gre/modules/DownloadUtils.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "OS", - "resource://gre/modules/osfile.jsm"); +ChromeUtils.defineModuleGetter(this, "MigrationUtils", + "resource:///modules/MigrationUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "BookmarkJSONUtils", + "resource://gre/modules/BookmarkJSONUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "PlacesBackups", + "resource://gre/modules/PlacesBackups.jsm"); +ChromeUtils.defineModuleGetter(this, "DownloadUtils", + "resource://gre/modules/DownloadUtils.jsm"); +ChromeUtils.defineModuleGetter(this, "OS", + "resource://gre/modules/osfile.jsm"); const RESTORE_FILEPICKER_FILTER_EXT = "*.json;*.jsonlz4"; var PlacesOrganizer = { _places: null, // IDs of fields from editBookmarkOverlay that should be hidden when infoBox // is minimal. IDs should be kept in sync with the IDs of the elements diff --git a/suite/components/places/content/placesOverlay.xul b/suite/components/places/content/placesOverlay.xul --- a/suite/components/places/content/placesOverlay.xul +++ b/suite/components/places/content/placesOverlay.xul @@ -13,19 +13,19 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">