Bug 1202902 - Scripted fix the world.

This commit is contained in:
Shu-yu Guo 2015-10-06 14:00:31 -07:00
parent 2848530604
commit b5f316de44
665 changed files with 1243 additions and 1243 deletions

View File

@ -4,8 +4,8 @@
SimpleTest, getBoundsForDOMElm, Point, Utils */
/* exported loadJSON, eventMap */
const Ci = Components.interfaces;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import('resource://gre/modules/accessibility/Utils.jsm');
Cu.import('resource://gre/modules/Geometry.jsm');

View File

@ -1,4 +1,4 @@
const Cu = Components.utils;
var Cu = Components.utils;
const PREF_UTTERANCE_ORDER = "accessibility.accessfu.utterance";
Cu.import('resource://gre/modules/accessibility/Utils.jsm');

View File

@ -5,7 +5,7 @@
var EXPORTED_SYMBOLS = ["Startup"];
const { utils: Cu, interfaces: Ci, classes: Cc } = Components;
var { utils: Cu, interfaces: Ci, classes: Cc } = Components;
const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
const { defer } = Cu.import("resource://gre/modules/Promise.jsm", {}).Promise;

View File

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -8,10 +8,10 @@
window.performance.mark('gecko-settings-loadstart');
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
// The load order is important here SettingsRequestManager _must_ be loaded
// prior to using SettingsListener otherwise there is a race in acquiring the

View File

@ -1502,7 +1502,7 @@ const saveWindowGeometry = () => {
}
window.addEventListener("unload", saveWindowGeometry);
let baseWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
var baseWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.treeOwner

View File

