Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8.

This commit is contained in:
Florian Quèze
2018-02-23 20:50:01 +01:00
parent c162f564f8
commit f1a55f73f8
609 changed files with 1318 additions and 1346 deletions

View File

@@ -6,7 +6,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["AccessFu"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["AccessFu"]; // jshint ignore:line
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
@@ -23,7 +23,7 @@ const SCREENREADER_SETTING = "accessibility.screenreader";
const QUICKNAV_MODES_PREF = "accessibility.accessfu.quicknav_modes";
const QUICKNAV_INDEX_PREF = "accessibility.accessfu.quicknav_index";
this.AccessFu = { // jshint ignore:line
var AccessFu = { // jshint ignore:line
/**
* Initialize chrome-layer accessibility functionality.
* If accessibility is enabled on the platform, then a special accessibility

View File

@@ -1,7 +1,7 @@
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
this.EXPORTED_SYMBOLS = ["Roles", "Events", "Relations",
"Filters", "States", "Prefilters"];
var EXPORTED_SYMBOLS = ["Roles", "Events", "Relations",
"Filters", "States", "Prefilters"];
function ConstantsMap(aObject, aPrefix, aMap = {}, aModifier = null) {
let offset = aPrefix.length;

View File

@@ -18,16 +18,16 @@ ChromeUtils.defineModuleGetter(this, "TraversalHelper",
ChromeUtils.defineModuleGetter(this, "Presentation",
"resource://gre/modules/accessibility/Presentation.jsm");
this.EXPORTED_SYMBOLS = ["ContentControl"];
var EXPORTED_SYMBOLS = ["ContentControl"];
const MOVEMENT_GRANULARITY_CHARACTER = 1;
const MOVEMENT_GRANULARITY_WORD = 2;
const MOVEMENT_GRANULARITY_PARAGRAPH = 8;
this.ContentControl = function ContentControl(aContentScope) {
function ContentControl(aContentScope) {
this._contentScope = Cu.getWeakReference(aContentScope);
this._childMessageSenders = new WeakMap();
};
}
this.ContentControl.prototype = {
messagesOfInterest: ["AccessFu:MoveCursor",

View File

@@ -22,9 +22,9 @@ ChromeUtils.defineModuleGetter(this, "Events",
ChromeUtils.defineModuleGetter(this, "States",
"resource://gre/modules/accessibility/Constants.jsm");
this.EXPORTED_SYMBOLS = ["EventManager"];
var EXPORTED_SYMBOLS = ["EventManager"];
this.EventManager = function EventManager(aContentScope, aContentControl) {
function EventManager(aContentScope, aContentControl) {
this.contentScope = aContentScope;
this.contentControl = aContentControl;
this.addEventListener = this.contentScope.addEventListener.bind(
@@ -36,7 +36,7 @@ this.EventManager = function EventManager(aContentScope, aContentControl) {
this.webProgress = this.contentScope.docShell.
QueryInterface(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIWebProgress);
};
}
this.EventManager.prototype = {
editState: { editing: false },

View File

@@ -36,7 +36,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["GestureSettings", "GestureTracker"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["GestureSettings", "GestureTracker"]; // jshint ignore:line
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -132,7 +132,7 @@ Point.prototype = {
* An externally accessible collection of settings used in gesture resolition.
* @type {Object}
*/
this.GestureSettings = { // jshint ignore:line
var GestureSettings = { // jshint ignore:line
/**
* Maximum duration of swipe
* @type {Number}
@@ -179,7 +179,7 @@ this.GestureSettings = { // jshint ignore:line
* gestures.
* @type {Object}
*/
this.GestureTracker = { // jshint ignore:line
var GestureTracker = { // jshint ignore:line
/**
* Reset GestureTracker to its initial state.
* @return {[type]} [description]

View File

@@ -27,7 +27,7 @@ ChromeUtils.defineModuleGetter(this, "Roles", // jshint ignore:line
ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
"resource://gre/modules/accessibility/Constants.jsm");
this.EXPORTED_SYMBOLS = ["UtteranceGenerator", "BrailleGenerator"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["UtteranceGenerator", "BrailleGenerator"]; // jshint ignore:line
var OutputGenerator = {
@@ -581,7 +581,7 @@ var OutputGenerator = {
* clicked event. Speaking only 'clicked' makes sense. Speaking 'button' does
* not.
*/
this.UtteranceGenerator = { // jshint ignore:line
var UtteranceGenerator = { // jshint ignore:line
__proto__: OutputGenerator, // jshint ignore:line
gActionMap: {
@@ -840,7 +840,7 @@ this.UtteranceGenerator = { // jshint ignore:line
}
};
this.BrailleGenerator = { // jshint ignore:line
var BrailleGenerator = { // jshint ignore:line
__proto__: OutputGenerator, // jshint ignore:line
genForContext: function genForContext(aContext) {

View File

@@ -6,7 +6,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["PointerRelay", "PointerAdapter"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["PointerRelay", "PointerAdapter"]; // jshint ignore:line
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -137,7 +137,7 @@ var PointerRelay = { // jshint ignore:line
}
};
this.PointerAdapter = { // jshint ignore:line
var PointerAdapter = { // jshint ignore:line
start: function PointerAdapter_start() {
Logger.debug("PointerAdapter.start");
GestureTracker.reset();

View File

@@ -21,7 +21,7 @@ ChromeUtils.defineModuleGetter(this, "Roles", // jshint ignore:line
ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
"resource://gre/modules/accessibility/Constants.jsm");
this.EXPORTED_SYMBOLS = ["Presentation"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["Presentation"]; // jshint ignore:line
/**
* The interface for all presenter classes. A presenter could be, for example,
@@ -672,7 +672,7 @@ BraillePresenter.prototype.textSelectionChanged =
};
};
this.Presentation = { // jshint ignore:line
var Presentation = { // jshint ignore:line
get presenters() {
delete this.presenters;
let presenterMap = {

View File

@@ -6,7 +6,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["TraversalRules", "TraversalHelper"]; // jshint ignore:line
ChromeUtils.import("resource://gre/modules/accessibility/Utils.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -180,7 +180,7 @@ var gSimplePreFilter = Prefilters.DEFUNCT |
Prefilters.ARIA_HIDDEN |
Prefilters.TRANSPARENT;
this.TraversalRules = { // jshint ignore:line
var TraversalRules = { // jshint ignore:line
Simple: new BaseTraversalRule(gSimpleTraversalRoles, gSimpleMatchFunc),
SimpleOnScreen: new BaseTraversalRule(
@@ -361,7 +361,7 @@ this.TraversalRules = { // jshint ignore:line
}
};
this.TraversalHelper = {
var TraversalHelper = {
_helperPivotCache: null,
get helperPivotCache() {

View File

@@ -22,9 +22,9 @@ ChromeUtils.defineModuleGetter(this, "States", // jshint ignore:line
ChromeUtils.defineModuleGetter(this, "PluralForm", // jshint ignore:line
"resource://gre/modules/PluralForm.jsm");
this.EXPORTED_SYMBOLS = ["Utils", "Logger", "PivotContext", "PrefCache"]; // jshint ignore:line
var EXPORTED_SYMBOLS = ["Utils", "Logger", "PivotContext", "PrefCache"]; // jshint ignore:line
this.Utils = { // jshint ignore:line
var Utils = { // jshint ignore:line
_buildAppMap: {
"{3c2e2abc-06d4-11e1-ac3b-374f68613e61}": "b2g",
"{d1bfe7d9-c01e-4237-998b-7b5f960a4314}": "graphene",
@@ -543,7 +543,7 @@ State.prototype = {
}
};
this.Logger = { // jshint ignore:line
var Logger = { // jshint ignore:line
GESTURE: -1,
DEBUG: 0,
INFO: 1,
@@ -701,7 +701,7 @@ this.Logger = { // jshint ignore:line
* label. In this case the |accessible| field would be the embedded control,
* and the |accessibleForBounds| field would be the label.
*/
this.PivotContext = function PivotContext(aAccessible, aOldAccessible, // jshint ignore:line
function PivotContext(aAccessible, aOldAccessible, // jshint ignore:line
aStartOffset, aEndOffset, aIgnoreAncestry = false,
aIncludeInvisible = false) {
this._accessible = aAccessible;
@@ -712,7 +712,7 @@ this.PivotContext = function PivotContext(aAccessible, aOldAccessible, // jshint
this.endOffset = aEndOffset;
this._ignoreAncestry = aIgnoreAncestry;
this._includeInvisible = aIncludeInvisible;
};
}
PivotContext.prototype = {
get accessible() {
@@ -1013,7 +1013,7 @@ PivotContext.prototype = {
}
};
this.PrefCache = function PrefCache(aName, aCallback, aRunCallbackNow) { // jshint ignore:line
function PrefCache(aName, aCallback, aRunCallbackNow) { // jshint ignore:line
this.name = aName;
this.callback = aCallback;
@@ -1029,7 +1029,7 @@ this.PrefCache = function PrefCache(aName, aCallback, aRunCallbackNow) { // jshi
}
branch.addObserver(aName, this, true);
};
}
PrefCache.prototype = {
_getValue: function _getValue(aBranch) {

View File

@@ -2,13 +2,13 @@
* 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/. */
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"Panel",
];
ChromeUtils.import("resource://gre/modules/Timer.jsm");
this.Panel = function(panelElt, iframeURL) {
var Panel = function(panelElt, iframeURL) {
this.p = panelElt;
this.iframeURL = iframeURL;
this._initPanel();

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["CustomizableUI"];
var EXPORTED_SYMBOLS = ["CustomizableUI"];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -2943,7 +2943,7 @@ var CustomizableUIInternal = {
};
Object.freeze(CustomizableUIInternal);
this.CustomizableUI = {
var CustomizableUI = {
/**
* Constant reference to the ID of the navigation toolbar.
*/

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["CustomizableWidgets"];
var EXPORTED_SYMBOLS = ["CustomizableWidgets"];
ChromeUtils.import("resource:///modules/CustomizableUI.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["CustomizeMode"];
var EXPORTED_SYMBOLS = ["CustomizeMode"];
const kPrefCustomizationDebug = "browser.uiCustomization.debug";
const kPaletteId = "customization-palette";

View File

@@ -11,7 +11,7 @@ var gManagers = new WeakMap();
const kPaletteId = "customization-palette";
this.EXPORTED_SYMBOLS = ["DragPositionManager"];
var EXPORTED_SYMBOLS = ["DragPositionManager"];
function AreaPositionManager(aContainer) {
// Caching the direction and bounds of the container for quick access later:

View File

@@ -87,7 +87,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"PanelMultiView",
"PanelView",
];
@@ -123,7 +123,7 @@ let gMultiLineElementsMap = new WeakMap();
* Classes deriving from this one may be easily converted to Custom Elements,
* although they would lose the ability of being associated lazily.
*/
this.AssociatedToNode = class {
var AssociatedToNode = class {
constructor(node) {
/**
* Node associated to this object.
@@ -249,7 +249,7 @@ this.AssociatedToNode = class {
/**
* This is associated to <panelmultiview> elements by the panelUI.xml binding.
*/
this.PanelMultiView = class extends this.AssociatedToNode {
var PanelMultiView = class extends this.AssociatedToNode {
/**
* Tries to open the specified <panel> and displays the main view specified
* with the "mainViewId" attribute on the <panelmultiview> node it contains.
@@ -1116,7 +1116,7 @@ this.PanelMultiView = class extends this.AssociatedToNode {
/**
* This is associated to <panelview> elements.
*/
this.PanelView = class extends this.AssociatedToNode {
var PanelView = class extends this.AssociatedToNode {
/**
* The "mainview" attribute is set before the panel is opened when this view
* is displayed as the main view, and is removed before the <panelview> is

View File

@@ -4,14 +4,14 @@
"use strict";
this.EXPORTED_SYMBOLS = ["ScrollbarSampler"];
var EXPORTED_SYMBOLS = ["ScrollbarSampler"];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
var gSystemScrollbarWidth = null;
this.ScrollbarSampler = {
var ScrollbarSampler = {
getSystemScrollbarWidth() {
if (gSystemScrollbarWidth !== null) {
return Promise.resolve(gSystemScrollbarWidth);

View File

@@ -8,7 +8,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SearchWidgetTracker"];
var EXPORTED_SYMBOLS = ["SearchWidgetTracker"];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.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/. */
this.EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
var EXPORTED_SYMBOLS = [ "DistributionCustomizer" ];
const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC =
"distribution-customization-complete";
@@ -18,8 +18,8 @@ ChromeUtils.defineModuleGetter(this, "Preferences",
ChromeUtils.defineModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
this.DistributionCustomizer = function DistributionCustomizer() {
};
function DistributionCustomizer() {
}
DistributionCustomizer.prototype = {
get _iniFile() {

View File

@@ -6,7 +6,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"DownloadsCommon",
];
@@ -120,7 +120,7 @@ PrefObserver.register({
* This object is exposed directly to the consumers of this JavaScript module,
* and provides shared methods for all the instances of the user interface.
*/
this.DownloadsCommon = {
var DownloadsCommon = {
// The following legacy constants are still returned by stateOfDownload, but
// individual properties of the Download object should normally be used.
DOWNLOAD_NOTSTARTED: -1,

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"DownloadsSubview",
];

View File

@@ -10,7 +10,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"DownloadsTaskbar",
];
@@ -45,7 +45,7 @@ XPCOMUtils.defineLazyGetter(this, "gMacTaskbarProgress", function() {
/**
* Handles the download progress indicator in the taskbar.
*/
this.DownloadsTaskbar = {
var DownloadsTaskbar = {
/**
* Underlying DownloadSummary providing the aggregate download information, or
* null if the indicator has never been initialized.

View File

@@ -9,7 +9,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"DownloadsViewUI",
];
@@ -30,7 +30,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUtils",
ChromeUtils.defineModuleGetter(this, "RecentWindow",
"resource:///modules/RecentWindow.jsm");
this.DownloadsViewUI = {
var DownloadsViewUI = {
/**
* Returns true if the given string is the name of a command that can be
* handled by the Downloads user interface, including standard commands.

View File

@@ -26,9 +26,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
});
});
this.EXPORTED_SYMBOLS = ["Policies"];
var EXPORTED_SYMBOLS = ["Policies"];
this.Policies = {
var Policies = {
"BlockAboutAddons": {
onBeforeUIStartup(manager, param) {
if (param) {

View File

@@ -20,9 +20,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
});
});
this.EXPORTED_SYMBOLS = ["PoliciesValidator"];
var EXPORTED_SYMBOLS = ["PoliciesValidator"];
this.PoliciesValidator = {
var PoliciesValidator = {
validateAndParseParameters(param, properties) {
return validateAndParseParamRecursive(param, properties);
}

View File

@@ -19,9 +19,9 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
});
});
this.EXPORTED_SYMBOLS = ["WindowsGPOParser"];
var EXPORTED_SYMBOLS = ["WindowsGPOParser"];
this.WindowsGPOParser = {
var WindowsGPOParser = {
readPolicies(wrk, policies) {
let childWrk = wrk.openChild("Mozilla\\Firefox", wrk.ACCESS_READ);
if (!policies) {

View File

@@ -15,7 +15,7 @@ module.exports = {
"no-sequences": "error",
"no-shadow": "error",
"no-throw-literal": "error",
"no-unused-vars": ["error", { "varsIgnorePattern": "^C[ciur]$" }],
"no-unused-vars": ["error", { "varsIgnorePattern": "^EXPORTED_SYMBOLS$" }],
"padded-blocks": ["error", "never"],
"semi-spacing": ["error", {"before": false, "after": true}],
"space-in-parens": ["error", "never"],

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["AutoMigrate"];
var EXPORTED_SYMBOLS = ["AutoMigrate"];
const kAutoMigrateEnabledPref = "browser.migrate.automigrate.enabled";
const kUndoUIEnabledPref = "browser.migrate.automigrate.ui.enabled";

View File

@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
this.EXPORTED_SYMBOLS = ["ChromeMigrationUtils"];
var EXPORTED_SYMBOLS = ["ChromeMigrationUtils"];
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
@@ -11,7 +11,7 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
this.ChromeMigrationUtils = {
var ChromeMigrationUtils = {
_chromeUserDataPath: null,
_extensionVersionDirectoryNames: {},

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["ESEDBReader"]; /* exported ESEDBReader */
var EXPORTED_SYMBOLS = ["ESEDBReader"]; /* exported ESEDBReader */
ChromeUtils.import("resource://gre/modules/ctypes.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["MSMigrationUtils"];
var EXPORTED_SYMBOLS = ["MSMigrationUtils"];
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["MigrationUtils", "MigratorPrototype"];
var EXPORTED_SYMBOLS = ["MigrationUtils", "MigratorPrototype"];
const TOPIC_WILL_IMPORT_BOOKMARKS = "initial-migration-will-import-default-bookmarks";
const TOPIC_DID_IMPORT_BOOKMARKS = "initial-migration-did-import-default-bookmarks";
@@ -84,7 +84,7 @@ function getMigrationBundle() {
* 5. Implement getResources(aProfile) (see below).
* 6. For startup-only migrators, override |startupOnlyMigrator|.
*/
this.MigratorPrototype = {
var MigratorPrototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserProfileMigrator]),
/**
@@ -438,7 +438,7 @@ this.MigratorPrototype = {
},
};
this.MigrationUtils = Object.freeze({
var MigrationUtils = Object.freeze({
resourceTypes: {
SETTINGS: Ci.nsIBrowserProfileMigrator.SETTINGS,
COOKIES: Ci.nsIBrowserProfileMigrator.COOKIES,

View File

@@ -1,6 +1,6 @@
"use strict";
this.EXPORTED_SYMBOLS = ["NewTabPrefsProvider"];
var EXPORTED_SYMBOLS = ["NewTabPrefsProvider"];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");

View File

@@ -2,7 +2,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["NewTabRemoteResources"];
var EXPORTED_SYMBOLS = ["NewTabRemoteResources"];
const NewTabRemoteResources = {
MODE_CHANNEL_MAP: {

View File

@@ -1,6 +1,6 @@
"use strict";
this.EXPORTED_SYMBOLS = ["NewTabSearchProvider"];
var EXPORTED_SYMBOLS = ["NewTabSearchProvider"];
const CURRENT_ENGINE = "browser-search-engine-modified";

View File

@@ -1,6 +1,6 @@
"use strict";
this.EXPORTED_SYMBOLS = ["NewTabWebChannel"];
var EXPORTED_SYMBOLS = ["NewTabWebChannel"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");

View File

@@ -3,7 +3,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/. */
this.EXPORTED_SYMBOLS = ["PlacesUIUtils"];
var EXPORTED_SYMBOLS = ["PlacesUIUtils"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
@@ -204,7 +204,7 @@ let InternalFaviconLoader = {
},
};
this.PlacesUIUtils = {
var PlacesUIUtils = {
ORGANIZER_LEFTPANE_VERSION: 8,
ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder",
ORGANIZER_QUERY_ANNO: "PlacesOrganizer/OrganizerQuery",

View File

@@ -9,7 +9,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "serviceWorkerManager",
"@mozilla.org/serviceworkers/manager;1",
"nsIServiceWorkerManager");
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"SiteDataManager"
];
@@ -21,7 +21,7 @@ XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() {
return Services.strings.createBundle("chrome://branding/locale/brand.properties");
});
this.SiteDataManager = {
var SiteDataManager = {
_qms: Services.qms,

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["ContentRestore"];
var EXPORTED_SYMBOLS = ["ContentRestore"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
ChromeUtils.import("resource://gre/modules/Services.jsm", this);

View File

@@ -4,12 +4,12 @@
"use strict";
this.EXPORTED_SYMBOLS = ["DocShellCapabilities"];
var EXPORTED_SYMBOLS = ["DocShellCapabilities"];
/**
* The external API exported by this module.
*/
this.DocShellCapabilities = Object.freeze({
var DocShellCapabilities = Object.freeze({
collect(docShell) {
return DocShellCapabilitiesInternal.collect(docShell);
},

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["GlobalState"];
var EXPORTED_SYMBOLS = ["GlobalState"];
const EXPORTED_METHODS = ["getState", "clear", "get", "set", "delete", "setFromState"];
/**

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["PrivacyFilter"];
var EXPORTED_SYMBOLS = ["PrivacyFilter"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
@@ -15,7 +15,7 @@ ChromeUtils.defineModuleGetter(this, "PrivacyLevel",
* A module that provides methods to filter various kinds of data collected
* from a tab by the current privacy level as set by the user.
*/
this.PrivacyFilter = Object.freeze({
var PrivacyFilter = Object.freeze({
/**
* Filters the given (serialized) session storage |data| according to the
* current privacy level and returns a new object containing only data that

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/. */
this.EXPORTED_SYMBOLS = ["RecentlyClosedTabsAndWindowsMenuUtils"];
var EXPORTED_SYMBOLS = ["RecentlyClosedTabsAndWindowsMenuUtils"];
const kNSXUL = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(this, "SessionStore",
var navigatorBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
this.RecentlyClosedTabsAndWindowsMenuUtils = {
var RecentlyClosedTabsAndWindowsMenuUtils = {
/**
* Builds up a document fragment of UI items for the recently closed tabs.

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["RunState"];
var EXPORTED_SYMBOLS = ["RunState"];
const STATE_STOPPED = 0;
const STATE_RUNNING = 1;
@@ -21,7 +21,7 @@ var state = STATE_STOPPED;
* the initial browser window has loaded we switch to STATE_RUNNING. On the
* first notice that a browser shutdown was granted we switch to STATE_QUITTING.
*/
this.RunState = Object.freeze({
var RunState = Object.freeze({
// If we're stopped then SessionStore hasn't been initialized yet. As soon
// as the session is read from disk and the initial browser window has loaded
// the run state will change to STATE_RUNNING.

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SessionCookies"];
var EXPORTED_SYMBOLS = ["SessionCookies"];
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
@@ -19,7 +19,7 @@ const MAX_EXPIRY = Number.MAX_SAFE_INTEGER;
/**
* The external API implemented by the SessionCookies module.
*/
this.SessionCookies = Object.freeze({
var SessionCookies = Object.freeze({
collect() {
return SessionCookiesInternal.collect();
},

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SessionFile"];
var EXPORTED_SYMBOLS = ["SessionFile"];
/**
* Implementation of all the disk I/O required by the session store.
@@ -54,7 +54,7 @@ const PREF_MAX_SERIALIZE_FWD = "browser.sessionstore.max_serialize_forward";
XPCOMUtils.defineLazyPreferenceGetter(this, "kMaxWriteFailures",
"browser.sessionstore.max_write_failures", 5);
this.SessionFile = {
var SessionFile = {
/**
* Read the contents of the session file, asynchronously.
*/

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SessionMigration"];
var EXPORTED_SYMBOLS = ["SessionMigration"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
ChromeUtils.import("resource://gre/modules/osfile.jsm", this);

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SessionSaver"];
var EXPORTED_SYMBOLS = ["SessionSaver"];
ChromeUtils.import("resource://gre/modules/Timer.jsm", this);
ChromeUtils.import("resource://gre/modules/Services.jsm", this);
@@ -64,7 +64,7 @@ var stopWatchFinish = stopWatch("finish");
/**
* The external API implemented by the SessionSaver module.
*/
this.SessionSaver = Object.freeze({
var SessionSaver = Object.freeze({
/**
* Immediately saves the current session to disk.
*/

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SessionStorage"];
var EXPORTED_SYMBOLS = ["SessionStorage"];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -25,7 +25,7 @@ function getPrincipalForFrame(docShell, frame) {
return ssm.getDocShellCodebasePrincipal(uri, docShell);
}
this.SessionStorage = Object.freeze({
var SessionStorage = Object.freeze({
/**
* Updates all sessionStorage "super cookies"
* @param content

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["SessionStore"];
var EXPORTED_SYMBOLS = ["SessionStore"];
// Current version of the format used by Session Restore.
const FORMAT_VERSION = 1;
@@ -205,7 +205,7 @@ function debug(aMsg) {
*/
var gResistFingerprintingEnabled = false;
this.SessionStore = {
var SessionStore = {
get promiseInitialized() {
return SessionStoreInternal.promiseInitialized;
},

View File

@@ -11,9 +11,9 @@
ChromeUtils.import("resource://gre/modules/PromiseWorker.jsm", this);
ChromeUtils.import("resource://gre/modules/osfile.jsm", this);
this.EXPORTED_SYMBOLS = ["SessionWorker"];
var EXPORTED_SYMBOLS = ["SessionWorker"];
this.SessionWorker = new BasePromiseWorker("resource:///modules/sessionstore/SessionWorker.js");
var SessionWorker = new BasePromiseWorker("resource:///modules/sessionstore/SessionWorker.js");
// As the Session Worker performs I/O, we can receive instances of
// OS.File.Error, so we need to install a decoder.
this.SessionWorker.ExceptionHandlers["OS.File.Error"] = OS.File.Error.fromMsg;

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["StartupPerformance"];
var EXPORTED_SYMBOLS = ["StartupPerformance"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
@@ -21,7 +21,7 @@ const COLLECT_RESULTS_AFTER_MS = 10000;
const OBSERVED_TOPICS = ["sessionstore-restoring-on-startup", "sessionstore-initiating-manual-restore"];
this.StartupPerformance = {
var StartupPerformance = {
/**
* Once we have finished restoring initial tabs, we broadcast on this topic.
*/

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["TabAttributes"];
var EXPORTED_SYMBOLS = ["TabAttributes"];
// We never want to directly read or write these attributes.
// 'image' should not be accessed directly but handled by using the
@@ -23,7 +23,7 @@ const ATTRIBUTES_TO_SKIP = new Set(["image", "muted", "pending", "iconloadingpri
// A set of tab attributes to persist. We will read a given list of tab
// attributes when collecting tab data and will re-set those attributes when
// the given tab data is restored to a new tab.
this.TabAttributes = Object.freeze({
var TabAttributes = Object.freeze({
persist(name) {
return TabAttributesInternal.persist(name);
},

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["TabState"];
var EXPORTED_SYMBOLS = ["TabState"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
@@ -20,7 +20,7 @@ ChromeUtils.defineModuleGetter(this, "Utils",
/**
* Module that contains tab state collection methods.
*/
this.TabState = Object.freeze({
var TabState = Object.freeze({
update(browser, data) {
TabStateInternal.update(browser, data);
},

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["TabStateCache"];
var EXPORTED_SYMBOLS = ["TabStateCache"];
/**
* A cache for tabs data.
@@ -16,7 +16,7 @@ this.EXPORTED_SYMBOLS = ["TabStateCache"];
* - that data is used very seldom by SessionStore;
* - caching private data in addition to public data is memory consuming.
*/
this.TabStateCache = Object.freeze({
var TabStateCache = Object.freeze({
/**
* Retrieves cached data for a given |tab| or associated |browser|.
*

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["TabStateFlusher"];
var EXPORTED_SYMBOLS = ["TabStateFlusher"];
/**
* A module that enables async flushes. Updates from frame scripts are
@@ -13,7 +13,7 @@ this.EXPORTED_SYMBOLS = ["TabStateFlusher"];
* wait until the frame scripts reported back. At this point the parent has the
* latest data and the action can continue.
*/
this.TabStateFlusher = Object.freeze({
var TabStateFlusher = Object.freeze({
/**
* Requests an async flush for the given browser. Returns a promise that will
* resolve when we heard back from the content process and the parent has

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["ShellService"];
var EXPORTED_SYMBOLS = ["ShellService"];
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
@@ -98,7 +98,7 @@ XPCOMUtils.defineLazyServiceGetter(ShellServiceInternal, "shellService",
/**
* The external API exported by this module.
*/
this.ShellService = new Proxy(ShellServiceInternal, {
var ShellService = new Proxy(ShellServiceInternal, {
get(target, name) {
if (name in target) {
return target[name];

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"EventEmitter"
];

View File

@@ -21,7 +21,7 @@ XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
.Log.repository.getLogger("Sync.RemoteTabs");
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"SyncedTabsDeckComponent"
];

View File

@@ -6,7 +6,7 @@
let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"SyncedTabsDeckStore"
];

View File

@@ -7,7 +7,7 @@
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
.Log.repository.getLogger("Sync.RemoteTabs");
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"SyncedTabsDeckView"
];

View File

@@ -6,7 +6,7 @@
let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {});
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"SyncedTabsListStore"
];

View File

@@ -16,7 +16,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUIUtils",
ChromeUtils.defineModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"TabListComponent"
];

View File

@@ -11,7 +11,7 @@ let { getChromeWindow } = ChromeUtils.import("resource:///modules/syncedtabs/uti
let log = ChromeUtils.import("resource://gre/modules/Log.jsm", {})
.Log.repository.getLogger("Sync.RemoteTabs");
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"TabListView"
];

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"getChromeWindow"
];

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [ "BingTranslator" ];
var EXPORTED_SYMBOLS = [ "BingTranslator" ];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/Log.jsm");
@@ -39,7 +39,7 @@ const MAX_REQUESTS = 15;
* @returns {Promise} A promise that will resolve when the translation
* task is finished.
*/
this.BingTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
var BingTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
this.translationDocument = translationDocument;
this.sourceLanguage = sourceLanguage;
this.targetLanguage = targetLanguage;

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["LanguageDetector"];
var EXPORTED_SYMBOLS = ["LanguageDetector"];
ChromeUtils.import("resource://gre/modules/Timer.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -95,7 +95,7 @@ var workerManager = {
},
};
this.LanguageDetector = {
var LanguageDetector = {
/**
* Detect the language of a given string.
*

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"Translation",
"TranslationTelemetry",
];
@@ -14,7 +14,7 @@ const TRANSLATION_PREF_DETECT_LANG = "browser.translation.detectLanguage";
ChromeUtils.import("resource://gre/modules/Services.jsm");
this.Translation = {
var Translation = {
STATE_OFFER: 0,
STATE_TRANSLATING: 1,
STATE_TRANSLATED: 2,
@@ -290,7 +290,7 @@ TranslationUI.prototype = {
*
* NOTE: Metrics are only recorded if the user enabled the telemetry option.
*/
this.TranslationTelemetry = {
var TranslationTelemetry = {
init() {
// Constructing histograms.

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [ "TranslationContentHandler" ];
var EXPORTED_SYMBOLS = [ "TranslationContentHandler" ];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -15,7 +15,7 @@ const STATE_OFFER = 0;
const STATE_TRANSLATED = 2;
const STATE_ERROR = 3;
this.TranslationContentHandler = function(global, docShell) {
var TranslationContentHandler = function(global, docShell) {
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebProgress);
webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT);

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [ "TranslationDocument" ];
var EXPORTED_SYMBOLS = [ "TranslationDocument" ];
const TEXT_NODE = Ci.nsIDOMNode.TEXT_NODE;
@@ -19,7 +19,7 @@ ChromeUtils.import("resource://services-common/async.js");
*
* @param document The document to be translated
*/
this.TranslationDocument = function(document) {
var TranslationDocument = function(document) {
this.itemsMap = new Map();
this.roots = [];
this._init(document);

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [ "YandexTranslator" ];
var EXPORTED_SYMBOLS = [ "YandexTranslator" ];
ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.import("resource://gre/modules/Log.jsm");
@@ -57,7 +57,7 @@ const YANDEX_PERMANENT_ERRORS = [
* @returns {Promise} A promise that will resolve when the translation
* task is finished.
*/
this.YandexTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
var YandexTranslator = function(translationDocument, sourceLanguage, targetLanguage) {
this.translationDocument = translationDocument;
this.sourceLanguage = sourceLanguage;
this.targetLanguage = targetLanguage;

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = ["UITour"];
var EXPORTED_SYMBOLS = ["UITour"];
ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
ChromeUtils.import("resource://gre/modules/Services.jsm");
@@ -79,7 +79,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => {
return new ConsoleAPI(consoleOptions);
});
this.UITour = {
var UITour = {
url: null,
seenPageIDs: null,
// This map is not persisted and is used for

View File

@@ -4,7 +4,7 @@
"use strict";
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"Experiments",
];

View File

@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
this.MAIN_MESSAGE_TYPE = "ActivityStream:Main";
this.CONTENT_MESSAGE_TYPE = "ActivityStream:Content";
this.PRELOAD_MESSAGE_TYPE = "ActivityStream:PreloadedBrowser";
this.UI_CODE = 1;
this.BACKGROUND_PROCESS = 2;
var MAIN_MESSAGE_TYPE = "ActivityStream:Main";
var CONTENT_MESSAGE_TYPE = "ActivityStream:Content";
var PRELOAD_MESSAGE_TYPE = "ActivityStream:PreloadedBrowser";
var UI_CODE = 1;
var BACKGROUND_PROCESS = 2;
/**
* globalImportContext - Are we in UI code (i.e. react, a dom) or some kind of background process?
@@ -274,7 +274,7 @@ function WebExtEvent(type, data, importContext = globalImportContext) {
this.actionTypes = actionTypes;
this.actionCreators = {
var actionCreators = {
BroadcastToContent,
UserEvent,
UndesiredEvent,
@@ -290,7 +290,7 @@ this.actionCreators = {
};
// These are helpers to test for certain kinds of actions
this.actionUtils = {
var actionUtils = {
isSendToMain(action) {
if (!action.meta) {
return false;
@@ -335,7 +335,7 @@ this.actionUtils = {
_RouteMessage
};
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"actionTypes",
"actionCreators",
"actionUtils",

View File

@@ -1,4 +1,4 @@
this.Dedupe = class Dedupe {
var Dedupe = class Dedupe {
constructor(createKey) {
this.createKey = createKey || this.defaultCreateKey;
}
@@ -31,4 +31,4 @@ this.Dedupe = class Dedupe {
}
};
this.EXPORTED_SYMBOLS = ["Dedupe"];
var EXPORTED_SYMBOLS = ["Dedupe"];

View File

@@ -26,7 +26,7 @@ if (typeof Services !== "undefined") {
};
}
this._PerfService = function _PerfService(options) {
function _PerfService(options) {
// For testing, so that we can use a fake Window.performance object with
// known state.
if (options && options.performanceObj) {
@@ -34,7 +34,7 @@ this._PerfService = function _PerfService(options) {
} else {
this._perf = usablePerfObj;
}
};
}
_PerfService.prototype = {
/**
@@ -121,5 +121,5 @@ _PerfService.prototype = {
}
};
this.perfService = new _PerfService();
this.EXPORTED_SYMBOLS = ["_PerfService", "perfService"];
var perfService = new _PerfService();
var EXPORTED_SYMBOLS = ["_PerfService", "perfService"];

View File

@@ -46,7 +46,7 @@ class _PrerenderData {
}
}
this.PrerenderData = new _PrerenderData({
var PrerenderData = new _PrerenderData({
initialPrefs: {
"migrationExpired": true,
"showTopSites": true,
@@ -94,4 +94,4 @@ this.PrerenderData = new _PrerenderData({
});
this._PrerenderData = _PrerenderData;
this.EXPORTED_SYMBOLS = ["PrerenderData", "_PrerenderData"];
var EXPORTED_SYMBOLS = ["PrerenderData", "_PrerenderData"];

View File

@@ -322,7 +322,6 @@ this.INITIAL_STATE = INITIAL_STATE;
this.TOP_SITES_DEFAULT_ROWS = TOP_SITES_DEFAULT_ROWS;
this.TOP_SITES_MAX_SITES_PER_ROW = TOP_SITES_MAX_SITES_PER_ROW;
this.reducers = {TopSites, App, Snippets, Prefs, Dialog, Sections, PreferencesPane};
this.insertPinned = insertPinned;
var reducers = {TopSites, App, Snippets, Prefs, Dialog, Sections, PreferencesPane};
this.EXPORTED_SYMBOLS = ["reducers", "INITIAL_STATE", "insertPinned", "TOP_SITES_DEFAULT_ROWS", "TOP_SITES_MAX_SITES_PER_ROW"];
var EXPORTED_SYMBOLS = ["reducers", "INITIAL_STATE", "insertPinned", "TOP_SITES_DEFAULT_ROWS", "TOP_SITES_MAX_SITES_PER_ROW"];

View File

@@ -231,7 +231,7 @@ for (const config of FEEDS_DATA) {
PREFS_CONFIG.set(pref, config);
}
this.ActivityStream = class ActivityStream {
var ActivityStream = class ActivityStream {
/**
* constructor - Initializes an instance of ActivityStream
*
@@ -336,4 +336,4 @@ this.ActivityStream = class ActivityStream {
}
};
this.EXPORTED_SYMBOLS = ["ActivityStream", "PREFS_CONFIG"];
var EXPORTED_SYMBOLS = ["ActivityStream", "PREFS_CONFIG"];

View File

@@ -21,7 +21,7 @@ const DEFAULT_OPTIONS = {
incomingMessageName: "ActivityStream:ContentToMain"
};
this.ActivityStreamMessageChannel = class ActivityStreamMessageChannel {
var ActivityStreamMessageChannel = class ActivityStreamMessageChannel {
/**
* ActivityStreamMessageChannel - This module connects a Redux store to a RemotePageManager in Firefox.
* Call .createChannel to start the connection, and .destroyChannel to destroy it.
@@ -256,4 +256,4 @@ this.ActivityStreamMessageChannel = class ActivityStreamMessageChannel {
};
this.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
this.EXPORTED_SYMBOLS = ["ActivityStreamMessageChannel", "DEFAULT_OPTIONS"];
var EXPORTED_SYMBOLS = ["ActivityStreamMessageChannel", "DEFAULT_OPTIONS"];

View File

@@ -9,7 +9,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
const ACTIVITY_STREAM_PREF_BRANCH = "browser.newtabpage.activity-stream.";
this.Prefs = class Prefs extends Preferences {
var Prefs = class Prefs extends Preferences {
/**
* Prefs - A wrapper around Preferences that always sets the branch to
* ACTIVITY_STREAM_PREF_BRANCH
@@ -39,7 +39,7 @@ this.Prefs = class Prefs extends Preferences {
}
};
this.DefaultPrefs = class DefaultPrefs {
var DefaultPrefs = class DefaultPrefs {
/**
* DefaultPrefs - A helper for setting and resetting default prefs for the add-on
*
@@ -103,4 +103,4 @@ this.DefaultPrefs = class DefaultPrefs {
}
};
this.EXPORTED_SYMBOLS = ["DefaultPrefs", "Prefs"];
var EXPORTED_SYMBOLS = ["DefaultPrefs", "Prefs"];

View File

@@ -21,7 +21,7 @@ const ONE_DAY = 24 * 60 * 60 * 1000;
const TIPPYTOP_UPDATE_TIME = ONE_DAY;
const TIPPYTOP_RETRY_DELAY = FIVE_MINUTES;
this.FaviconFeed = class FaviconFeed {
var FaviconFeed = class FaviconFeed {
constructor() {
this.tippyTopNextUpdate = 0;
this.cache = new PersistentCache("tippytop", true);
@@ -158,4 +158,4 @@ this.FaviconFeed = class FaviconFeed {
}
};
this.EXPORTED_SYMBOLS = ["FaviconFeed"];
var EXPORTED_SYMBOLS = ["FaviconFeed"];

View File

@@ -35,7 +35,7 @@ function md5Hash(text) {
/**
* Filter out any link objects that have a url with an adult base domain.
*/
this.filterAdult = function filterAdult(links) {
function filterAdult(links) {
return links.filter(({url}) => {
try {
const uri = Services.io.newURI(url);
@@ -44,9 +44,9 @@ this.filterAdult = function filterAdult(links) {
return true;
}
});
};
}
this.EXPORTED_SYMBOLS = ["filterAdult"];
var EXPORTED_SYMBOLS = ["filterAdult"];
// These are md5 hashes of base domains to be filtered out. Originally from:
// https://hg.mozilla.org/mozilla-central/log/default/browser/base/content/newtab/newTab.inadjacent.json

View File

@@ -27,7 +27,7 @@ const HIGHLIGHTS_MAX_LENGTH = 9;
const MANY_EXTRA_LENGTH = HIGHLIGHTS_MAX_LENGTH * 5 + TOP_SITES_DEFAULT_ROWS * TOP_SITES_MAX_SITES_PER_ROW;
const SECTION_ID = "highlights";
this.HighlightsFeed = class HighlightsFeed {
var HighlightsFeed = class HighlightsFeed {
constructor() {
this.dedupe = new Dedupe(this._dedupeKey);
this.linksCache = new LinksCache(NewTabUtils.activityStreamLinks,
@@ -181,4 +181,4 @@ this.HighlightsFeed = class HighlightsFeed {
}
};
this.EXPORTED_SYMBOLS = ["HighlightsFeed", "SECTION_ID"];
var EXPORTED_SYMBOLS = ["HighlightsFeed", "SECTION_ID"];

View File

@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
this.EXPORTED_SYMBOLS = ["LinksCache"];
var EXPORTED_SYMBOLS = ["LinksCache"];
// This should be slightly less than SYSTEM_TICK_INTERVAL as timer
// comparisons are too exact while the async/await functionality will make the
@@ -18,7 +18,7 @@ const EXPIRATION_TIME = 4.5 * 60 * 1000; // 4.5 minutes
* amount of time has passed. Allows for migrating data from previously cached
* links to the new links with the same url.
*/
this.LinksCache = class LinksCache {
var LinksCache = class LinksCache {
/**
* Create a links cache for a given object property.
*

View File

@@ -14,7 +14,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
ChromeUtils.defineModuleGetter(this, "MigrationUtils", "resource:///modules/MigrationUtils.jsm");
ChromeUtils.defineModuleGetter(this, "ProfileAge", "resource://gre/modules/ProfileAge.jsm");
this.ManualMigration = class ManualMigration {
var ManualMigration = class ManualMigration {
constructor() {
Services.obs.addObserver(this, MIGRATION_ENDED_EVENT);
this._prefs = new Prefs();
@@ -96,4 +96,4 @@ this.ManualMigration = class ManualMigration {
}
};
this.EXPORTED_SYMBOLS = ["ManualMigration"];
var EXPORTED_SYMBOLS = ["ManualMigration"];

View File

@@ -9,7 +9,7 @@ const {actionCreators: ac, actionTypes: at} = ChromeUtils.import("resource://act
* NewTabInit - A placeholder for now. This will send a copy of the state to all
* newly opened tabs.
*/
this.NewTabInit = class NewTabInit {
var NewTabInit = class NewTabInit {
constructor() {
this._repliedEarlyTabs = new Map();
}
@@ -49,4 +49,4 @@ this.NewTabInit = class NewTabInit {
}
};
this.EXPORTED_SYMBOLS = ["NewTabInit"];
var EXPORTED_SYMBOLS = ["NewTabInit"];

View File

@@ -11,7 +11,7 @@ XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => new TextDecoder());
/**
* A file (disk) based persistent cache of a JSON serializable object.
*/
this.PersistentCache = class PersistentCache {
var PersistentCache = class PersistentCache {
/**
* Create a cache object based on a name.
*
@@ -79,4 +79,4 @@ this.PersistentCache = class PersistentCache {
}
};
this.EXPORTED_SYMBOLS = ["PersistentCache"];
var EXPORTED_SYMBOLS = ["PersistentCache"];

View File

@@ -311,4 +311,4 @@ this.PlacesFeed = PlacesFeed;
PlacesFeed.HistoryObserver = HistoryObserver;
PlacesFeed.BookmarksObserver = BookmarksObserver;
this.EXPORTED_SYMBOLS = ["PlacesFeed"];
var EXPORTED_SYMBOLS = ["PlacesFeed"];

View File

@@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
const ONBOARDING_FINISHED_PREF = "browser.onboarding.notification.finished";
this.PrefsFeed = class PrefsFeed {
var PrefsFeed = class PrefsFeed {
constructor(prefMap) {
this._prefMap = prefMap;
this._prefs = new Prefs();
@@ -93,4 +93,4 @@ this.PrefsFeed = class PrefsFeed {
}
};
this.EXPORTED_SYMBOLS = ["PrefsFeed"];
var EXPORTED_SYMBOLS = ["PrefsFeed"];

View File

@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
this.EXPORTED_SYMBOLS = ["Screenshots"];
var EXPORTED_SYMBOLS = ["Screenshots"];
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -24,7 +24,7 @@ ChromeUtils.defineModuleGetter(this, "Services",
const GREY_10 = "#F9F9FA";
this.Screenshots = {
var Screenshots = {
/**
* Convert bytes to a string using extremely fast String.fromCharCode without
* exceeding the max number of arguments that can be provided to a function.

View File

@@ -356,4 +356,4 @@ class SectionsFeed {
this.SectionsFeed = SectionsFeed;
this.SectionsManager = SectionsManager;
this.EXPORTED_SYMBOLS = ["SectionsFeed", "SectionsManager"];
var EXPORTED_SYMBOLS = ["SectionsFeed", "SectionsManager"];

View File

@@ -33,7 +33,6 @@ function getETLD(host) {
}
}
this.getETLD = getETLD;
/**
* shortURL - Creates a short version of a link's url, used for display purposes
@@ -43,7 +42,7 @@ this.getETLD = getETLD;
* {str} link.url (required)- The url of the link
* @return {str} A short url
*/
this.shortURL = function shortURL({url}) {
function shortURL({url}) {
if (!url) {
return "";
}
@@ -67,6 +66,6 @@ this.shortURL = function shortURL({url}) {
// Ideally get the short eTLD-less host but fall back to longer url parts
return handleIDNHost(hostname.slice(0, eTLDExtra) || hostname) ||
parsed.pathname || parsed.href;
};
}
this.EXPORTED_SYMBOLS = ["shortURL", "getETLD"];
var EXPORTED_SYMBOLS = ["shortURL", "getETLD"];

View File

@@ -29,7 +29,7 @@ const STARTPAGE_VERSION = 5;
const ONE_WEEK = 7 * 24 * 60 * 60 * 1000;
this.SnippetsFeed = class SnippetsFeed {
var SnippetsFeed = class SnippetsFeed {
constructor() {
this._refresh = this._refresh.bind(this);
}
@@ -148,4 +148,4 @@ this.SnippetsFeed = class SnippetsFeed {
}
};
this.EXPORTED_SYMBOLS = ["SnippetsFeed"];
var EXPORTED_SYMBOLS = ["SnippetsFeed"];

View File

@@ -15,7 +15,7 @@ const {redux} = ChromeUtils.import("resource://activity-stream/vendor/Redux.jsm"
* It also accepts an array of "Feeds" on inititalization, which
* can listen for any action that is dispatched through the store.
*/
this.Store = class Store {
var Store = class Store {
/**
* constructor - The redux store and message manager are created here,
* but no listeners are added until "init" is called.
@@ -157,4 +157,4 @@ this.Store = class Store {
}
};
this.EXPORTED_SYMBOLS = ["Store"];
var EXPORTED_SYMBOLS = ["Store"];

View File

@@ -13,7 +13,7 @@ ChromeUtils.defineModuleGetter(this, "clearInterval", "resource://gre/modules/Ti
// Frequency at which SYSTEM_TICK events are fired
const SYSTEM_TICK_INTERVAL = 5 * 60 * 1000;
this.SystemTickFeed = class SystemTickFeed {
var SystemTickFeed = class SystemTickFeed {
init() {
this.intervalId = setInterval(() => this.store.dispatch({type: at.SYSTEM_TICK}), SYSTEM_TICK_INTERVAL);
}
@@ -31,4 +31,4 @@ this.SystemTickFeed = class SystemTickFeed {
};
this.SYSTEM_TICK_INTERVAL = SYSTEM_TICK_INTERVAL;
this.EXPORTED_SYMBOLS = ["SystemTickFeed", "SYSTEM_TICK_INTERVAL"];
var EXPORTED_SYMBOLS = ["SystemTickFeed", "SYSTEM_TICK_INTERVAL"];

View File

@@ -38,7 +38,7 @@ const USER_PREFS_ENCODING = {
const PREF_IMPRESSION_ID = "impressionId";
const TELEMETRY_PREF = "telemetry";
this.TelemetryFeed = class TelemetryFeed {
var TelemetryFeed = class TelemetryFeed {
constructor(options) {
this.sessions = new Map();
this._prefs = new Prefs();
@@ -457,7 +457,7 @@ this.TelemetryFeed = class TelemetryFeed {
}
};
this.EXPORTED_SYMBOLS = [
var EXPORTED_SYMBOLS = [
"TelemetryFeed",
"USER_PREFS_ENCODING",
"PREF_IMPRESSION_ID",

View File

@@ -17,9 +17,8 @@ function getDomain(url) {
}
return domain;
}
this.getDomain = getDomain;
this.TippyTopProvider = class TippyTopProvider {
var TippyTopProvider = class TippyTopProvider {
constructor() {
this._sitesByDomain = new Map();
this.initialized = false;
@@ -51,4 +50,4 @@ this.TippyTopProvider = class TippyTopProvider {
}
};
this.EXPORTED_SYMBOLS = ["TippyTopProvider", "getDomain"];
var EXPORTED_SYMBOLS = ["TippyTopProvider", "getDomain"];

View File

@@ -29,7 +29,7 @@ const MIN_FAVICON_SIZE = 96;
const CACHED_LINK_PROPS_TO_MIGRATE = ["screenshot"];
const PINNED_FAVICON_PROPS_TO_MIGRATE = ["favicon", "faviconRef", "faviconSize"];
this.TopSitesFeed = class TopSitesFeed {
var TopSitesFeed = class TopSitesFeed {
constructor() {
this._tippyTopProvider = new TippyTopProvider();
this.dedupe = new Dedupe(this._dedupeKey);
@@ -347,4 +347,4 @@ this.TopSitesFeed = class TopSitesFeed {
};
this.DEFAULT_TOP_SITES = DEFAULT_TOP_SITES;
this.EXPORTED_SYMBOLS = ["TopSitesFeed", "DEFAULT_TOP_SITES"];
var EXPORTED_SYMBOLS = ["TopSitesFeed", "DEFAULT_TOP_SITES"];

View File

@@ -27,7 +27,7 @@ const SPOC_IMPRESSION_TRACKING_PREF = "feeds.section.topstories.spoc.impressions
const REC_IMPRESSION_TRACKING_PREF = "feeds.section.topstories.rec.impressions";
const MAX_LIFETIME_CAP = 100; // Guard against misconfiguration on the server
this.TopStoriesFeed = class TopStoriesFeed {
var TopStoriesFeed = class TopStoriesFeed {
constructor() {
this.spocsPerNewTabs = 0;
this.newTabsSinceSpoc = 0;
@@ -511,4 +511,4 @@ this.SPOC_IMPRESSION_TRACKING_PREF = SPOC_IMPRESSION_TRACKING_PREF;
this.REC_IMPRESSION_TRACKING_PREF = REC_IMPRESSION_TRACKING_PREF;
this.MIN_DOMAIN_AFFINITIES_UPDATE_TIME = MIN_DOMAIN_AFFINITIES_UPDATE_TIME;
this.DEFAULT_RECS_EXPIRE_TIME = DEFAULT_RECS_EXPIRE_TIME;
this.EXPORTED_SYMBOLS = ["TopStoriesFeed", "STORIES_UPDATE_TIME", "TOPICS_UPDATE_TIME", "SECTION_ID", "SPOC_IMPRESSION_TRACKING_PREF", "MIN_DOMAIN_AFFINITIES_UPDATE_TIME", "REC_IMPRESSION_TRACKING_PREF", "DEFAULT_RECS_EXPIRE_TIME"];
var EXPORTED_SYMBOLS = ["TopStoriesFeed", "STORIES_UPDATE_TIME", "TOPICS_UPDATE_TIME", "SECTION_ID", "SPOC_IMPRESSION_TRACKING_PREF", "MIN_DOMAIN_AFFINITIES_UPDATE_TIME", "REC_IMPRESSION_TRACKING_PREF", "DEFAULT_RECS_EXPIRE_TIME"];

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