@ -6,7 +6,7 @@
"use strict";
const {utils: Cu} = Components;
var {utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
@ -14,7 +14,7 @@ function debug(aStr) {
// dump(" -*- ShellRemote.js: " + aStr + "\n");
}
let remoteShell = {
var remoteShell = {
get homeURL() {
let systemAppManifestURL = Services.io.newURI(this.systemAppManifestURL, null, null);

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
const { Services } = Cu.import('resource://gre/modules/Services.jsm');
const { SystemAppProxy } = Cu.import('resource://gre/modules/SystemAppProxy.jsm');

View File

@ -15,11 +15,11 @@ function debug(aStr) {
// dump("MultiscreenHandler: " + aStr + "\n");
}
let window = Services.wm.getMostRecentWindow("navigator:browser");
var window = Services.wm.getMostRecentWindow("navigator:browser");
// Multi-screen support on b2g. The following implementation will open a new
// top-level window once we receive a display connected event.
let MultiscreenHandler = {
var MultiscreenHandler = {
topLevelWindows: new Map(),

View File

@ -4,8 +4,8 @@
'use strict';
const Cc = Components.classes;
const Ci = Components.interfaces;
var Cc = Components.classes;
var Ci = Components.interfaces;
// use ppmm to handle file-picker message.
var ppmm = Cc['@mozilla.org/parentprocessmessagemanager;1']

View File

@ -8,9 +8,9 @@ function debug(str) {
dump("CHROME PERMISSON HANDLER -- " + str + "\n");
}
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
const { Services } = Cu.import("resource://gre/modules/Services.jsm");
const { SystemAppProxy } = Cu.import("resource://gre/modules/SystemAppProxy.jsm");

View File

@ -8,7 +8,7 @@
dump('presentation_prompt_handler_chrome: ' + str + '\n');
}
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const { XPCOMUtils } = Cu.import('resource://gre/modules/XPCOMUtils.jsm');
const { SystemAppProxy } = Cu.import('resource://gre/modules/SystemAppProxy.jsm');

View File

@ -4,7 +4,7 @@
'use strict';
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const { XPCOMUtils } = Cu.import('resource://gre/modules/XPCOMUtils.jsm');
const { SystemAppProxy } = Cu.import('resource://gre/modules/SystemAppProxy.jsm');

View File

@ -1,5 +1,5 @@
const Cu = Components.utils;
const Ci = Components.interfaces;
var Cu = Components.utils;
var Ci = Components.interfaces;
Cu.importGlobalProperties(['File']);

View File

@ -1,4 +1,4 @@
const Cu = Components.utils;
var Cu = Components.utils;
const { Services } = Cu.import("resource://gre/modules/Services.jsm");

View File

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");

View File

@ -1,8 +1,8 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const Ci = Components.interfaces;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cu = Components.utils;
// The following boilerplate makes sure that XPCOM calls
// that use the profile directory work.

View File

@ -14,9 +14,9 @@
"use strict";
const Cu = Components.utils;
const Ci = Components.interfaces;
const Cc = Components.classes;
var Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/osfile.jsm");

View File

@ -3,7 +3,7 @@
"use strict";
const {utils: Cu} = Components;
var {utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -3,7 +3,7 @@
"use strict";
const {utils: Cu} = Components;
var {utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -4,7 +4,7 @@
"use strict";
const {results: Cr} = Components;
var {results: Cr} = Components;
// Trivial test just to make sure we have no syntax error
add_test(function test_ksm_ok() {

View File

@ -1,6 +1,6 @@
/* jshint moz: true */
const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
var {utils: Cu, classes: Cc, interfaces: Ci} = Components;
function debug(msg) {
var timestamp = Date.now();

View File

@ -10,7 +10,7 @@
/* jshint -W097 */
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/LogCapture.jsm");
Cu.import("resource://gre/modules/LogShake.jsm");

View File

@ -1,5 +1,5 @@
const Ci = Components.interfaces;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FxAccounts.jsm");

View File

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -2,7 +2,7 @@
* 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/. */
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/LoadContextInfo.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -3,11 +3,11 @@
* 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/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
let {Sanitizer} = Cu.import("resource:///modules/Sanitizer.jsm", {});
var {Sanitizer} = Cu.import("resource:///modules/Sanitizer.jsm", {});
var gSanitizePromptDialog = {

View File

@ -6,7 +6,7 @@
/* This content script should work in any browser or iframe and should not
* depend on the frame being contained in tabbrowser. */
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -2,7 +2,7 @@
* 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/. */
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://services-common/utils.js");
Cu.import("resource://services-sync/main.js");

View File

@ -2,9 +2,9 @@
* 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/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cu = Components.utils;
Cu.import("resource://services-sync/main.js");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -2,8 +2,8 @@
* 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/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
var Ci = Components.interfaces;
var Cc = Components.classes;
Components.utils.import("resource://services-sync/main.js");
Components.utils.import("resource://gre/modules/Services.jsm");

View File

@ -3,10 +3,10 @@
* 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/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
var Cu = Components.utils;
// page consts

View File

@ -1,6 +1,6 @@
"use strict";
let { TabCrashReporter } =
var { TabCrashReporter } =
Cu.import("resource:///modules/ContentCrashReporters.jsm");
const SERVER_URL = "http://example.com/browser/toolkit/crashreporter/test/browser/crashreport.sjs";

View File

@ -1,4 +1,4 @@
const Ci = Components.interfaces;
var Ci = Components.interfaces;
const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
Ci.nsIWebProgressListener.STATE_IS_NETWORK;

View File

@ -1,7 +1,7 @@
// Bug 356571 - loadOneOrMoreURIs gives up if one of the URLs has an unknown protocol
const Cr = Components.results;
const Cm = Components.manager;
var Cr = Components.results;
var Cm = Components.manager;
// Set to true when docShell alerts for unknown protocol error
var didFail = false;

View File

@ -2,7 +2,7 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
const {Ci: interfaces, Cc: classes} = Components;
var {Ci: interfaces, Cc: classes} = Components;
var Clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
var HasFindClipboard = Clipboard.supportsFindClipboard();

View File

@ -3,16 +3,16 @@ var scrollbox = tabstrip._scrollbox;
var originalSmoothScroll = tabstrip.smoothScroll;
var tabs = gBrowser.tabs;
let rect = ele => ele.getBoundingClientRect();
let width = ele => rect(ele).width;
let left = ele => rect(ele).left;
let right = ele => rect(ele).right;
let isLeft = (ele, msg) => is(left(ele) + tabstrip._tabMarginLeft, left(scrollbox), msg);
let isRight = (ele, msg) => is(right(ele) - tabstrip._tabMarginRight, right(scrollbox), msg);
let elementFromPoint = x => tabstrip._elementFromPoint(x);
let nextLeftElement = () => elementFromPoint(left(scrollbox) - 1);
let nextRightElement = () => elementFromPoint(right(scrollbox) + 1);
let firstScrollable = () => tabs[gBrowser._numPinnedTabs];
var rect = ele => ele.getBoundingClientRect();
var width = ele => rect(ele).width;
var left = ele => rect(ele).left;
var right = ele => rect(ele).right;
var isLeft = (ele, msg) => is(left(ele) + tabstrip._tabMarginLeft, left(scrollbox), msg);
var isRight = (ele, msg) => is(right(ele) - tabstrip._tabMarginRight, right(scrollbox), msg);
var elementFromPoint = x => tabstrip._elementFromPoint(x);
var nextLeftElement = () => elementFromPoint(left(scrollbox) - 1);
var nextRightElement = () => elementFromPoint(right(scrollbox) + 1);
var firstScrollable = () => tabs[gBrowser._numPinnedTabs];
function test() {
requestLongerTimeout(2);

View File

@ -2,7 +2,7 @@
* Test the Permissions section in the Control Center.
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PERMISSIONS_PAGE = "http://example.com/browser/browser/base/content/test/general/permissions.html";
var {SitePermissions} = Cu.import("resource:///modules/SitePermissions.jsm", {});

View File

@ -18,7 +18,7 @@
*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
var {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
"resource://gre/modules/FormHistory.jsm");
@ -29,10 +29,10 @@ XPCOMUtils.defineLazyModuleGetter(this, "Timer",
XPCOMUtils.defineLazyModuleGetter(this, "PlacesTestUtils",
"resource://testing-common/PlacesTestUtils.jsm");
let tempScope = {};
var tempScope = {};
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js", tempScope);
let Sanitizer = tempScope.Sanitizer;
var Sanitizer = tempScope.Sanitizer;
const kMsecPerMin = 60 * 1000;
const kUsecPerMin = 60 * 1000000;
@ -675,8 +675,8 @@ add_task(function* test_offline_apps_permissions() {
return wh.promiseClosed;
});
let now_mSec = Date.now();
let now_uSec = now_mSec * 1000;
var now_mSec = Date.now();
var now_uSec = now_mSec * 1000;
///////////////////////////////////////////////////////////////////////////////

View File

@ -7,7 +7,7 @@
* See also Bugs 1175327, 1043801, 1178985
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

View File

@ -4,7 +4,7 @@
* See also Bugs 1175327, 1043801, 1178985.
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

View File

@ -4,7 +4,7 @@
* See also Bug 1175858.
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const PB_PREF = "privacy.trackingprotection.pbmode.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

View File

@ -2,7 +2,7 @@
* Test telemetry for Tracking Protection
*/
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF = "privacy.trackingprotection.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";
const TRACKING_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/trackingPage.html";

View File

@ -5,7 +5,7 @@
// This file is loaded as a "content script" for browser_aboutAccounts tests
"use strict";
const {interfaces: Ci, utils: Cu} = Components;
var {interfaces: Ci, utils: Cu} = Components;
addEventListener("load", function load(event) {
if (event.target != content.document) {

View File

@ -1,7 +1,7 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cm = Components.manager;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cm = Components.manager;
const kBlocklistServiceUUID = "{66354bc9-7ed1-4692-ae1d-8da97d6b205e}";
const kBlocklistServiceContractID = "@mozilla.org/extensions/blocklist;1";

View File

@ -2,8 +2,8 @@ var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content
var gTestBrowser = null;
var gConsoleErrors = 0;
const Cc = Components.classes;
const Ci = Components.interfaces;
var Cc = Components.classes;
var Ci = Components.interfaces;
add_task(function* () {
registerCleanupFunction(function () {

View File

@ -2,7 +2,7 @@
* 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/. */
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/webrtcUI.jsm");

View File

@ -2,8 +2,8 @@
* 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/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
var Cc = Components.classes;
var Ci = Components.interfaces;
var gProfD = do_get_profile();
var gDirSvc = Cc["@mozilla.org/file/directory_service;1"].

View File

@ -4,10 +4,10 @@
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
var Cu = Components.utils;
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
"distribution-customization-complete";

View File

@ -10,9 +10,9 @@
////////////////////////////////////////////////////////////////////////////////
//// Globals
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
Cu.import("resource:///modules/DownloadsCommon.jsm");

View File

@ -17,7 +17,7 @@ var browserActionMap = new WeakMap();
// WeakMap[Extension -> docshell]
// This map is a cache of the windowless browser that's used to render ImageData
// for the browser_action icon.
let imageRendererMap = new WeakMap();
var imageRendererMap = new WeakMap();
function browserActionOf(extension)
{

View File

@ -3,7 +3,7 @@ Cu.import("resource://gre/modules/MatchPattern.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
let {
var {
EventManager,
contextMenuItems,
runSafe
@ -13,13 +13,13 @@ let {
// Map[Extension -> Map[ID -> MenuItem]]
// Note: we want to enumerate all the menu items so
// this cannot be a weak map.
let contextMenuMap = new Map();
var contextMenuMap = new Map();
// Not really used yet, will be used for event pages.
let onClickedCallbacksMap = new WeakMap();
var onClickedCallbacksMap = new WeakMap();
// If id is not specified for an item we use an integer.
let nextID = 0;
var nextID = 0;
function contextMenuObserver(subject, topic, data) {
subject = subject.wrappedJSObject;
@ -34,7 +34,7 @@ function contextMenuObserver(subject, topic, data) {
// For remote processes there is a gContextMenuContentData where all
// the important info is stored from the child process. We get
// this data in |contentData|.
let menuBuilder = {
var menuBuilder = {
build: function(contextData) {
// TODO: icons should be set for items
let xulMenu = contextData.menu;
@ -338,7 +338,7 @@ MenuItem.prototype = {
},
};
let extCount = 0;
var extCount = 0;
extensions.on("startup", (type, extension) => {
contextMenuMap.set(extension, new Map());
if (++extCount == 1) {

View File

@ -1,4 +1,4 @@
let {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm");
var {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm");
function makeWidgetId(id)
{

View File

@ -1,5 +1,5 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cr = Components.results;
var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);

View File

@ -1,4 +1,4 @@
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
function run_test() {

View File

@ -3,7 +3,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
// Initialize this before the imports, as some of them need it.
do_get_profile();

View File

@ -32,7 +32,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "WindowsRegistry",
Cu.importGlobalProperties(["URL"]);
let CtypesKernelHelpers = MSMigrationUtils.CtypesKernelHelpers;
var CtypesKernelHelpers = MSMigrationUtils.CtypesKernelHelpers;
////////////////////////////////////////////////////////////////////////////////
//// Resources

View File

@ -2,9 +2,9 @@
* 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/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
const kIMig = Ci.nsIBrowserProfileMigrator;
const kIPStartup = Ci.nsIProfileStartup;

View File

@ -1,4 +1,4 @@
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
Cu.importGlobalProperties([ "URL" ]);

View File

@ -3,10 +3,10 @@
* 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/. */
const Ci = Components.interfaces;
const Cc = Components.classes;
const Cr = Components.results;
const Cu = Components.utils;
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cr = Components.results;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/LoadContextInfo.jsm");

View File

@ -8,7 +8,7 @@ const TRACK_SUFFIX = "-track-digest256";
const TRACKING_TABLE_PREF = "urlclassifier.trackingTable";
const LISTS_PREF_BRANCH = "browser.safebrowsing.provider.mozilla.lists.";
let gBlocklistManager = {
var gBlocklistManager = {
_type: "",
_blockLists: [],
_brandShortName : null,

View File

@ -4,10 +4,10 @@
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -5,7 +5,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");

View File

@ -2,7 +2,7 @@
* 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/. */
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");

View File

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -1,6 +1,6 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cr = Components.results;
const GCONF_BG_COLOR_KEY = "/desktop/gnome/background/primary_color";

View File

@ -4,10 +4,10 @@
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
Cu.import("resource:///modules/tabview/utils.jsm");
Cu.import("resource://gre/modules/AppConstants.jsm");

View File

@ -3,7 +3,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
"resource://gre/modules/FxAccounts.jsm");

View File

@ -3,7 +3,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var gTestTab;
var gContentAPI;

View File

@ -1,6 +1,6 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const CONTROL_CENTER_PANEL = gIdentityHandler._identityPopup;
const CONTROL_CENTER_MENU_NAME = "controlCenter";

View File

@ -1,6 +1,6 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const PREF_INTRO_COUNT = "privacy.trackingprotection.introCount";
const PREF_TP_ENABLED = "privacy.trackingprotection.enabled";
const BENIGN_PAGE = "http://tracking.example.org/browser/browser/base/content/test/general/benignPage.html";

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -18,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const kDefaultButtonSet = new Set(["minimize", "swap", "close"]);
const kHiddenDefaultButtons = new Set(["minimize", "close"]);
let gCustomButtons = new Map();
var gCustomButtons = new Map();
// A couple of internal helper function.
function isWindowChromeless(win) {

View File

@ -15,7 +15,7 @@ this.EXPORTED_SYMBOLS = ["Sanitizer"];
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
let scope = {};
var scope = {};
Cc["@mozilla.org/moz/jssubscript-loader;1"].getService(Ci.mozIJSSubScriptLoader)
.loadSubScript("chrome://browser/content/sanitize.js", scope);

View File

@ -2,7 +2,7 @@
* 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/. */
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -7,7 +7,7 @@
* This file tests the DirectoryLinksProvider singleton in the DirectoryLinksProvider.jsm module.
*/
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu, Constructor: CC } = Components;
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu, Constructor: CC } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/DirectoryLinksProvider.jsm");
Cu.import("resource://gre/modules/Promise.jsm");

View File

@ -1,6 +1,6 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
var ssm = Services.scriptSecurityManager;

View File

@ -1,9 +1,9 @@
const XULAPPINFO_CONTRACTID = "@mozilla.org/xre/app-info;1";
const XULAPPINFO_CID = Components.ID("{4ba645d3-be6f-40d6-a42a-01b2f40091b8}");
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cr = Components.results;
function registerManifests(manifests)

View File

@ -21,7 +21,7 @@ loader.lazyRequireGetter(this, "WorkersComponent",
"devtools/client/aboutdebugging/components/workers", true);
loader.lazyRequireGetter(this, "Services");
let AboutDebugging = {
var AboutDebugging = {
_categories: null,
get categories() {
// If needed, initialize the list of available categories.

View File

@ -7,7 +7,7 @@
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Task.jsm");
var { loader, require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm");

View File

@ -4,7 +4,7 @@
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const promise = require("promise");

View File

@ -6,7 +6,7 @@
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {findOptimalTimeInterval} = require("devtools/client/animationinspector/utils");

View File

@ -5,7 +5,7 @@
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {TimeScale} = require("devtools/client/animationinspector/components");

View File

@ -2,8 +2,8 @@
* 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/. */
const Cu = Components.utils;
const Ci = Components.interfaces;
var Cu = Components.utils;
var Ci = Components.interfaces;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");

View File

@ -2,7 +2,7 @@
* 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/. */
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm");
const {gDevTools} = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});

View File

@ -2,7 +2,7 @@
* 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/. */
const {utils: Cu, interfaces: Ci} = Components;
var {utils: Cu, interfaces: Ci} = Components;
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {Toolbox} = require("devtools/client/framework/toolbox");

View File

@ -2,10 +2,10 @@
* 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/. */
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const Cr = Components.results;
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm");
const {require} = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});
const {ConnectionManager, Connection} = require("devtools/shared/client/connection-manager");

View File

@ -2,7 +2,7 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const {utils: Cu, classes: Cc, interfaces: Ci} = Components;
var {utils: Cu, classes: Cc, interfaces: Ci} = Components;
const {Promise: promise} =
Cu.import("resource://gre/modules/devtools/shared/deprecated-sync-thenables.js", {});

View File

@ -3,7 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@ -2,7 +2,7 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const DBG_STRINGS_URI = "chrome://browser/locale/devtools/debugger.properties";
const NEW_SOURCE_IGNORED_URLS = ["debugger eval code", "XStringBundle"];

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const { interfaces: Ci, classes: Cc, utils: Cu } = Components;
var { interfaces: Ci, classes: Cc, utils: Cu } = Components;
function notify() {
// Log objects so makeDebuggeeValue can get the global to use

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
const { interfaces: Ci, classes: Cc } = Components;
var { interfaces: Ci, classes: Cc } = Components;
function startup(aParams, aReason) {
Components.utils.import("resource://gre/modules/Services.jsm");

View File

@ -1,6 +1,6 @@
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const { loadSubScript } = Cc['@mozilla.org/moz/jssubscript-loader;1'].
getService(Ci.mozIJSSubScriptLoader);

View File

@ -2,7 +2,7 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});

View File

@ -6,7 +6,7 @@
"use strict";
const { utils: Cu } = Components;
var { utils: Cu } = Components;
const DEFAULT_PREVIEW_TEXT = "Abc";
const PREVIEW_UPDATE_DELAY = 150;

View File

@ -6,7 +6,7 @@
"use strict";
const Cu = Components.utils;
var Cu = Components.utils;
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");

View File

@ -4,7 +4,7 @@
// This shared-head.js file is used for multiple directories in devtools.
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
function scopedCuImport(path) {
const scope = {};

View File

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { classes: Cc, interfaces: Ci, utils: Cu } = Components;
var { gDevTools } = Cu.import("resource:///modules/devtools/client/framework/gDevTools.jsm", {});
var { require } = Cu.import("resource://gre/modules/devtools/shared/Loader.jsm", {});

Some files were not shown because too many files have changed in this diff Show More