From 682b1ec3b2c92831a0ea97754ce4fdd00b9497ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Fri, 23 Feb 2018 20:50:01 +0100 Subject: [PATCH] Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. --- accessible/jsat/AccessFu.jsm | 4 +- accessible/jsat/Constants.jsm | 4 +- accessible/jsat/ContentControl.jsm | 6 +- accessible/jsat/EventManager.jsm | 6 +- accessible/jsat/Gestures.jsm | 6 +- accessible/jsat/OutputGenerator.jsm | 6 +- accessible/jsat/PointerAdapter.jsm | 4 +- accessible/jsat/Presentation.jsm | 4 +- accessible/jsat/Traversal.jsm | 6 +- accessible/jsat/Utils.jsm | 14 ++--- browser/base/content/test/urlbar/Panel.jsm | 4 +- .../customizableui/CustomizableUI.jsm | 4 +- .../customizableui/CustomizableWidgets.jsm | 2 +- .../customizableui/CustomizeMode.jsm | 2 +- .../customizableui/DragPositionManager.jsm | 2 +- .../customizableui/PanelMultiView.jsm | 8 +-- .../customizableui/ScrollbarSampler.jsm | 4 +- .../customizableui/SearchWidgetTracker.jsm | 2 +- browser/components/distribution.js | 6 +- .../components/downloads/DownloadsCommon.jsm | 4 +- .../components/downloads/DownloadsSubview.jsm | 2 +- .../components/downloads/DownloadsTaskbar.jsm | 4 +- .../components/downloads/DownloadsViewUI.jsm | 4 +- .../enterprisepolicies/Policies.jsm | 4 +- .../enterprisepolicies/PoliciesValidator.jsm | 4 +- .../enterprisepolicies/WindowsGPOParser.jsm | 4 +- browser/components/migration/.eslintrc.js | 2 +- browser/components/migration/AutoMigrate.jsm | 2 +- .../migration/ChromeMigrationUtils.jsm | 4 +- browser/components/migration/ESEDBReader.jsm | 2 +- .../components/migration/MSMigrationUtils.jsm | 2 +- .../components/migration/MigrationUtils.jsm | 6 +- .../components/newtab/NewTabPrefsProvider.jsm | 2 +- .../newtab/NewTabRemoteResources.jsm | 2 +- .../newtab/NewTabSearchProvider.jsm | 2 +- .../components/newtab/NewTabWebChannel.jsm | 2 +- browser/components/places/PlacesUIUtils.jsm | 4 +- .../preferences/SiteDataManager.jsm | 4 +- .../sessionstore/ContentRestore.jsm | 2 +- .../sessionstore/DocShellCapabilities.jsm | 4 +- .../components/sessionstore/GlobalState.jsm | 2 +- .../components/sessionstore/PrivacyFilter.jsm | 4 +- .../RecentlyClosedTabsAndWindowsMenuUtils.jsm | 4 +- browser/components/sessionstore/RunState.jsm | 4 +- .../sessionstore/SessionCookies.jsm | 4 +- .../components/sessionstore/SessionFile.jsm | 4 +- .../sessionstore/SessionMigration.jsm | 2 +- .../components/sessionstore/SessionSaver.jsm | 4 +- .../sessionstore/SessionStorage.jsm | 4 +- .../components/sessionstore/SessionStore.jsm | 4 +- .../components/sessionstore/SessionWorker.jsm | 4 +- .../sessionstore/StartupPerformance.jsm | 4 +- .../components/sessionstore/TabAttributes.jsm | 4 +- browser/components/sessionstore/TabState.jsm | 4 +- .../components/sessionstore/TabStateCache.jsm | 4 +- .../sessionstore/TabStateFlusher.jsm | 4 +- browser/components/shell/ShellService.jsm | 4 +- .../components/syncedtabs/EventEmitter.jsm | 2 +- .../syncedtabs/SyncedTabsDeckComponent.js | 2 +- .../syncedtabs/SyncedTabsDeckStore.js | 2 +- .../syncedtabs/SyncedTabsDeckView.js | 2 +- .../syncedtabs/SyncedTabsListStore.js | 2 +- .../components/syncedtabs/TabListComponent.js | 2 +- browser/components/syncedtabs/TabListView.js | 2 +- browser/components/syncedtabs/util.js | 2 +- .../components/translation/BingTranslator.jsm | 4 +- .../translation/LanguageDetector.jsm | 4 +- .../components/translation/Translation.jsm | 6 +- .../translation/TranslationContentHandler.jsm | 4 +- .../translation/TranslationDocument.jsm | 4 +- .../translation/YandexTranslator.jsm | 4 +- browser/components/uitour/UITour.jsm | 4 +- browser/experiments/Experiments.jsm | 2 +- .../activity-stream/common/Actions.jsm | 16 +++--- .../activity-stream/common/Dedupe.jsm | 4 +- .../activity-stream/common/PerfService.jsm | 8 +-- .../activity-stream/common/PrerenderData.jsm | 4 +- .../activity-stream/common/Reducers.jsm | 5 +- .../activity-stream/lib/ActivityStream.jsm | 4 +- .../lib/ActivityStreamMessageChannel.jsm | 4 +- .../lib/ActivityStreamPrefs.jsm | 6 +- .../activity-stream/lib/FaviconFeed.jsm | 4 +- .../activity-stream/lib/FilterAdult.jsm | 6 +- .../activity-stream/lib/HighlightsFeed.jsm | 4 +- .../activity-stream/lib/LinksCache.jsm | 4 +- .../activity-stream/lib/ManualMigration.jsm | 4 +- .../activity-stream/lib/NewTabInit.jsm | 4 +- .../activity-stream/lib/PersistentCache.jsm | 4 +- .../activity-stream/lib/PlacesFeed.jsm | 2 +- .../activity-stream/lib/PrefsFeed.jsm | 4 +- .../activity-stream/lib/Screenshots.jsm | 4 +- .../activity-stream/lib/SectionsManager.jsm | 2 +- .../activity-stream/lib/ShortURL.jsm | 7 +-- .../activity-stream/lib/SnippetsFeed.jsm | 4 +- .../extensions/activity-stream/lib/Store.jsm | 4 +- .../activity-stream/lib/SystemTickFeed.jsm | 4 +- .../activity-stream/lib/TelemetryFeed.jsm | 4 +- .../activity-stream/lib/TippyTopProvider.jsm | 5 +- .../activity-stream/lib/TopSitesFeed.jsm | 4 +- .../activity-stream/lib/TopStoriesFeed.jsm | 4 +- .../activity-stream/lib/UTEventReporting.jsm | 4 +- .../lib/UserDomainAffinityProvider.jsm | 4 +- .../activity-stream/vendor/Redux.jsm | 4 +- .../formautofill/FormAutofillContent.jsm | 4 +- .../formautofill/FormAutofillDoorhanger.jsm | 4 +- .../formautofill/FormAutofillHandler.jsm | 4 +- .../formautofill/FormAutofillHeuristics.jsm | 6 +- .../formautofill/FormAutofillNameUtils.jsm | 2 +- .../formautofill/FormAutofillParent.jsm | 6 +- .../formautofill/FormAutofillPreferences.jsm | 4 +- .../formautofill/FormAutofillStorage.jsm | 4 +- .../formautofill/FormAutofillSync.jsm | 2 +- .../formautofill/FormAutofillUtils.jsm | 4 +- .../formautofill/MasterPassword.jsm | 4 +- .../ProfileAutoCompleteResult.jsm | 4 +- .../phonenumberutils/PhoneNumber.jsm | 4 +- .../phonenumberutils/PhoneNumberMetaData.jsm | 4 +- .../PhoneNumberNormalizer.jsm | 4 +- .../onboarding/OnboardingTelemetry.jsm | 2 +- .../onboarding/OnboardingTourType.jsm | 2 +- .../pdfjs/content/PdfJsTelemetry.jsm | 4 +- .../extensions/pocket/content/AboutPocket.jsm | 2 +- browser/extensions/pocket/content/Pocket.jsm | 2 +- browser/extensions/pocket/content/pktApi.jsm | 2 +- .../shield-recipe-client/bootstrap.js | 4 +- .../content/AboutPages.jsm | 4 +- .../lib/ActionSandboxManager.jsm | 4 +- .../shield-recipe-client/lib/AddonStudies.jsm | 4 +- .../shield-recipe-client/lib/Addons.jsm | 4 +- .../lib/CleanupManager.jsm | 4 +- .../lib/ClientEnvironment.jsm | 4 +- .../shield-recipe-client/lib/EventEmitter.jsm | 4 +- .../lib/FilterExpressions.jsm | 4 +- .../shield-recipe-client/lib/Heartbeat.jsm | 4 +- .../shield-recipe-client/lib/LogManager.jsm | 4 +- .../shield-recipe-client/lib/NormandyApi.jsm | 4 +- .../lib/NormandyDriver.jsm | 4 +- .../lib/PreferenceExperiments.jsm | 4 +- .../lib/PreferenceFilters.jsm | 4 +- .../shield-recipe-client/lib/RecipeRunner.jsm | 4 +- .../shield-recipe-client/lib/Sampling.jsm | 4 +- .../lib/SandboxManager.jsm | 4 +- .../lib/ShieldPreferences.jsm | 4 +- .../lib/ShieldRecipeClient.jsm | 4 +- .../shield-recipe-client/lib/Storage.jsm | 4 +- .../lib/TelemetryEvents.jsm | 2 +- .../shield-recipe-client/lib/Uptake.jsm | 4 +- .../shield-recipe-client/lib/Utils.jsm | 4 +- .../content/WebCompatReporter.jsm | 2 +- .../webcompat/content/data/ua_overrides.jsm | 2 +- .../webcompat/content/lib/ua_overrider.jsm | 2 +- browser/modules/AboutHome.jsm | 4 +- browser/modules/AboutNewTab.jsm | 2 +- browser/modules/AttributionCode.jsm | 2 +- browser/modules/BrowserErrorReporter.jsm | 2 +- browser/modules/BrowserUITelemetry.jsm | 4 +- browser/modules/BrowserUsageTelemetry.jsm | 2 +- browser/modules/CastingApps.jsm | 2 +- browser/modules/ContentClick.jsm | 2 +- browser/modules/ContentCrashHandlers.jsm | 12 ++-- browser/modules/ContentLinkHandler.jsm | 4 +- browser/modules/ContentMetaHandler.jsm | 4 +- browser/modules/ContentSearch.jsm | 4 +- browser/modules/ContentWebRTC.jsm | 4 +- browser/modules/ContextMenu.jsm | 2 +- browser/modules/DirectoryLinksProvider.jsm | 2 +- browser/modules/ExtensionsUI.jsm | 4 +- browser/modules/Feeds.jsm | 4 +- browser/modules/FormSubmitObserver.jsm | 2 +- browser/modules/FormValidationHandler.jsm | 2 +- browser/modules/LaterRun.jsm | 2 +- browser/modules/PageActions.jsm | 4 +- browser/modules/PermissionUI.jsm | 8 +-- browser/modules/PingCentre.jsm | 4 +- browser/modules/PluginContent.jsm | 4 +- browser/modules/ProcessHangMonitor.jsm | 2 +- browser/modules/ReaderParent.jsm | 2 +- browser/modules/RecentWindow.jsm | 4 +- browser/modules/RemotePrompt.jsm | 2 +- browser/modules/SchedulePressure.jsm | 4 +- browser/modules/SitePermissions.jsm | 4 +- browser/modules/TransientPrefs.jsm | 4 +- .../UpdateTopLevelContentWindowIDHelper.jsm | 6 +- browser/modules/Windows8WindowFrameColor.jsm | 2 +- browser/modules/WindowsJumpLists.jsm | 4 +- browser/modules/WindowsPreviewPerTab.jsm | 4 +- browser/modules/ZoomUI.jsm | 2 +- browser/modules/offlineAppCache.jsm | 4 +- browser/modules/webrtcUI.jsm | 4 +- .../mozscreenshots/extension/Screenshot.jsm | 4 +- .../mozscreenshots/extension/TestRunner.jsm | 4 +- .../extension/configurations/AppMenu.jsm | 4 +- .../extension/configurations/Buttons.jsm | 4 +- .../configurations/ControlCenter.jsm | 4 +- .../configurations/CustomizeMode.jsm | 4 +- .../extension/configurations/DevTools.jsm | 4 +- .../configurations/LightweightThemes.jsm | 4 +- .../configurations/PermissionPrompts.jsm | 4 +- .../extension/configurations/Preferences.jsm | 4 +- .../extension/configurations/Tabs.jsm | 4 +- .../configurations/TabsInTitlebar.jsm | 4 +- .../extension/configurations/Toolbars.jsm | 4 +- .../extension/configurations/UIDensities.jsm | 4 +- .../extension/configurations/WindowSize.jsm | 4 +- dom/base/DOMRequestHelper.jsm | 4 +- dom/base/IndexedDBHelper.jsm | 4 +- .../BrowserElementPromptService.jsm | 4 +- dom/console/tests/console.jsm | 4 +- dom/encoding/test/file_stringencoding.jsm | 6 +- .../test/unit/GlobalObjectsModule.jsm | 6 +- dom/manifest/ImageObjectProcessor.jsm | 3 +- dom/manifest/Manifest.jsm | 2 +- dom/manifest/ManifestFinder.jsm | 4 +- dom/manifest/ManifestIcons.jsm | 4 +- dom/manifest/ManifestObtainer.jsm | 4 +- dom/manifest/ManifestProcessor.jsm | 4 +- dom/manifest/ValueExtractor.jsm | 3 +- dom/media/IdpSandbox.jsm | 3 +- dom/media/PeerConnectionIdp.jsm | 3 +- dom/media/RTCStatsReport.jsm | 3 +- dom/media/webvtt/vtt.jsm | 2 +- dom/network/tests/tcpsocket_test.jsm | 8 +-- dom/notification/NotificationDB.jsm | 2 +- .../provider/ControllerStateMachine.jsm | 3 +- .../provider/ReceiverStateMachine.jsm | 3 +- .../provider/StateMachineHelper.jsm | 2 +- dom/push/PushCrypto.jsm | 6 +- dom/push/PushDB.jsm | 6 +- dom/push/PushRecord.jsm | 2 +- dom/push/PushService.jsm | 4 +- dom/push/PushServiceAndroidGCM.jsm | 4 +- dom/push/PushServiceHttp2.jsm | 4 +- dom/push/PushServiceWebSocket.jsm | 4 +- dom/url/tests/file_url.jsm | 6 +- dom/url/tests/file_worker_url.jsm | 6 +- dom/url/tests/test_bug883784.jsm | 4 +- dom/workers/test/WorkerTest.jsm | 4 +- editor/AsyncSpellCheckTestHelper.jsm | 2 +- intl/l10n/DOMLocalization.jsm | 2 +- intl/l10n/L10nRegistry.jsm | 2 +- intl/l10n/Localization.jsm | 2 +- intl/l10n/MessageContext.jsm | 2 +- intl/locale/PluralForm.jsm | 4 +- js/ductwork/debugger/jsdebugger.jsm | 6 +- js/xpconnect/loader/XPCOMUtils.jsm | 4 +- .../tests/chrome/file_expandosharing.jsm | 6 +- .../tests/unit/bogus_element_type.jsm | 2 +- .../tests/unit/bogus_exports_type.jsm | 2 +- js/xpconnect/tests/unit/recursive_importA.jsm | 2 +- js/xpconnect/tests/unit/recursive_importB.jsm | 2 +- layout/tools/reftest/globals.jsm | 2 +- layout/tools/reftest/manifest.jsm | 2 +- layout/tools/reftest/reftest.jsm | 2 +- mobile/android/modules/Accounts.jsm | 2 +- mobile/android/modules/ActionBarHandler.jsm | 2 +- mobile/android/modules/BrowserActions.jsm | 2 +- mobile/android/modules/DelayedInit.jsm | 2 +- .../android/modules/DownloadNotifications.jsm | 2 +- mobile/android/modules/FormAssistant.jsm | 2 +- .../android/modules/FxAccountsWebChannel.jsm | 4 +- mobile/android/modules/HelperApps.jsm | 2 +- mobile/android/modules/Home.jsm | 4 +- mobile/android/modules/HomeProvider.jsm | 8 +-- mobile/android/modules/InputWidgetHelper.jsm | 2 +- mobile/android/modules/MediaPlayerApp.jsm | 2 +- mobile/android/modules/NetErrorHelper.jsm | 2 +- mobile/android/modules/Notifications.jsm | 2 +- mobile/android/modules/PageActions.jsm | 2 +- mobile/android/modules/Prompt.jsm | 2 +- mobile/android/modules/RuntimePermissions.jsm | 2 +- mobile/android/modules/SSLExceptions.jsm | 2 +- mobile/android/modules/Sanitizer.jsm | 4 +- mobile/android/modules/SelectHelper.jsm | 2 +- mobile/android/modules/SharedPreferences.jsm | 2 +- mobile/android/modules/Snackbars.jsm | 2 +- mobile/android/modules/WebrtcUI.jsm | 2 +- mobile/android/modules/WebsiteMetadata.jsm | 2 +- .../modules/geckoview/GeckoViewContent.jsm | 2 +- .../geckoview/GeckoViewContentModule.jsm | 2 +- .../modules/geckoview/GeckoViewModule.jsm | 2 +- .../modules/geckoview/GeckoViewNavigation.jsm | 2 +- .../modules/geckoview/GeckoViewProgress.jsm | 2 +- .../geckoview/GeckoViewRemoteDebugger.jsm | 2 +- .../modules/geckoview/GeckoViewScroll.jsm | 2 +- .../modules/geckoview/GeckoViewSettings.jsm | 2 +- .../modules/geckoview/GeckoViewTab.jsm | 2 +- .../geckoview/GeckoViewTrackingProtection.jsm | 2 +- .../modules/geckoview/GeckoViewUtils.jsm | 2 +- .../android/modules/geckoview/Messaging.jsm | 2 +- netwerk/base/NetUtil.jsm | 4 +- .../dns/mdns/libmdns/MulticastDNSAndroid.jsm | 2 +- .../dns/mdns/libmdns/fallback/DNSPacket.jsm | 2 +- .../dns/mdns/libmdns/fallback/DNSRecord.jsm | 2 +- .../libmdns/fallback/DNSResourceRecord.jsm | 2 +- .../dns/mdns/libmdns/fallback/DNSTypes.jsm | 2 +- .../dns/mdns/libmdns/fallback/DataReader.jsm | 2 +- .../dns/mdns/libmdns/fallback/DataWriter.jsm | 2 +- .../mdns/libmdns/fallback/MulticastDNS.jsm | 2 +- netwerk/protocol/http/UserAgentOverrides.jsm | 4 +- netwerk/protocol/http/UserAgentUpdates.jsm | 4 +- netwerk/test/httpserver/httpd.js | 56 +++++++++---------- security/manager/ssl/X509.jsm | 4 +- services/common/async.js | 4 +- services/common/blocklist-clients.js | 20 +++---- services/common/blocklist-updater.js | 6 +- services/common/hawkclient.js | 4 +- services/common/hawkrequest.js | 12 ++-- services/common/kinto-http-client.js | 2 +- services/common/kinto-offline-client.js | 2 +- services/common/kinto-storage-adapter.js | 2 +- services/common/logmanager.js | 2 +- services/common/modules-testing/logging.js | 10 ++-- services/common/observers.js | 4 +- services/common/rest.js | 15 +++-- services/common/tokenserverclient.js | 20 +++---- services/common/uptake-telemetry.js | 2 +- services/common/utils.js | 4 +- services/crypto/modules/WeaveCrypto.js | 6 +- services/crypto/modules/jwcrypto.jsm | 4 +- services/crypto/modules/utils.js | 4 +- services/fxaccounts/Credentials.jsm | 4 +- services/fxaccounts/FxAccounts.jsm | 4 +- services/fxaccounts/FxAccountsClient.jsm | 4 +- services/fxaccounts/FxAccountsCommon.js | 2 +- services/fxaccounts/FxAccountsConfig.jsm | 4 +- .../fxaccounts/FxAccountsOAuthGrantClient.jsm | 6 +- services/fxaccounts/FxAccountsProfile.jsm | 4 +- .../fxaccounts/FxAccountsProfileClient.jsm | 6 +- services/fxaccounts/FxAccountsStorage.jsm | 4 +- services/fxaccounts/FxAccountsWebChannel.jsm | 4 +- services/sync/modules-testing/fakeservices.js | 18 +++--- services/sync/modules-testing/fxa_utils.js | 4 +- services/sync/modules-testing/rotaryengine.js | 18 +++--- services/sync/modules-testing/utils.js | 32 +++++------ services/sync/modules/SyncedTabs.jsm | 4 +- services/sync/modules/UIState.jsm | 4 +- services/sync/modules/addonsreconciler.js | 20 +++---- services/sync/modules/addonutils.js | 2 +- services/sync/modules/bookmark_repair.js | 2 +- services/sync/modules/bookmark_validator.js | 2 +- services/sync/modules/browserid_identity.js | 8 +-- services/sync/modules/collection_repair.js | 8 +-- services/sync/modules/collection_validator.js | 2 +- services/sync/modules/constants.js | 2 +- services/sync/modules/doctor.js | 6 +- services/sync/modules/engines.js | 18 +++--- services/sync/modules/engines/addons.js | 6 +- services/sync/modules/engines/bookmarks.js | 40 ++++++------- services/sync/modules/engines/clients.js | 10 ++-- .../sync/modules/engines/extension-storage.js | 6 +- services/sync/modules/engines/forms.js | 10 ++-- services/sync/modules/engines/history.js | 10 ++-- services/sync/modules/engines/passwords.js | 10 ++-- services/sync/modules/engines/prefs.js | 10 ++-- services/sync/modules/engines/tabs.js | 10 ++-- services/sync/modules/keys.js | 6 +- services/sync/modules/main.js | 4 +- services/sync/modules/policies.js | 10 ++-- services/sync/modules/record.js | 22 ++++---- services/sync/modules/resource.js | 6 +- services/sync/modules/service.js | 4 +- services/sync/modules/stages/declined.js | 4 +- services/sync/modules/stages/enginesync.js | 6 +- services/sync/modules/status.js | 4 +- services/sync/modules/telemetry.js | 4 +- services/sync/modules/util.js | 6 +- .../tps/resource/auth/fxaccounts.jsm | 2 +- .../BrowserTestUtils/BrowserTestUtils.jsm | 4 +- .../BrowserTestUtils/ContentTask.jsm | 4 +- .../BrowserTestUtils/ContentTaskUtils.jsm | 4 +- testing/mochitest/ShutdownLeaksCollector.jsm | 2 +- .../tests/Harness_sanity/ImportTesting.jsm | 2 +- testing/modules/AppData.jsm | 4 +- testing/modules/AppInfo.jsm | 8 +-- testing/modules/Assert.jsm | 2 +- testing/modules/CoverageUtils.jsm | 4 +- testing/modules/FileTestUtils.jsm | 4 +- testing/modules/MockRegistrar.jsm | 4 +- testing/modules/MockRegistry.jsm | 2 +- testing/modules/StructuredLog.jsm | 6 +- testing/modules/TestUtils.jsm | 4 +- testing/modules/ajv-4.1.1.js | 2 +- .../specialpowers/content/MockColorPicker.jsm | 4 +- .../specialpowers/content/MockFilePicker.jsm | 4 +- .../content/MockPermissionPrompt.jsm | 4 +- .../content/SpecialPowersObserver.jsm | 7 +-- .../components/addoncompat/CompatWarning.jsm | 2 +- toolkit/components/addoncompat/Prefetcher.jsm | 2 +- .../addoncompat/RemoteAddonsChild.jsm | 2 +- .../addoncompat/RemoteAddonsParent.jsm | 2 +- .../asyncshutdown/AsyncShutdown.jsm | 4 +- .../components/cloudstorage/CloudStorage.jsm | 4 +- .../contentprefs/ContentPrefServiceChild.jsm | 2 +- .../contentprefs/ContentPrefServiceParent.jsm | 2 +- .../contentprefs/ContentPrefUtils.jsm | 2 +- .../ContextualIdentityService.jsm | 4 +- toolkit/components/crashes/CrashManager.jsm | 4 +- .../components/crashes/CrashManagerTest.jsm | 10 ++-- .../components/crashmonitor/CrashMonitor.jsm | 4 +- toolkit/components/ctypes/ctypes.jsm | 2 +- toolkit/components/extensions/Extension.jsm | 2 +- .../components/extensions/ExtensionChild.jsm | 2 +- .../ExtensionChildDevToolsUtils.jsm | 4 +- .../components/extensions/ExtensionCommon.jsm | 2 +- .../extensions/ExtensionContent.jsm | 4 +- .../extensions/ExtensionPageChild.jsm | 2 +- .../components/extensions/ExtensionParent.jsm | 2 +- .../extensions/ExtensionPermissions.jsm | 4 +- .../ExtensionPreferencesManager.jsm | 2 +- .../extensions/ExtensionSettingsStore.jsm | 4 +- .../extensions/ExtensionStorage.jsm | 4 +- .../extensions/ExtensionStorageSync.jsm | 6 +- .../extensions/ExtensionTestCommon.jsm | 4 +- .../components/extensions/ExtensionUtils.jsm | 4 +- .../extensions/ExtensionXPCShellUtils.jsm | 2 +- toolkit/components/extensions/FindContent.jsm | 2 +- .../extensions/LegacyExtensionsUtils.jsm | 4 +- .../components/extensions/MessageChannel.jsm | 2 +- .../components/extensions/NativeManifests.jsm | 4 +- .../components/extensions/NativeMessaging.jsm | 4 +- .../extensions/ProxyScriptContext.jsm | 2 +- toolkit/components/extensions/Schemas.jsm | 2 +- .../test/mochitest/webrequest_test.jsm | 4 +- .../jsdownloads/src/DownloadCore.jsm | 18 +++--- .../jsdownloads/src/DownloadHistory.jsm | 6 +- .../jsdownloads/src/DownloadIntegration.jsm | 10 ++-- .../jsdownloads/src/DownloadList.jsm | 8 +-- .../jsdownloads/src/DownloadPaths.jsm | 4 +- .../jsdownloads/src/DownloadStore.jsm | 4 +- .../jsdownloads/src/DownloadUIHelper.jsm | 6 +- .../components/jsdownloads/src/Downloads.jsm | 4 +- .../microformats/microformat-shiv.js | 2 +- .../components/narrate/NarrateControls.jsm | 2 +- toolkit/components/narrate/Narrator.jsm | 2 +- toolkit/components/narrate/VoiceSelect.jsm | 2 +- .../narrate/test/NarrateTestUtils.jsm | 4 +- .../osfile/modules/osfile_async_front.jsm | 4 +- .../osfile/modules/osfile_native.jsm | 6 +- .../passwordmgr/InsecurePasswordUtils.jsm | 4 +- .../components/passwordmgr/LoginHelper.jsm | 4 +- .../components/passwordmgr/LoginImport.jsm | 4 +- .../passwordmgr/LoginManagerContent.jsm | 6 +- .../passwordmgr/LoginManagerContextMenu.jsm | 2 +- .../passwordmgr/LoginManagerParent.jsm | 2 +- .../components/passwordmgr/LoginRecipes.jsm | 2 +- toolkit/components/passwordmgr/LoginStore.jsm | 2 +- toolkit/components/passwordmgr/OSCrypto.jsm | 2 +- .../passwordmgr/test/LoginTestUtils.jsm | 4 +- .../payments/test/PaymentTestUtils.jsm | 4 +- toolkit/components/perf/PerfMeasurement.jsm | 2 +- .../perfmonitoring/PerformanceStats.jsm | 4 +- .../perfmonitoring/PerformanceWatcher.jsm | 4 +- .../components/places/BookmarkHTMLUtils.jsm | 4 +- .../components/places/BookmarkJSONUtils.jsm | 4 +- toolkit/components/places/Bookmarks.jsm | 2 +- .../places/ExtensionSearchHandler.jsm | 2 +- toolkit/components/places/History.jsm | 4 +- toolkit/components/places/PlacesBackups.jsm | 4 +- toolkit/components/places/PlacesDBUtils.jsm | 4 +- .../PlacesRemoteTabsAutocompleteProvider.jsm | 4 +- .../PlacesSearchAutocompleteProvider.jsm | 4 +- toolkit/components/places/PlacesSyncUtils.jsm | 2 +- .../components/places/PlacesTransactions.jsm | 2 +- toolkit/components/places/PlacesUtils.jsm | 4 +- .../places/SyncedBookmarksMirror.jsm | 2 +- .../places/tests/PlacesTestUtils.jsm | 4 +- .../promiseworker/PromiseWorker.jsm | 4 +- .../components/prompts/src/CommonDialog.jsm | 6 +- .../prompts/src/SharedPromptUtils.jsm | 6 +- toolkit/components/reader/.eslintrc.js | 2 +- toolkit/components/reader/AboutReader.jsm | 2 +- toolkit/components/reader/ReaderMode.jsm | 4 +- toolkit/components/reader/ReaderWorker.jsm | 4 +- toolkit/components/reflect/reflect.jsm | 2 +- .../resistfingerprinting/LanguagePrompt.jsm | 2 +- .../components/satchel/AutoCompletePopup.jsm | 2 +- toolkit/components/satchel/FormHistory.jsm | 6 +- .../satchel/nsFormAutoCompleteResult.jsm | 20 +++---- .../components/search/SearchStaticData.jsm | 4 +- .../search/SearchSuggestionController.jsm | 6 +- toolkit/components/telemetry/GCTelemetry.jsm | 2 +- .../components/telemetry/TelemetryArchive.jsm | 4 +- .../telemetry/TelemetryController.jsm | 4 +- .../telemetry/TelemetryEnvironment.jsm | 4 +- .../telemetry/TelemetryHealthPing.jsm | 4 +- toolkit/components/telemetry/TelemetryLog.jsm | 4 +- .../components/telemetry/TelemetryModules.jsm | 4 +- .../telemetry/TelemetryReportingPolicy.jsm | 4 +- .../components/telemetry/TelemetrySend.jsm | 4 +- .../components/telemetry/TelemetrySession.jsm | 4 +- .../telemetry/TelemetryStopwatch.jsm | 6 +- .../components/telemetry/TelemetryStorage.jsm | 4 +- .../telemetry/TelemetryTimestamps.jsm | 4 +- .../components/telemetry/TelemetryUtils.jsm | 4 +- toolkit/components/telemetry/UITelemetry.jsm | 4 +- toolkit/components/telemetry/UpdatePing.jsm | 4 +- .../hybrid-content/HybridContentTelemetry.jsm | 2 +- .../tests/unit/TelemetryArchiveTesting.jsm | 2 +- .../components/thumbnails/PageThumbUtils.jsm | 4 +- toolkit/components/thumbnails/PageThumbs.jsm | 6 +- .../url-classifier/SafeBrowsing.jsm | 4 +- .../tests/UrlClassifierTestUtils.jsm | 4 +- .../viewsource/ViewSourceBrowser.jsm | 6 +- toolkit/crashreporter/CrashReports.jsm | 4 +- toolkit/crashreporter/CrashSubmit.jsm | 4 +- toolkit/crashreporter/KeyValueParser.jsm | 16 +++--- toolkit/crashreporter/test/CrashTestUtils.jsm | 4 +- toolkit/forgetaboutsite/ForgetAboutSite.jsm | 4 +- toolkit/modules/AppMenuNotifications.jsm | 2 +- toolkit/modules/AsyncPrefs.jsm | 2 +- toolkit/modules/Battery.jsm | 8 +-- toolkit/modules/BinarySearch.jsm | 4 +- toolkit/modules/BrowserUtils.jsm | 4 +- toolkit/modules/CanonicalJSON.jsm | 4 +- toolkit/modules/CertUtils.jsm | 22 +++----- toolkit/modules/CharsetMenu.jsm | 2 +- toolkit/modules/ClientID.jsm | 4 +- toolkit/modules/Color.jsm | 2 +- toolkit/modules/Console.jsm | 5 +- toolkit/modules/DateTimePickerHelper.jsm | 4 +- toolkit/modules/DeferredTask.jsm | 4 +- toolkit/modules/Deprecated.jsm | 4 +- toolkit/modules/E10SUtils.jsm | 4 +- toolkit/modules/EventEmitter.jsm | 2 +- toolkit/modules/FileUtils.jsm | 4 +- toolkit/modules/Finder.jsm | 4 +- toolkit/modules/FinderHighlighter.jsm | 2 +- toolkit/modules/FinderIterator.jsm | 4 +- toolkit/modules/FormLikeFactory.jsm | 2 +- toolkit/modules/GMPInstallManager.jsm | 6 +- toolkit/modules/GMPUtils.jsm | 14 ++--- toolkit/modules/Geometry.jsm | 10 ++-- toolkit/modules/HiddenFrame.jsm | 2 +- toolkit/modules/InlineSpellChecker.jsm | 8 +-- toolkit/modules/InlineSpellCheckerContent.jsm | 2 +- toolkit/modules/Integration.jsm | 6 +- toolkit/modules/JSONFile.jsm | 2 +- toolkit/modules/LightweightThemeConsumer.jsm | 7 +-- toolkit/modules/Log.jsm | 4 +- toolkit/modules/Memory.jsm | 4 +- toolkit/modules/NLP.jsm | 4 +- toolkit/modules/NewTabUtils.jsm | 4 +- toolkit/modules/ObjectUtils.jsm | 4 +- toolkit/modules/PageMenu.jsm | 14 ++--- toolkit/modules/PageMetadata.jsm | 4 +- toolkit/modules/PermissionsUtils.jsm | 4 +- toolkit/modules/PopupNotifications.jsm | 6 +- toolkit/modules/Preferences.jsm | 27 +++++---- toolkit/modules/PrivateBrowsingUtils.jsm | 4 +- toolkit/modules/ProfileAge.jsm | 4 +- toolkit/modules/PromiseMessage.jsm | 2 +- toolkit/modules/PromiseUtils.jsm | 4 +- toolkit/modules/PropertyListUtils.jsm | 4 +- toolkit/modules/RemoteFinder.jsm | 2 +- toolkit/modules/RemotePageManager.jsm | 6 +- toolkit/modules/RemoteSecurityUI.jsm | 2 +- toolkit/modules/RemoteWebProgress.jsm | 2 +- toolkit/modules/ResetProfile.jsm | 4 +- toolkit/modules/ResponsivenessMonitor.jsm | 2 +- toolkit/modules/SelectContentHelper.jsm | 4 +- toolkit/modules/SelectParentHelper.jsm | 4 +- toolkit/modules/ServiceRequest.jsm | 2 +- toolkit/modules/Services.jsm | 4 +- toolkit/modules/ShortcutUtils.jsm | 3 +- toolkit/modules/Sqlite.jsm | 4 +- toolkit/modules/Task.jsm | 4 +- toolkit/modules/Timer.jsm | 22 ++++---- toolkit/modules/Troubleshoot.jsm | 4 +- toolkit/modules/UpdateUtils.jsm | 4 +- toolkit/modules/WebChannel.jsm | 4 +- toolkit/modules/WindowDraggingUtils.jsm | 6 +- toolkit/modules/WindowsRegistry.jsm | 2 +- toolkit/modules/ZipUtils.jsm | 4 +- toolkit/modules/addons/MatchURLFilters.jsm | 2 +- toolkit/modules/css-selector.js | 2 +- toolkit/modules/debug.js | 6 +- toolkit/modules/secondscreen/RokuApp.jsm | 2 +- .../secondscreen/SimpleServiceDiscovery.jsm | 2 +- toolkit/modules/sessionstore/FormData.jsm | 4 +- toolkit/modules/sessionstore/PrivacyLevel.jsm | 2 +- .../modules/sessionstore/ScrollPosition.jsm | 4 +- .../modules/sessionstore/SessionHistory.jsm | 4 +- toolkit/modules/sessionstore/Utils.jsm | 4 +- .../modules/tests/modules/MockDocument.jsm | 2 +- .../tests/modules/PromiseTestUtils.jsm | 4 +- .../tests/xpcshell/TestIntegration.jsm | 4 +- toolkit/modules/third_party/jsesc/jsesc.js | 2 +- toolkit/mozapps/downloads/DownloadLastDir.jsm | 6 +- toolkit/mozapps/downloads/DownloadUtils.jsm | 4 +- toolkit/mozapps/extensions/AddonManager.jsm | 6 +- .../extensions/ChromeManifestParser.jsm | 4 +- .../extensions/LightweightThemeManager.jsm | 4 +- .../extensions/internal/AddonRepository.jsm | 4 +- .../extensions/internal/AddonSettings.jsm | 4 +- .../internal/AddonUpdateChecker.jsm | 4 +- .../extensions/internal/GMPProvider.jsm | 2 +- .../LightweightThemeImageOptimizer.jsm | 4 +- .../extensions/internal/PluginProvider.jsm | 2 +- .../internal/ProductAddonChecker.jsm | 2 +- .../extensions/internal/XPIInstall.jsm | 14 ++--- .../extensions/internal/XPIProvider.jsm | 8 +-- .../extensions/test/AddonManagerTesting.jsm | 4 +- .../test/addons/test_bootstrap1_1/version.jsm | 4 +- .../test/addons/test_bootstrap1_2/version.jsm | 4 +- .../test/addons/test_bootstrap1_3/version.jsm | 4 +- .../test/xpcshell/data/BootstrapMonitor.jsm | 4 +- toolkit/mozapps/update/UpdateListener.jsm | 2 +- toolkit/mozapps/update/UpdateTelemetry.jsm | 4 +- .../tests/HandlerServiceTestUtils.jsm | 4 +- 609 files changed, 1320 insertions(+), 1348 deletions(-) diff --git a/accessible/jsat/AccessFu.jsm b/accessible/jsat/AccessFu.jsm index 5b6adb2d228a4..c5b56e2650afc 100644 --- a/accessible/jsat/AccessFu.jsm +++ b/accessible/jsat/AccessFu.jsm @@ -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 diff --git a/accessible/jsat/Constants.jsm b/accessible/jsat/Constants.jsm index ec480deaafe0f..d5aa9a84ceb8e 100644 --- a/accessible/jsat/Constants.jsm +++ b/accessible/jsat/Constants.jsm @@ -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; diff --git a/accessible/jsat/ContentControl.jsm b/accessible/jsat/ContentControl.jsm index 0d25f21c25cd7..02993d78f8488 100644 --- a/accessible/jsat/ContentControl.jsm +++ b/accessible/jsat/ContentControl.jsm @@ -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", diff --git a/accessible/jsat/EventManager.jsm b/accessible/jsat/EventManager.jsm index 5a058a95531d5..6d000f0390c07 100644 --- a/accessible/jsat/EventManager.jsm +++ b/accessible/jsat/EventManager.jsm @@ -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 }, diff --git a/accessible/jsat/Gestures.jsm b/accessible/jsat/Gestures.jsm index fbe4953d4142f..d24816cc7881a 100644 --- a/accessible/jsat/Gestures.jsm +++ b/accessible/jsat/Gestures.jsm @@ -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] diff --git a/accessible/jsat/OutputGenerator.jsm b/accessible/jsat/OutputGenerator.jsm index 4179d5fa52fc1..62ca4923ea8e1 100644 --- a/accessible/jsat/OutputGenerator.jsm +++ b/accessible/jsat/OutputGenerator.jsm @@ -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) { diff --git a/accessible/jsat/PointerAdapter.jsm b/accessible/jsat/PointerAdapter.jsm index 30801a3df9933..ef6dd09b31473 100644 --- a/accessible/jsat/PointerAdapter.jsm +++ b/accessible/jsat/PointerAdapter.jsm @@ -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(); diff --git a/accessible/jsat/Presentation.jsm b/accessible/jsat/Presentation.jsm index f57aca341ef56..131d98cc45bd8 100644 --- a/accessible/jsat/Presentation.jsm +++ b/accessible/jsat/Presentation.jsm @@ -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 = { diff --git a/accessible/jsat/Traversal.jsm b/accessible/jsat/Traversal.jsm index 3315410ac2b0f..c8224febc8ede 100644 --- a/accessible/jsat/Traversal.jsm +++ b/accessible/jsat/Traversal.jsm @@ -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() { diff --git a/accessible/jsat/Utils.jsm b/accessible/jsat/Utils.jsm index a90cf544b3c79..2fbcde34d3cc7 100644 --- a/accessible/jsat/Utils.jsm +++ b/accessible/jsat/Utils.jsm @@ -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) { diff --git a/browser/base/content/test/urlbar/Panel.jsm b/browser/base/content/test/urlbar/Panel.jsm index f1a72290a91fc..da2ef454bd466 100644 --- a/browser/base/content/test/urlbar/Panel.jsm +++ b/browser/base/content/test/urlbar/Panel.jsm @@ -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(); diff --git a/browser/components/customizableui/CustomizableUI.jsm b/browser/components/customizableui/CustomizableUI.jsm index 9e5bb34c1c285..17b5bc82df8f1 100644 --- a/browser/components/customizableui/CustomizableUI.jsm +++ b/browser/components/customizableui/CustomizableUI.jsm @@ -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. */ diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index c87333d721b9f..aff8d54f15ad1 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -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"); diff --git a/browser/components/customizableui/CustomizeMode.jsm b/browser/components/customizableui/CustomizeMode.jsm index cb560e5619d0d..4f2ffaa4fba5a 100644 --- a/browser/components/customizableui/CustomizeMode.jsm +++ b/browser/components/customizableui/CustomizeMode.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["CustomizeMode"]; +var EXPORTED_SYMBOLS = ["CustomizeMode"]; const kPrefCustomizationDebug = "browser.uiCustomization.debug"; const kPaletteId = "customization-palette"; diff --git a/browser/components/customizableui/DragPositionManager.jsm b/browser/components/customizableui/DragPositionManager.jsm index 9b0e50cdf88c7..31f3a1440ee7d 100644 --- a/browser/components/customizableui/DragPositionManager.jsm +++ b/browser/components/customizableui/DragPositionManager.jsm @@ -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: diff --git a/browser/components/customizableui/PanelMultiView.jsm b/browser/components/customizableui/PanelMultiView.jsm index 0f58617946b9d..e0defbc705554 100644 --- a/browser/components/customizableui/PanelMultiView.jsm +++ b/browser/components/customizableui/PanelMultiView.jsm @@ -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 elements by the panelUI.xml binding. */ -this.PanelMultiView = class extends this.AssociatedToNode { +var PanelMultiView = class extends this.AssociatedToNode { /** * Tries to open the specified and displays the main view specified * with the "mainViewId" attribute on the node it contains. @@ -1116,7 +1116,7 @@ this.PanelMultiView = class extends this.AssociatedToNode { /** * This is associated to 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 is diff --git a/browser/components/customizableui/ScrollbarSampler.jsm b/browser/components/customizableui/ScrollbarSampler.jsm index 360d3ea1db08b..112361cda927d 100644 --- a/browser/components/customizableui/ScrollbarSampler.jsm +++ b/browser/components/customizableui/ScrollbarSampler.jsm @@ -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); diff --git a/browser/components/customizableui/SearchWidgetTracker.jsm b/browser/components/customizableui/SearchWidgetTracker.jsm index aff1ffd18cef2..7aad470de608c 100644 --- a/browser/components/customizableui/SearchWidgetTracker.jsm +++ b/browser/components/customizableui/SearchWidgetTracker.jsm @@ -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"); diff --git a/browser/components/distribution.js b/browser/components/distribution.js index b9d1459985a86..ade388662c414 100644 --- a/browser/components/distribution.js +++ b/browser/components/distribution.js @@ -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() { diff --git a/browser/components/downloads/DownloadsCommon.jsm b/browser/components/downloads/DownloadsCommon.jsm index b29313a41858c..7473135a11a4f 100644 --- a/browser/components/downloads/DownloadsCommon.jsm +++ b/browser/components/downloads/DownloadsCommon.jsm @@ -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, diff --git a/browser/components/downloads/DownloadsSubview.jsm b/browser/components/downloads/DownloadsSubview.jsm index e97f21242a974..e5e2ad6ddd66f 100644 --- a/browser/components/downloads/DownloadsSubview.jsm +++ b/browser/components/downloads/DownloadsSubview.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadsSubview", ]; diff --git a/browser/components/downloads/DownloadsTaskbar.jsm b/browser/components/downloads/DownloadsTaskbar.jsm index cf2d4cdf5d65e..3149eb6ab1deb 100644 --- a/browser/components/downloads/DownloadsTaskbar.jsm +++ b/browser/components/downloads/DownloadsTaskbar.jsm @@ -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. diff --git a/browser/components/downloads/DownloadsViewUI.jsm b/browser/components/downloads/DownloadsViewUI.jsm index 65f02638889a5..4736e2c11a64e 100644 --- a/browser/components/downloads/DownloadsViewUI.jsm +++ b/browser/components/downloads/DownloadsViewUI.jsm @@ -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. diff --git a/browser/components/enterprisepolicies/Policies.jsm b/browser/components/enterprisepolicies/Policies.jsm index 6391b431c0b44..b3822ba8a1861 100644 --- a/browser/components/enterprisepolicies/Policies.jsm +++ b/browser/components/enterprisepolicies/Policies.jsm @@ -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) { diff --git a/browser/components/enterprisepolicies/PoliciesValidator.jsm b/browser/components/enterprisepolicies/PoliciesValidator.jsm index 6b97d45718f31..44583fe186aab 100644 --- a/browser/components/enterprisepolicies/PoliciesValidator.jsm +++ b/browser/components/enterprisepolicies/PoliciesValidator.jsm @@ -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); } diff --git a/browser/components/enterprisepolicies/WindowsGPOParser.jsm b/browser/components/enterprisepolicies/WindowsGPOParser.jsm index e864859da3c9f..d8e7b6abbd8e5 100644 --- a/browser/components/enterprisepolicies/WindowsGPOParser.jsm +++ b/browser/components/enterprisepolicies/WindowsGPOParser.jsm @@ -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) { diff --git a/browser/components/migration/.eslintrc.js b/browser/components/migration/.eslintrc.js index 3ac4b3e854d0e..7dfa6ad0e5fa1 100644 --- a/browser/components/migration/.eslintrc.js +++ b/browser/components/migration/.eslintrc.js @@ -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"], diff --git a/browser/components/migration/AutoMigrate.jsm b/browser/components/migration/AutoMigrate.jsm index 570cdd65f52d0..00eb14af0b32d 100644 --- a/browser/components/migration/AutoMigrate.jsm +++ b/browser/components/migration/AutoMigrate.jsm @@ -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"; diff --git a/browser/components/migration/ChromeMigrationUtils.jsm b/browser/components/migration/ChromeMigrationUtils.jsm index 4f0535e821caa..3ca330464ac8e 100644 --- a/browser/components/migration/ChromeMigrationUtils.jsm +++ b/browser/components/migration/ChromeMigrationUtils.jsm @@ -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: {}, diff --git a/browser/components/migration/ESEDBReader.jsm b/browser/components/migration/ESEDBReader.jsm index ba8fa9d6f8700..b7c5e0dc0d6d8 100644 --- a/browser/components/migration/ESEDBReader.jsm +++ b/browser/components/migration/ESEDBReader.jsm @@ -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"); diff --git a/browser/components/migration/MSMigrationUtils.jsm b/browser/components/migration/MSMigrationUtils.jsm index eb17c8529acb2..318e69548fe29 100644 --- a/browser/components/migration/MSMigrationUtils.jsm +++ b/browser/components/migration/MSMigrationUtils.jsm @@ -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"); diff --git a/browser/components/migration/MigrationUtils.jsm b/browser/components/migration/MigrationUtils.jsm index 3b4956904cfbf..830505e45a4d8 100644 --- a/browser/components/migration/MigrationUtils.jsm +++ b/browser/components/migration/MigrationUtils.jsm @@ -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, diff --git a/browser/components/newtab/NewTabPrefsProvider.jsm b/browser/components/newtab/NewTabPrefsProvider.jsm index 204c6b7606b54..f584d244fa091 100644 --- a/browser/components/newtab/NewTabPrefsProvider.jsm +++ b/browser/components/newtab/NewTabPrefsProvider.jsm @@ -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"); diff --git a/browser/components/newtab/NewTabRemoteResources.jsm b/browser/components/newtab/NewTabRemoteResources.jsm index 57351b15c511a..9dc8cb55aced5 100644 --- a/browser/components/newtab/NewTabRemoteResources.jsm +++ b/browser/components/newtab/NewTabRemoteResources.jsm @@ -2,7 +2,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["NewTabRemoteResources"]; +var EXPORTED_SYMBOLS = ["NewTabRemoteResources"]; const NewTabRemoteResources = { MODE_CHANNEL_MAP: { diff --git a/browser/components/newtab/NewTabSearchProvider.jsm b/browser/components/newtab/NewTabSearchProvider.jsm index 057724862c734..63f6a63ff426b 100644 --- a/browser/components/newtab/NewTabSearchProvider.jsm +++ b/browser/components/newtab/NewTabSearchProvider.jsm @@ -1,6 +1,6 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["NewTabSearchProvider"]; +var EXPORTED_SYMBOLS = ["NewTabSearchProvider"]; const CURRENT_ENGINE = "browser-search-engine-modified"; diff --git a/browser/components/newtab/NewTabWebChannel.jsm b/browser/components/newtab/NewTabWebChannel.jsm index 173e77b2a7af8..b698128bb6196 100644 --- a/browser/components/newtab/NewTabWebChannel.jsm +++ b/browser/components/newtab/NewTabWebChannel.jsm @@ -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"); diff --git a/browser/components/places/PlacesUIUtils.jsm b/browser/components/places/PlacesUIUtils.jsm index b6c0b0d9eecf9..3d5f805af7055 100644 --- a/browser/components/places/PlacesUIUtils.jsm +++ b/browser/components/places/PlacesUIUtils.jsm @@ -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", diff --git a/browser/components/preferences/SiteDataManager.jsm b/browser/components/preferences/SiteDataManager.jsm index 126b11a0c1724..b29f496326ae9 100644 --- a/browser/components/preferences/SiteDataManager.jsm +++ b/browser/components/preferences/SiteDataManager.jsm @@ -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, diff --git a/browser/components/sessionstore/ContentRestore.jsm b/browser/components/sessionstore/ContentRestore.jsm index 94e5baf007bde..5e11aa9a14bcf 100644 --- a/browser/components/sessionstore/ContentRestore.jsm +++ b/browser/components/sessionstore/ContentRestore.jsm @@ -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); diff --git a/browser/components/sessionstore/DocShellCapabilities.jsm b/browser/components/sessionstore/DocShellCapabilities.jsm index 64c2d0c2136ed..df2994a823bc1 100644 --- a/browser/components/sessionstore/DocShellCapabilities.jsm +++ b/browser/components/sessionstore/DocShellCapabilities.jsm @@ -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); }, diff --git a/browser/components/sessionstore/GlobalState.jsm b/browser/components/sessionstore/GlobalState.jsm index 6e85cd64ad9f2..ebf3cab094d24 100644 --- a/browser/components/sessionstore/GlobalState.jsm +++ b/browser/components/sessionstore/GlobalState.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GlobalState"]; +var EXPORTED_SYMBOLS = ["GlobalState"]; const EXPORTED_METHODS = ["getState", "clear", "get", "set", "delete", "setFromState"]; /** diff --git a/browser/components/sessionstore/PrivacyFilter.jsm b/browser/components/sessionstore/PrivacyFilter.jsm index 9965021514126..0c151e7f75e74 100644 --- a/browser/components/sessionstore/PrivacyFilter.jsm +++ b/browser/components/sessionstore/PrivacyFilter.jsm @@ -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 diff --git a/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm b/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm index 4e6099f14d8f5..0d943b2f621bd 100644 --- a/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm +++ b/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm @@ -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. diff --git a/browser/components/sessionstore/RunState.jsm b/browser/components/sessionstore/RunState.jsm index 3cdf47718a4f0..64be1a9b05d72 100644 --- a/browser/components/sessionstore/RunState.jsm +++ b/browser/components/sessionstore/RunState.jsm @@ -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. diff --git a/browser/components/sessionstore/SessionCookies.jsm b/browser/components/sessionstore/SessionCookies.jsm index 69b58b1079755..580eb61c2653f 100644 --- a/browser/components/sessionstore/SessionCookies.jsm +++ b/browser/components/sessionstore/SessionCookies.jsm @@ -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(); }, diff --git a/browser/components/sessionstore/SessionFile.jsm b/browser/components/sessionstore/SessionFile.jsm index ed8283c31cedc..3a8e822e315ad 100644 --- a/browser/components/sessionstore/SessionFile.jsm +++ b/browser/components/sessionstore/SessionFile.jsm @@ -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. */ diff --git a/browser/components/sessionstore/SessionMigration.jsm b/browser/components/sessionstore/SessionMigration.jsm index 7951c03407a66..70e9ac1996f4a 100644 --- a/browser/components/sessionstore/SessionMigration.jsm +++ b/browser/components/sessionstore/SessionMigration.jsm @@ -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); diff --git a/browser/components/sessionstore/SessionSaver.jsm b/browser/components/sessionstore/SessionSaver.jsm index 735a49b23ae62..8fc35f316afe7 100644 --- a/browser/components/sessionstore/SessionSaver.jsm +++ b/browser/components/sessionstore/SessionSaver.jsm @@ -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. */ diff --git a/browser/components/sessionstore/SessionStorage.jsm b/browser/components/sessionstore/SessionStorage.jsm index 5035b4c17b43e..7069f6ec6f6ba 100644 --- a/browser/components/sessionstore/SessionStorage.jsm +++ b/browser/components/sessionstore/SessionStorage.jsm @@ -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 diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index 5626bf5dda61f..9f517c125fb21 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -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; }, diff --git a/browser/components/sessionstore/SessionWorker.jsm b/browser/components/sessionstore/SessionWorker.jsm index 4915e18ce1e1b..35f3add7c5fb2 100644 --- a/browser/components/sessionstore/SessionWorker.jsm +++ b/browser/components/sessionstore/SessionWorker.jsm @@ -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; diff --git a/browser/components/sessionstore/StartupPerformance.jsm b/browser/components/sessionstore/StartupPerformance.jsm index 85aef6144d7f2..a4f82da298917 100644 --- a/browser/components/sessionstore/StartupPerformance.jsm +++ b/browser/components/sessionstore/StartupPerformance.jsm @@ -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. */ diff --git a/browser/components/sessionstore/TabAttributes.jsm b/browser/components/sessionstore/TabAttributes.jsm index 46b1eb498b83b..51182388f2816 100644 --- a/browser/components/sessionstore/TabAttributes.jsm +++ b/browser/components/sessionstore/TabAttributes.jsm @@ -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); }, diff --git a/browser/components/sessionstore/TabState.jsm b/browser/components/sessionstore/TabState.jsm index 157d4bf77e943..2f7cebcc4b071 100644 --- a/browser/components/sessionstore/TabState.jsm +++ b/browser/components/sessionstore/TabState.jsm @@ -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); }, diff --git a/browser/components/sessionstore/TabStateCache.jsm b/browser/components/sessionstore/TabStateCache.jsm index c65cb010c916e..8556164dab9cf 100644 --- a/browser/components/sessionstore/TabStateCache.jsm +++ b/browser/components/sessionstore/TabStateCache.jsm @@ -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|. * diff --git a/browser/components/sessionstore/TabStateFlusher.jsm b/browser/components/sessionstore/TabStateFlusher.jsm index a545c8b23ec41..85c372e8dd595 100644 --- a/browser/components/sessionstore/TabStateFlusher.jsm +++ b/browser/components/sessionstore/TabStateFlusher.jsm @@ -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 diff --git a/browser/components/shell/ShellService.jsm b/browser/components/shell/ShellService.jsm index 25e0dc4f4067b..454c3bad2cc7b 100644 --- a/browser/components/shell/ShellService.jsm +++ b/browser/components/shell/ShellService.jsm @@ -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]; diff --git a/browser/components/syncedtabs/EventEmitter.jsm b/browser/components/syncedtabs/EventEmitter.jsm index c1ffe0cf351d6..46527ca0bd571 100644 --- a/browser/components/syncedtabs/EventEmitter.jsm +++ b/browser/components/syncedtabs/EventEmitter.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "EventEmitter" ]; diff --git a/browser/components/syncedtabs/SyncedTabsDeckComponent.js b/browser/components/syncedtabs/SyncedTabsDeckComponent.js index 6d1330c49d933..c8c54c3d950b2 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckComponent.js +++ b/browser/components/syncedtabs/SyncedTabsDeckComponent.js @@ -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" ]; diff --git a/browser/components/syncedtabs/SyncedTabsDeckStore.js b/browser/components/syncedtabs/SyncedTabsDeckStore.js index b3c52539dee77..748db362a157d 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckStore.js +++ b/browser/components/syncedtabs/SyncedTabsDeckStore.js @@ -6,7 +6,7 @@ let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {}); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "SyncedTabsDeckStore" ]; diff --git a/browser/components/syncedtabs/SyncedTabsDeckView.js b/browser/components/syncedtabs/SyncedTabsDeckView.js index 1ec1b550e5164..fbd0d64adf6f8 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckView.js +++ b/browser/components/syncedtabs/SyncedTabsDeckView.js @@ -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" ]; diff --git a/browser/components/syncedtabs/SyncedTabsListStore.js b/browser/components/syncedtabs/SyncedTabsListStore.js index 8a40c6db63daa..4d207e058d298 100644 --- a/browser/components/syncedtabs/SyncedTabsListStore.js +++ b/browser/components/syncedtabs/SyncedTabsListStore.js @@ -6,7 +6,7 @@ let { EventEmitter } = ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm", {}); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "SyncedTabsListStore" ]; diff --git a/browser/components/syncedtabs/TabListComponent.js b/browser/components/syncedtabs/TabListComponent.js index cd2a0f4cf4144..1813745598834 100644 --- a/browser/components/syncedtabs/TabListComponent.js +++ b/browser/components/syncedtabs/TabListComponent.js @@ -16,7 +16,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUIUtils", ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TabListComponent" ]; diff --git a/browser/components/syncedtabs/TabListView.js b/browser/components/syncedtabs/TabListView.js index 9169987f11f15..03960f521bea4 100644 --- a/browser/components/syncedtabs/TabListView.js +++ b/browser/components/syncedtabs/TabListView.js @@ -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" ]; diff --git a/browser/components/syncedtabs/util.js b/browser/components/syncedtabs/util.js index 6cca9fc438019..c0a27f7648515 100644 --- a/browser/components/syncedtabs/util.js +++ b/browser/components/syncedtabs/util.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "getChromeWindow" ]; diff --git a/browser/components/translation/BingTranslator.jsm b/browser/components/translation/BingTranslator.jsm index 7349e56ad1a83..e781fba929004 100644 --- a/browser/components/translation/BingTranslator.jsm +++ b/browser/components/translation/BingTranslator.jsm @@ -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; diff --git a/browser/components/translation/LanguageDetector.jsm b/browser/components/translation/LanguageDetector.jsm index c39eb60f13023..6b5c33eaedcef 100644 --- a/browser/components/translation/LanguageDetector.jsm +++ b/browser/components/translation/LanguageDetector.jsm @@ -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. * diff --git a/browser/components/translation/Translation.jsm b/browser/components/translation/Translation.jsm index cb0ab6a4374b5..1556d40fc3ab4 100644 --- a/browser/components/translation/Translation.jsm +++ b/browser/components/translation/Translation.jsm @@ -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. diff --git a/browser/components/translation/TranslationContentHandler.jsm b/browser/components/translation/TranslationContentHandler.jsm index bdba48b6dc8ad..a4e96f7f91c7b 100644 --- a/browser/components/translation/TranslationContentHandler.jsm +++ b/browser/components/translation/TranslationContentHandler.jsm @@ -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); diff --git a/browser/components/translation/TranslationDocument.jsm b/browser/components/translation/TranslationDocument.jsm index 5f4997d0e55d6..09941a3d5fa6f 100644 --- a/browser/components/translation/TranslationDocument.jsm +++ b/browser/components/translation/TranslationDocument.jsm @@ -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); diff --git a/browser/components/translation/YandexTranslator.jsm b/browser/components/translation/YandexTranslator.jsm index 81e56ad6d8e5f..76461069130ff 100644 --- a/browser/components/translation/YandexTranslator.jsm +++ b/browser/components/translation/YandexTranslator.jsm @@ -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; diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index 2b170a4d913a8..136bd6db78b74 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -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 diff --git a/browser/experiments/Experiments.jsm b/browser/experiments/Experiments.jsm index 20104b6512468..ce9f5f88c0ced 100644 --- a/browser/experiments/Experiments.jsm +++ b/browser/experiments/Experiments.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Experiments", ]; diff --git a/browser/extensions/activity-stream/common/Actions.jsm b/browser/extensions/activity-stream/common/Actions.jsm index 80fcfc52b99cd..6dab7db629a35 100644 --- a/browser/extensions/activity-stream/common/Actions.jsm +++ b/browser/extensions/activity-stream/common/Actions.jsm @@ -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", diff --git a/browser/extensions/activity-stream/common/Dedupe.jsm b/browser/extensions/activity-stream/common/Dedupe.jsm index 6a56e2f5fd8e7..bc0c359bbd38c 100644 --- a/browser/extensions/activity-stream/common/Dedupe.jsm +++ b/browser/extensions/activity-stream/common/Dedupe.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/common/PerfService.jsm b/browser/extensions/activity-stream/common/PerfService.jsm index 35da40e9a6fdc..01e9d64ab9dc2 100644 --- a/browser/extensions/activity-stream/common/PerfService.jsm +++ b/browser/extensions/activity-stream/common/PerfService.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/common/PrerenderData.jsm b/browser/extensions/activity-stream/common/PrerenderData.jsm index 16ea3c475f79e..7992c6c094432 100644 --- a/browser/extensions/activity-stream/common/PrerenderData.jsm +++ b/browser/extensions/activity-stream/common/PrerenderData.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/common/Reducers.jsm b/browser/extensions/activity-stream/common/Reducers.jsm index 964c666964877..9af57e3ac1685 100644 --- a/browser/extensions/activity-stream/common/Reducers.jsm +++ b/browser/extensions/activity-stream/common/Reducers.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/ActivityStream.jsm b/browser/extensions/activity-stream/lib/ActivityStream.jsm index 7458429251a0d..940e0bb7548a4 100644 --- a/browser/extensions/activity-stream/lib/ActivityStream.jsm +++ b/browser/extensions/activity-stream/lib/ActivityStream.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/ActivityStreamMessageChannel.jsm b/browser/extensions/activity-stream/lib/ActivityStreamMessageChannel.jsm index eef46ebc75ebf..1ee4e1214b69e 100644 --- a/browser/extensions/activity-stream/lib/ActivityStreamMessageChannel.jsm +++ b/browser/extensions/activity-stream/lib/ActivityStreamMessageChannel.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/ActivityStreamPrefs.jsm b/browser/extensions/activity-stream/lib/ActivityStreamPrefs.jsm index 760d8882c895a..ffb6db3ae324f 100644 --- a/browser/extensions/activity-stream/lib/ActivityStreamPrefs.jsm +++ b/browser/extensions/activity-stream/lib/ActivityStreamPrefs.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/FaviconFeed.jsm b/browser/extensions/activity-stream/lib/FaviconFeed.jsm index 6a3fa4294c123..7b5a08766df1b 100644 --- a/browser/extensions/activity-stream/lib/FaviconFeed.jsm +++ b/browser/extensions/activity-stream/lib/FaviconFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/FilterAdult.jsm b/browser/extensions/activity-stream/lib/FilterAdult.jsm index 32ad7bc874f94..59d812a110e78 100644 --- a/browser/extensions/activity-stream/lib/FilterAdult.jsm +++ b/browser/extensions/activity-stream/lib/FilterAdult.jsm @@ -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 diff --git a/browser/extensions/activity-stream/lib/HighlightsFeed.jsm b/browser/extensions/activity-stream/lib/HighlightsFeed.jsm index 9ff434fffeea1..048b6444abaf7 100644 --- a/browser/extensions/activity-stream/lib/HighlightsFeed.jsm +++ b/browser/extensions/activity-stream/lib/HighlightsFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/LinksCache.jsm b/browser/extensions/activity-stream/lib/LinksCache.jsm index 8aacd56b7ce52..1b402573daf45 100644 --- a/browser/extensions/activity-stream/lib/LinksCache.jsm +++ b/browser/extensions/activity-stream/lib/LinksCache.jsm @@ -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. * diff --git a/browser/extensions/activity-stream/lib/ManualMigration.jsm b/browser/extensions/activity-stream/lib/ManualMigration.jsm index 31018532c00f2..35f15051ce752 100644 --- a/browser/extensions/activity-stream/lib/ManualMigration.jsm +++ b/browser/extensions/activity-stream/lib/ManualMigration.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/NewTabInit.jsm b/browser/extensions/activity-stream/lib/NewTabInit.jsm index 4d34d57740cee..adcdb10d4dc78 100644 --- a/browser/extensions/activity-stream/lib/NewTabInit.jsm +++ b/browser/extensions/activity-stream/lib/NewTabInit.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/PersistentCache.jsm b/browser/extensions/activity-stream/lib/PersistentCache.jsm index 90441895bf0cf..f4380c8f28144 100644 --- a/browser/extensions/activity-stream/lib/PersistentCache.jsm +++ b/browser/extensions/activity-stream/lib/PersistentCache.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/PlacesFeed.jsm b/browser/extensions/activity-stream/lib/PlacesFeed.jsm index 93392019fa1d7..eaf783c245123 100644 --- a/browser/extensions/activity-stream/lib/PlacesFeed.jsm +++ b/browser/extensions/activity-stream/lib/PlacesFeed.jsm @@ -311,4 +311,4 @@ this.PlacesFeed = PlacesFeed; PlacesFeed.HistoryObserver = HistoryObserver; PlacesFeed.BookmarksObserver = BookmarksObserver; -this.EXPORTED_SYMBOLS = ["PlacesFeed"]; +var EXPORTED_SYMBOLS = ["PlacesFeed"]; diff --git a/browser/extensions/activity-stream/lib/PrefsFeed.jsm b/browser/extensions/activity-stream/lib/PrefsFeed.jsm index dee242fd011d0..4b4a6954f3445 100644 --- a/browser/extensions/activity-stream/lib/PrefsFeed.jsm +++ b/browser/extensions/activity-stream/lib/PrefsFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/Screenshots.jsm b/browser/extensions/activity-stream/lib/Screenshots.jsm index 44f06adac1e6a..81f3610079a6c 100644 --- a/browser/extensions/activity-stream/lib/Screenshots.jsm +++ b/browser/extensions/activity-stream/lib/Screenshots.jsm @@ -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. diff --git a/browser/extensions/activity-stream/lib/SectionsManager.jsm b/browser/extensions/activity-stream/lib/SectionsManager.jsm index ba6768d9c4e91..c0ea5a66f59a8 100644 --- a/browser/extensions/activity-stream/lib/SectionsManager.jsm +++ b/browser/extensions/activity-stream/lib/SectionsManager.jsm @@ -356,4 +356,4 @@ class SectionsFeed { this.SectionsFeed = SectionsFeed; this.SectionsManager = SectionsManager; -this.EXPORTED_SYMBOLS = ["SectionsFeed", "SectionsManager"]; +var EXPORTED_SYMBOLS = ["SectionsFeed", "SectionsManager"]; diff --git a/browser/extensions/activity-stream/lib/ShortURL.jsm b/browser/extensions/activity-stream/lib/ShortURL.jsm index 2c914d088e5dd..f056bf13370b1 100644 --- a/browser/extensions/activity-stream/lib/ShortURL.jsm +++ b/browser/extensions/activity-stream/lib/ShortURL.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/SnippetsFeed.jsm b/browser/extensions/activity-stream/lib/SnippetsFeed.jsm index 30dc4eadb509d..fd8141c4b815a 100644 --- a/browser/extensions/activity-stream/lib/SnippetsFeed.jsm +++ b/browser/extensions/activity-stream/lib/SnippetsFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/Store.jsm b/browser/extensions/activity-stream/lib/Store.jsm index b3ff854bae260..ea2b1cb58ec8f 100644 --- a/browser/extensions/activity-stream/lib/Store.jsm +++ b/browser/extensions/activity-stream/lib/Store.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/SystemTickFeed.jsm b/browser/extensions/activity-stream/lib/SystemTickFeed.jsm index fbc98f1f043f6..540aa6f88cab2 100644 --- a/browser/extensions/activity-stream/lib/SystemTickFeed.jsm +++ b/browser/extensions/activity-stream/lib/SystemTickFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/TelemetryFeed.jsm b/browser/extensions/activity-stream/lib/TelemetryFeed.jsm index becdcfb9f922e..6a11e39f81667 100644 --- a/browser/extensions/activity-stream/lib/TelemetryFeed.jsm +++ b/browser/extensions/activity-stream/lib/TelemetryFeed.jsm @@ -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", diff --git a/browser/extensions/activity-stream/lib/TippyTopProvider.jsm b/browser/extensions/activity-stream/lib/TippyTopProvider.jsm index d33cd6be433d1..93167f782038a 100644 --- a/browser/extensions/activity-stream/lib/TippyTopProvider.jsm +++ b/browser/extensions/activity-stream/lib/TippyTopProvider.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/TopSitesFeed.jsm b/browser/extensions/activity-stream/lib/TopSitesFeed.jsm index 84d7063302ed1..c9097d63724b2 100644 --- a/browser/extensions/activity-stream/lib/TopSitesFeed.jsm +++ b/browser/extensions/activity-stream/lib/TopSitesFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/TopStoriesFeed.jsm b/browser/extensions/activity-stream/lib/TopStoriesFeed.jsm index b57dba56acb58..bf8e35254b4c6 100644 --- a/browser/extensions/activity-stream/lib/TopStoriesFeed.jsm +++ b/browser/extensions/activity-stream/lib/TopStoriesFeed.jsm @@ -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"]; diff --git a/browser/extensions/activity-stream/lib/UTEventReporting.jsm b/browser/extensions/activity-stream/lib/UTEventReporting.jsm index f916efcd17fe6..fbc37948a41d9 100644 --- a/browser/extensions/activity-stream/lib/UTEventReporting.jsm +++ b/browser/extensions/activity-stream/lib/UTEventReporting.jsm @@ -13,7 +13,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); */ const EXTRAS_FIELD_NAMES = ["addon_version", "session_id", "page", "user_prefs", "action_position"]; -this.UTEventReporting = class UTEventReporting { +var UTEventReporting = class UTEventReporting { constructor() { Services.telemetry.setEventRecordingEnabled("activity_stream", true); } @@ -56,4 +56,4 @@ this.UTEventReporting = class UTEventReporting { } }; -this.EXPORTED_SYMBOLS = ["UTEventReporting"]; +var EXPORTED_SYMBOLS = ["UTEventReporting"]; diff --git a/browser/extensions/activity-stream/lib/UserDomainAffinityProvider.jsm b/browser/extensions/activity-stream/lib/UserDomainAffinityProvider.jsm index ef3338b0d3fc7..b11f51c04cc64 100644 --- a/browser/extensions/activity-stream/lib/UserDomainAffinityProvider.jsm +++ b/browser/extensions/activity-stream/lib/UserDomainAffinityProvider.jsm @@ -72,7 +72,7 @@ function merge(...args) { * needs to be calculated every time the feed updates. Therefore allowing cache * lookups of scores[domain][parameterSet] is beneficial */ -this.UserDomainAffinityProvider = class UserDomainAffinityProvider { +var UserDomainAffinityProvider = class UserDomainAffinityProvider { constructor( timeSegments = DEFAULT_TIME_SEGMENTS, parameterSets = DEFAULT_PARAMETER_SETS, @@ -326,4 +326,4 @@ this.UserDomainAffinityProvider = class UserDomainAffinityProvider { } }; -this.EXPORTED_SYMBOLS = ["UserDomainAffinityProvider"]; +var EXPORTED_SYMBOLS = ["UserDomainAffinityProvider"]; diff --git a/browser/extensions/activity-stream/vendor/Redux.jsm b/browser/extensions/activity-stream/vendor/Redux.jsm index cea6096fd8fe1..3b5040d41defc 100644 --- a/browser/extensions/activity-stream/vendor/Redux.jsm +++ b/browser/extensions/activity-stream/vendor/Redux.jsm @@ -3,14 +3,14 @@ * * This file has been reformatted as a Javascript Core Module */ -this.EXPORTED_SYMBOLS = ["redux"]; +var EXPORTED_SYMBOLS = ["redux"]; // Defining these prevents redux from using indirect eval or `new // Function()` to get its global object. const self = this; this.Object = Object; -this.redux = +var redux = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; diff --git a/browser/extensions/formautofill/FormAutofillContent.jsm b/browser/extensions/formautofill/FormAutofillContent.jsm index 0d83877220bc8..bca4039fbb527 100644 --- a/browser/extensions/formautofill/FormAutofillContent.jsm +++ b/browser/extensions/formautofill/FormAutofillContent.jsm @@ -10,7 +10,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAutofillContent"]; +var EXPORTED_SYMBOLS = ["FormAutofillContent"]; const Cm = Components.manager; @@ -208,8 +208,6 @@ AutofillProfileAutoCompleteSearch.prototype = { }, }; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([AutofillProfileAutoCompleteSearch]); - let ProfileAutocomplete = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]), diff --git a/browser/extensions/formautofill/FormAutofillDoorhanger.jsm b/browser/extensions/formautofill/FormAutofillDoorhanger.jsm index 91068c2bfebf6..32d8dd5f49217 100644 --- a/browser/extensions/formautofill/FormAutofillDoorhanger.jsm +++ b/browser/extensions/formautofill/FormAutofillDoorhanger.jsm @@ -11,7 +11,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAutofillDoorhanger"]; +var EXPORTED_SYMBOLS = ["FormAutofillDoorhanger"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -19,7 +19,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://formautofill/FormAutofillUtils.jsm"); this.log = null; -FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); const GetStringFromName = FormAutofillUtils.stringBundle.GetStringFromName; const formatStringFromName = FormAutofillUtils.stringBundle.formatStringFromName; diff --git a/browser/extensions/formautofill/FormAutofillHandler.jsm b/browser/extensions/formautofill/FormAutofillHandler.jsm index f80b0b2fd8438..951231ef18612 100644 --- a/browser/extensions/formautofill/FormAutofillHandler.jsm +++ b/browser/extensions/formautofill/FormAutofillHandler.jsm @@ -10,7 +10,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAutofillHandler"]; +var EXPORTED_SYMBOLS = ["FormAutofillHandler"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -23,7 +23,7 @@ ChromeUtils.defineModuleGetter(this, "FormLikeFactory", "resource://gre/modules/FormLikeFactory.jsm"); this.log = null; -FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); const {FIELD_STATES} = FormAutofillUtils; diff --git a/browser/extensions/formautofill/FormAutofillHeuristics.jsm b/browser/extensions/formautofill/FormAutofillHeuristics.jsm index 723e68c6b7997..4781da40b6fc0 100644 --- a/browser/extensions/formautofill/FormAutofillHeuristics.jsm +++ b/browser/extensions/formautofill/FormAutofillHeuristics.jsm @@ -8,14 +8,14 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAutofillHeuristics", "LabelUtils"]; +var EXPORTED_SYMBOLS = ["FormAutofillHeuristics", "LabelUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://formautofill/FormAutofillUtils.jsm"); this.log = null; -FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); const PREF_HEURISTICS_ENABLED = "extensions.formautofill.heuristics.enabled"; const PREF_SECTION_ENABLED = "extensions.formautofill.section.enabled"; @@ -286,7 +286,7 @@ class FieldScanner { } } -this.LabelUtils = { +var LabelUtils = { // The tag name list is from Chromium except for "STYLE": // eslint-disable-next-line max-len // https://cs.chromium.org/chromium/src/components/autofill/content/renderer/form_autofill_util.cc?l=216&rcl=d33a171b7c308a64dc3372fac3da2179c63b419e diff --git a/browser/extensions/formautofill/FormAutofillNameUtils.jsm b/browser/extensions/formautofill/FormAutofillNameUtils.jsm index 00c04de3cd601..ad1c0974b010e 100644 --- a/browser/extensions/formautofill/FormAutofillNameUtils.jsm +++ b/browser/extensions/formautofill/FormAutofillNameUtils.jsm @@ -9,7 +9,7 @@ // Thus, we use |loadSubScript| to load the references instead. const NAME_REFERENCES = "chrome://formautofill/content/nameReferences.js"; -this.EXPORTED_SYMBOLS = ["FormAutofillNameUtils"]; +var EXPORTED_SYMBOLS = ["FormAutofillNameUtils"]; ChromeUtils.import("resource://formautofill/FormAutofillUtils.jsm"); diff --git a/browser/extensions/formautofill/FormAutofillParent.jsm b/browser/extensions/formautofill/FormAutofillParent.jsm index d103ee9cb9cec..1136f2e459ef3 100644 --- a/browser/extensions/formautofill/FormAutofillParent.jsm +++ b/browser/extensions/formautofill/FormAutofillParent.jsm @@ -29,7 +29,7 @@ // We expose a singleton from this module. Some tests may import the // constructor via a backstage pass. -this.EXPORTED_SYMBOLS = ["formAutofillParent"]; +var EXPORTED_SYMBOLS = ["formAutofillParent"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -46,7 +46,7 @@ ChromeUtils.defineModuleGetter(this, "RecentWindow", "resource:///modules/RecentWindow.jsm"); this.log = null; -FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); const { ENABLED_AUTOFILL_ADDRESSES_PREF, @@ -606,4 +606,4 @@ FormAutofillParent.prototype = { }, }; -this.formAutofillParent = new FormAutofillParent(); +var formAutofillParent = new FormAutofillParent(); diff --git a/browser/extensions/formautofill/FormAutofillPreferences.jsm b/browser/extensions/formautofill/FormAutofillPreferences.jsm index 18188518d0c89..a9b05f9c77cfa 100644 --- a/browser/extensions/formautofill/FormAutofillPreferences.jsm +++ b/browser/extensions/formautofill/FormAutofillPreferences.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAutofillPreferences"]; +var EXPORTED_SYMBOLS = ["FormAutofillPreferences"]; // Add addresses enabled flag in telemetry environment for recording the number of // users who disable/enable the address autofill feature. @@ -33,7 +33,7 @@ const { // users who disable/enable the credit card autofill feature. this.log = null; -FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); function FormAutofillPreferences() { this.bundle = Services.strings.createBundle(BUNDLE_URI); diff --git a/browser/extensions/formautofill/FormAutofillStorage.jsm b/browser/extensions/formautofill/FormAutofillStorage.jsm index 946c595edefc0..6edd6d0f990ef 100644 --- a/browser/extensions/formautofill/FormAutofillStorage.jsm +++ b/browser/extensions/formautofill/FormAutofillStorage.jsm @@ -121,7 +121,7 @@ // We expose a singleton from this module. Some tests may import the // constructor via a backstage pass. -this.EXPORTED_SYMBOLS = ["profileStorage"]; +var EXPORTED_SYMBOLS = ["profileStorage"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -1802,5 +1802,5 @@ FormAutofillStorage.prototype = { }; // The singleton exposed by this module. -this.profileStorage = new FormAutofillStorage( +var profileStorage = new FormAutofillStorage( OS.Path.join(OS.Constants.Path.profileDir, PROFILE_JSON_FILE_NAME)); diff --git a/browser/extensions/formautofill/FormAutofillSync.jsm b/browser/extensions/formautofill/FormAutofillSync.jsm index cea35497fdd93..4c9863e1ff7a1 100644 --- a/browser/extensions/formautofill/FormAutofillSync.jsm +++ b/browser/extensions/formautofill/FormAutofillSync.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AddressesEngine", "CreditCardsEngine"]; +var EXPORTED_SYMBOLS = ["AddressesEngine", "CreditCardsEngine"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/browser/extensions/formautofill/FormAutofillUtils.jsm b/browser/extensions/formautofill/FormAutofillUtils.jsm index f9c53dc28d941..aa623da88bc7e 100644 --- a/browser/extensions/formautofill/FormAutofillUtils.jsm +++ b/browser/extensions/formautofill/FormAutofillUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAutofillUtils", "AddressDataLoader"]; +var EXPORTED_SYMBOLS = ["FormAutofillUtils", "AddressDataLoader"]; const ADDRESS_METADATA_PATH = "resource://formautofill/addressmetadata/"; const ADDRESS_REFERENCES = "addressReferences.js"; @@ -843,7 +843,7 @@ this.FormAutofillUtils = { }; this.log = null; -this.FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +this.FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); XPCOMUtils.defineLazyGetter(FormAutofillUtils, "stringBundle", function() { return Services.strings.createBundle("chrome://formautofill/locale/formautofill.properties"); diff --git a/browser/extensions/formautofill/MasterPassword.jsm b/browser/extensions/formautofill/MasterPassword.jsm index fda4e02c64c73..826e14b4ae62e 100644 --- a/browser/extensions/formautofill/MasterPassword.jsm +++ b/browser/extensions/formautofill/MasterPassword.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "MasterPassword", ]; @@ -20,7 +20,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "cryptoSDR", "@mozilla.org/login-manager/crypto/SDR;1", Ci.nsILoginManagerCrypto); -this.MasterPassword = { +var MasterPassword = { get _token() { let tokendb = Cc["@mozilla.org/security/pk11tokendb;1"].createInstance(Ci.nsIPK11TokenDB); return tokendb.getInternalKeyToken(); diff --git a/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm b/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm index e74304e7e6e62..de00a3fce878c 100644 --- a/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm +++ b/browser/extensions/formautofill/ProfileAutoCompleteResult.jsm @@ -6,7 +6,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AddressResult", "CreditCardResult"]; +var EXPORTED_SYMBOLS = ["AddressResult", "CreditCardResult"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -15,7 +15,7 @@ ChromeUtils.import("resource://formautofill/FormAutofillUtils.jsm"); XPCOMUtils.defineLazyPreferenceGetter(this, "insecureWarningEnabled", "security.insecure_field_warning.contextual.enabled"); this.log = null; -FormAutofillUtils.defineLazyLogGetter(this, this.EXPORTED_SYMBOLS[0]); +FormAutofillUtils.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]); class ProfileAutoCompleteResult { constructor(searchString, focusedFieldName, allFieldNames, matchingProfiles, { diff --git a/browser/extensions/formautofill/phonenumberutils/PhoneNumber.jsm b/browser/extensions/formautofill/phonenumberutils/PhoneNumber.jsm index 24c1052fe33d5..8a9dba463826a 100644 --- a/browser/extensions/formautofill/phonenumberutils/PhoneNumber.jsm +++ b/browser/extensions/formautofill/phonenumberutils/PhoneNumber.jsm @@ -7,14 +7,14 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PhoneNumber"]; +var EXPORTED_SYMBOLS = ["PhoneNumber"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "PHONE_NUMBER_META_DATA", "resource://formautofill/phonenumberutils/PhoneNumberMetaData.jsm"); ChromeUtils.defineModuleGetter(this, "PhoneNumberNormalizer", "resource://formautofill/phonenumberutils/PhoneNumberNormalizer.jsm"); -this.PhoneNumber = (function(dataBase) { +var PhoneNumber = (function(dataBase) { const MAX_PHONE_NUMBER_LENGTH = 50; const NON_ALPHA_CHARS = /[^a-zA-Z]/g; const NON_DIALABLE_CHARS = /[^,#+\*\d]/g; diff --git a/browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm b/browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm index 14d6613acd8f1..77c7fb429b241 100644 --- a/browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm +++ b/browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm @@ -10,9 +10,9 @@ * in this version for now. */ -this.EXPORTED_SYMBOLS = ["PHONE_NUMBER_META_DATA"]; +var EXPORTED_SYMBOLS = ["PHONE_NUMBER_META_DATA"]; -this.PHONE_NUMBER_META_DATA = { +var PHONE_NUMBER_META_DATA = { "46": '["SE","00","0",null,null,"$NP$FG","\\\\d{6,12}","[1-35-9]\\\\d{5,11}|4\\\\d{6,8}",[["(8)(\\\\d{2,3})(\\\\d{2,3})(\\\\d{2})","$1-$2 $3 $4","8",null,"$1 $2 $3 $4"],["([1-69]\\\\d)(\\\\d{2,3})(\\\\d{2})(\\\\d{2})","$1-$2 $3 $4","1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90",null,"$1 $2 $3 $4"],["([1-469]\\\\d)(\\\\d{3})(\\\\d{2})","$1-$2 $3","1[136]|2[136]|3[356]|4[0246]|6[03]|90",null,"$1 $2 $3"],["(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})","$1-$2 $3 $4","1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])",null,"$1 $2 $3 $4"],["(\\\\d{3})(\\\\d{2,3})(\\\\d{2})","$1-$2 $3","1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])",null,"$1 $2 $3"],["(7\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})","$1-$2 $3 $4","7",null,"$1 $2 $3 $4"],["(77)(\\\\d{2})(\\\\d{2})","$1-$2$3","7",null,"$1 $2 $3"],["(20)(\\\\d{2,3})(\\\\d{2})","$1-$2 $3","20",null,"$1 $2 $3"],["(9[034]\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{3})","$1-$2 $3 $4","9[034]",null,"$1 $2 $3 $4"],["(9[034]\\\\d)(\\\\d{4})","$1-$2","9[034]",null,"$1 $2"],["(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})","$1-$2 $3 $4 $5","25[245]|67[3-6]",null,"$1 $2 $3 $4 $5"]]]', "299": '["GL","00",null,null,null,null,"\\\\d{6}","[1-689]\\\\d{5}",[["(\\\\d{2})(\\\\d{2})(\\\\d{2})","$1 $2 $3",null,null]]]', "385": '["HR","00","0",null,null,"$NP$FG","\\\\d{6,9}","[1-7]\\\\d{5,8}|[89]\\\\d{6,8}",[["(1)(\\\\d{4})(\\\\d{3})","$1 $2 $3","1",null],["([2-5]\\\\d)(\\\\d{3})(\\\\d{3,4})","$1 $2 $3","[2-5]",null],["(9\\\\d)(\\\\d{3})(\\\\d{3,4})","$1 $2 $3","9",null],["(6[01])(\\\\d{2})(\\\\d{2,3})","$1 $2 $3","6[01]",null],["([67]\\\\d)(\\\\d{3})(\\\\d{3,4})","$1 $2 $3","[67]",null],["(80[01])(\\\\d{2})(\\\\d{2,3})","$1 $2 $3","8",null],["(80[01])(\\\\d{3})(\\\\d{3})","$1 $2 $3","8",null]]]', diff --git a/browser/extensions/formautofill/phonenumberutils/PhoneNumberNormalizer.jsm b/browser/extensions/formautofill/phonenumberutils/PhoneNumberNormalizer.jsm index 07f6612a05b81..ca57e9f805472 100644 --- a/browser/extensions/formautofill/phonenumberutils/PhoneNumberNormalizer.jsm +++ b/browser/extensions/formautofill/phonenumberutils/PhoneNumberNormalizer.jsm @@ -7,9 +7,9 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PhoneNumberNormalizer"]; +var EXPORTED_SYMBOLS = ["PhoneNumberNormalizer"]; -this.PhoneNumberNormalizer = (function() { +var PhoneNumberNormalizer = (function() { const UNICODE_DIGITS = /[\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]/g; const VALID_ALPHA_PATTERN = /[a-zA-Z]/g; const LEADING_PLUS_CHARS_PATTERN = /^[+\uFF0B]+/g; diff --git a/browser/extensions/onboarding/OnboardingTelemetry.jsm b/browser/extensions/onboarding/OnboardingTelemetry.jsm index efa3030bcced5..670660849d42f 100644 --- a/browser/extensions/onboarding/OnboardingTelemetry.jsm +++ b/browser/extensions/onboarding/OnboardingTelemetry.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["OnboardingTelemetry"]; +var EXPORTED_SYMBOLS = ["OnboardingTelemetry"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/browser/extensions/onboarding/OnboardingTourType.jsm b/browser/extensions/onboarding/OnboardingTourType.jsm index 86b8f4cb4fe0c..83d586325f64e 100644 --- a/browser/extensions/onboarding/OnboardingTourType.jsm +++ b/browser/extensions/onboarding/OnboardingTourType.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["OnboardingTourType"]; +var EXPORTED_SYMBOLS = ["OnboardingTourType"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm b/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm index 4fc6efe76046f..0436debd20d05 100644 --- a/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm +++ b/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm @@ -16,11 +16,11 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PdfJsTelemetry"]; +var EXPORTED_SYMBOLS = ["PdfJsTelemetry"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.PdfJsTelemetry = { +var PdfJsTelemetry = { onViewerIsUsed() { let histogram = Services.telemetry.getHistogramById("PDF_VIEWER_USED"); histogram.add(true); diff --git a/browser/extensions/pocket/content/AboutPocket.jsm b/browser/extensions/pocket/content/AboutPocket.jsm index c2354b4cf8745..58716f7d0c5e3 100644 --- a/browser/extensions/pocket/content/AboutPocket.jsm +++ b/browser/extensions/pocket/content/AboutPocket.jsm @@ -90,4 +90,4 @@ XPCOMUtils.defineLazyGetter(AboutPocket, "aboutSignup", () => Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT) ); -this.EXPORTED_SYMBOLS = ["AboutPocket"]; +var EXPORTED_SYMBOLS = ["AboutPocket"]; diff --git a/browser/extensions/pocket/content/Pocket.jsm b/browser/extensions/pocket/content/Pocket.jsm index 89417535f3080..2c0c013529f91 100644 --- a/browser/extensions/pocket/content/Pocket.jsm +++ b/browser/extensions/pocket/content/Pocket.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Pocket"]; +var EXPORTED_SYMBOLS = ["Pocket"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/extensions/pocket/content/pktApi.jsm b/browser/extensions/pocket/content/pktApi.jsm index d3ca7af0c1bae..0a8472db3b195 100644 --- a/browser/extensions/pocket/content/pktApi.jsm +++ b/browser/extensions/pocket/content/pktApi.jsm @@ -43,7 +43,7 @@ */ const Cm = Components.manager; -this.EXPORTED_SYMBOLS = ["pktApi"]; +var EXPORTED_SYMBOLS = ["pktApi"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/extensions/shield-recipe-client/bootstrap.js b/browser/extensions/shield-recipe-client/bootstrap.js index 1b54eb9081ee2..d9417c072fdd2 100644 --- a/browser/extensions/shield-recipe-client/bootstrap.js +++ b/browser/extensions/shield-recipe-client/bootstrap.js @@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(this, "PreferenceExperiments", // Act as both a normal bootstrap.js and a JS module so that we can test // startup methods without having to install/uninstall the add-on. -this.EXPORTED_SYMBOLS = ["Bootstrap"]; +var EXPORTED_SYMBOLS = ["Bootstrap"]; const REASON_APP_STARTUP = 1; const UI_AVAILABLE_NOTIFICATION = "sessionstore-windows-restored"; @@ -46,7 +46,7 @@ log.level = Services.prefs.getIntPref(PREF_LOGGING_LEVEL, Log.Level.Warn); let studyPrefsChanged = {}; -this.Bootstrap = { +var Bootstrap = { initShieldPrefs(defaultPrefs) { const prefBranch = Services.prefs.getDefaultBranch(""); for (const [name, value] of Object.entries(defaultPrefs)) { diff --git a/browser/extensions/shield-recipe-client/content/AboutPages.jsm b/browser/extensions/shield-recipe-client/content/AboutPages.jsm index 08274c6898fda..5401bfb49c527 100644 --- a/browser/extensions/shield-recipe-client/content/AboutPages.jsm +++ b/browser/extensions/shield-recipe-client/content/AboutPages.jsm @@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter( this, "RecipeRunner", "resource://shield-recipe-client/lib/RecipeRunner.jsm", ); -this.EXPORTED_SYMBOLS = ["AboutPages"]; +var EXPORTED_SYMBOLS = ["AboutPages"]; const SHIELD_LEARN_MORE_URL_PREF = "extensions.shield-recipe-client.shieldLearnMoreUrl"; @@ -95,7 +95,7 @@ AboutPage.prototype.QueryInterface = XPCOMUtils.generateQI([Ci.nsIAboutModule]); /** * The module exported by this file. */ -this.AboutPages = { +var AboutPages = { async init() { // Load scripts in content processes and tabs Services.ppmm.loadProcessScript(PROCESS_SCRIPT, true); diff --git a/browser/extensions/shield-recipe-client/lib/ActionSandboxManager.jsm b/browser/extensions/shield-recipe-client/lib/ActionSandboxManager.jsm index 2e1239ce70d01..62990982caadb 100644 --- a/browser/extensions/shield-recipe-client/lib/ActionSandboxManager.jsm +++ b/browser/extensions/shield-recipe-client/lib/ActionSandboxManager.jsm @@ -8,7 +8,7 @@ ChromeUtils.import("resource://shield-recipe-client/lib/NormandyDriver.jsm"); ChromeUtils.import("resource://shield-recipe-client/lib/SandboxManager.jsm"); ChromeUtils.import("resource://shield-recipe-client/lib/LogManager.jsm"); -this.EXPORTED_SYMBOLS = ["ActionSandboxManager"]; +var EXPORTED_SYMBOLS = ["ActionSandboxManager"]; const log = LogManager.getLogger("recipe-sandbox-manager"); @@ -22,7 +22,7 @@ const log = LogManager.getLogger("recipe-sandbox-manager"); * * Callbacks are assumed to be async and must return Promises. */ -this.ActionSandboxManager = class extends SandboxManager { +var ActionSandboxManager = class extends SandboxManager { constructor(actionScript) { super(); diff --git a/browser/extensions/shield-recipe-client/lib/AddonStudies.jsm b/browser/extensions/shield-recipe-client/lib/AddonStudies.jsm index dcf1430af2a7e..40abe678dd754 100644 --- a/browser/extensions/shield-recipe-client/lib/AddonStudies.jsm +++ b/browser/extensions/shield-recipe-client/lib/AddonStudies.jsm @@ -42,7 +42,7 @@ ChromeUtils.defineModuleGetter(this, "TelemetryEvents", "resource://shield-recip Cu.importGlobalProperties(["fetch"]); /* globals fetch */ -this.EXPORTED_SYMBOLS = ["AddonStudies"]; +var EXPORTED_SYMBOLS = ["AddonStudies"]; const DB_NAME = "shield"; const STORE_NAME = "addon-studies"; @@ -111,7 +111,7 @@ async function markAsEnded(db, study, reason) { }); } -this.AddonStudies = { +var AddonStudies = { /** * Test wrapper that temporarily replaces the stored studies with the given * ones. The original stored studies are restored upon completion. diff --git a/browser/extensions/shield-recipe-client/lib/Addons.jsm b/browser/extensions/shield-recipe-client/lib/Addons.jsm index f3a326bde728c..d595f2b6455a1 100644 --- a/browser/extensions/shield-recipe-client/lib/Addons.jsm +++ b/browser/extensions/shield-recipe-client/lib/Addons.jsm @@ -12,7 +12,7 @@ ChromeUtils.defineModuleGetter( this, "CleanupManager", "resource://shield-recipe-client/lib/CleanupManager.jsm" ); -this.EXPORTED_SYMBOLS = ["Addons"]; +var EXPORTED_SYMBOLS = ["Addons"]; /** * SafeAddons store info about an add-on. They are single-depth @@ -30,7 +30,7 @@ this.EXPORTED_SYMBOLS = ["Addons"]; * @property {string} version */ -this.Addons = { +var Addons = { /** * Get information about an installed add-on by ID. * diff --git a/browser/extensions/shield-recipe-client/lib/CleanupManager.jsm b/browser/extensions/shield-recipe-client/lib/CleanupManager.jsm index 95412c1953281..a8db938966093 100644 --- a/browser/extensions/shield-recipe-client/lib/CleanupManager.jsm +++ b/browser/extensions/shield-recipe-client/lib/CleanupManager.jsm @@ -8,7 +8,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "AsyncShutdown", "resource://gre/modules/AsyncShutdown.jsm"); -this.EXPORTED_SYMBOLS = ["CleanupManager"]; +var EXPORTED_SYMBOLS = ["CleanupManager"]; class CleanupManagerClass { constructor() { @@ -48,4 +48,4 @@ class CleanupManagerClass { } } -this.CleanupManager = new CleanupManagerClass(); +var CleanupManager = new CleanupManagerClass(); diff --git a/browser/extensions/shield-recipe-client/lib/ClientEnvironment.jsm b/browser/extensions/shield-recipe-client/lib/ClientEnvironment.jsm index be11997f58804..f4278b8ecf774 100644 --- a/browser/extensions/shield-recipe-client/lib/ClientEnvironment.jsm +++ b/browser/extensions/shield-recipe-client/lib/ClientEnvironment.jsm @@ -23,13 +23,13 @@ ChromeUtils.defineModuleGetter(this, "Addons", "resource://shield-recipe-client/ const {generateUUID} = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); -this.EXPORTED_SYMBOLS = ["ClientEnvironment"]; +var EXPORTED_SYMBOLS = ["ClientEnvironment"]; // Cached API request for client attributes that are determined by the Normandy // service. let _classifyRequest = null; -this.ClientEnvironment = { +var ClientEnvironment = { /** * Fetches information about the client that is calculated on the server, * like geolocation and the current time. diff --git a/browser/extensions/shield-recipe-client/lib/EventEmitter.jsm b/browser/extensions/shield-recipe-client/lib/EventEmitter.jsm index eb7397fa2a9f2..079d73f9f9727 100644 --- a/browser/extensions/shield-recipe-client/lib/EventEmitter.jsm +++ b/browser/extensions/shield-recipe-client/lib/EventEmitter.jsm @@ -5,11 +5,11 @@ ChromeUtils.import("resource://shield-recipe-client/lib/LogManager.jsm"); -this.EXPORTED_SYMBOLS = ["EventEmitter"]; +var EXPORTED_SYMBOLS = ["EventEmitter"]; const log = LogManager.getLogger("event-emitter"); -this.EventEmitter = function(sandboxManager) { +var EventEmitter = function(sandboxManager) { const listeners = {}; return { diff --git a/browser/extensions/shield-recipe-client/lib/FilterExpressions.jsm b/browser/extensions/shield-recipe-client/lib/FilterExpressions.jsm index fa615836a9225..e8595f50f550a 100644 --- a/browser/extensions/shield-recipe-client/lib/FilterExpressions.jsm +++ b/browser/extensions/shield-recipe-client/lib/FilterExpressions.jsm @@ -10,7 +10,7 @@ ChromeUtils.import("resource://shield-recipe-client/lib/PreferenceFilters.jsm"); ChromeUtils.defineModuleGetter(this, "mozjexl", "resource://shield-recipe-client-vendor/mozjexl.js"); -this.EXPORTED_SYMBOLS = ["FilterExpressions"]; +var EXPORTED_SYMBOLS = ["FilterExpressions"]; XPCOMUtils.defineLazyGetter(this, "jexl", () => { const jexl = new mozjexl.Jexl(); @@ -27,7 +27,7 @@ XPCOMUtils.defineLazyGetter(this, "jexl", () => { return jexl; }); -this.FilterExpressions = { +var FilterExpressions = { eval(expr, context = {}) { const onelineExpr = expr.replace(/[\t\n\r]/g, " "); return jexl.eval(onelineExpr, context); diff --git a/browser/extensions/shield-recipe-client/lib/Heartbeat.jsm b/browser/extensions/shield-recipe-client/lib/Heartbeat.jsm index 44a69d8bfac2c..92db536b166df 100644 --- a/browser/extensions/shield-recipe-client/lib/Heartbeat.jsm +++ b/browser/extensions/shield-recipe-client/lib/Heartbeat.jsm @@ -15,7 +15,7 @@ ChromeUtils.import("resource://shield-recipe-client/lib/LogManager.jsm"); Cu.importGlobalProperties(["URL"]); /* globals URL */ -this.EXPORTED_SYMBOLS = ["Heartbeat"]; +var EXPORTED_SYMBOLS = ["Heartbeat"]; const PREF_SURVEY_DURATION = "browser.uitour.surveyDuration"; const NOTIFICATION_TIME = 3000; @@ -77,7 +77,7 @@ CleanupManager.addCleanupHandler(() => { * @param {String} [options.postAnswerURL=null] * The url to visit after the user answers the question. */ -this.Heartbeat = class { +var Heartbeat = class { constructor(chromeWindow, sandboxManager, options) { if (typeof options.flowId !== "string") { throw new Error("flowId must be a string"); diff --git a/browser/extensions/shield-recipe-client/lib/LogManager.jsm b/browser/extensions/shield-recipe-client/lib/LogManager.jsm index f575695b8ea15..aa256a2416509 100644 --- a/browser/extensions/shield-recipe-client/lib/LogManager.jsm +++ b/browser/extensions/shield-recipe-client/lib/LogManager.jsm @@ -6,12 +6,12 @@ ChromeUtils.import("resource://gre/modules/Log.jsm"); -this.EXPORTED_SYMBOLS = ["LogManager"]; +var EXPORTED_SYMBOLS = ["LogManager"]; const ROOT_LOGGER_NAME = "extensions.shield-recipe-client"; let rootLogger = null; -this.LogManager = { +var LogManager = { /** * Configure the root logger for the Recipe Client. Must be called at * least once before using any loggers created via getLogger. diff --git a/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm b/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm index 83f69db35bfda..63e1b541f33ef 100644 --- a/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm +++ b/browser/extensions/shield-recipe-client/lib/NormandyApi.jsm @@ -13,14 +13,14 @@ ChromeUtils.defineModuleGetter( Cu.importGlobalProperties(["fetch", "URL"]); /* globals fetch, URL */ -this.EXPORTED_SYMBOLS = ["NormandyApi"]; +var EXPORTED_SYMBOLS = ["NormandyApi"]; const log = LogManager.getLogger("normandy-api"); const prefs = Services.prefs.getBranch("extensions.shield-recipe-client."); let indexPromise = null; -this.NormandyApi = { +var NormandyApi = { InvalidSignatureError: class InvalidSignatureError extends Error {}, clearIndexCache() { diff --git a/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm b/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm index 8e7484222df26..d4986064d977b 100644 --- a/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm +++ b/browser/extensions/shield-recipe-client/lib/NormandyDriver.jsm @@ -25,12 +25,12 @@ ChromeUtils.defineModuleGetter( const {generateUUID} = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); -this.EXPORTED_SYMBOLS = ["NormandyDriver"]; +var EXPORTED_SYMBOLS = ["NormandyDriver"]; const log = LogManager.getLogger("normandy-driver"); const actionLog = LogManager.getLogger("normandy-driver.actions"); -this.NormandyDriver = function(sandboxManager) { +var NormandyDriver = function(sandboxManager) { if (!sandboxManager) { throw new Error("sandboxManager is required"); } diff --git a/browser/extensions/shield-recipe-client/lib/PreferenceExperiments.jsm b/browser/extensions/shield-recipe-client/lib/PreferenceExperiments.jsm index 3825783b49702..21336b3acdf31 100644 --- a/browser/extensions/shield-recipe-client/lib/PreferenceExperiments.jsm +++ b/browser/extensions/shield-recipe-client/lib/PreferenceExperiments.jsm @@ -62,7 +62,7 @@ ChromeUtils.defineModuleGetter(this, "LogManager", "resource://shield-recipe-cli ChromeUtils.defineModuleGetter(this, "TelemetryEnvironment", "resource://gre/modules/TelemetryEnvironment.jsm"); ChromeUtils.defineModuleGetter(this, "TelemetryEvents", "resource://shield-recipe-client/lib/TelemetryEvents.jsm"); -this.EXPORTED_SYMBOLS = ["PreferenceExperiments"]; +var EXPORTED_SYMBOLS = ["PreferenceExperiments"]; const EXPERIMENT_FILE = "shield-preference-experiments.json"; const STARTUP_EXPERIMENT_PREFS_BRANCH = "extensions.shield-recipe-client.startupExperimentPrefs."; @@ -149,7 +149,7 @@ function setPref(prefBranch, prefName, prefType, prefValue) { } } -this.PreferenceExperiments = { +var PreferenceExperiments = { /** * Update the the experiment storage with changes that happened during early startup. * @param {object} studyPrefsChanged Map from pref name to previous pref value diff --git a/browser/extensions/shield-recipe-client/lib/PreferenceFilters.jsm b/browser/extensions/shield-recipe-client/lib/PreferenceFilters.jsm index 5c0a7692ae440..586cf1663c0cb 100644 --- a/browser/extensions/shield-recipe-client/lib/PreferenceFilters.jsm +++ b/browser/extensions/shield-recipe-client/lib/PreferenceFilters.jsm @@ -6,9 +6,9 @@ ChromeUtils.import("resource://gre/modules/Preferences.jsm"); -this.EXPORTED_SYMBOLS = ["PreferenceFilters"]; +var EXPORTED_SYMBOLS = ["PreferenceFilters"]; -this.PreferenceFilters = { +var PreferenceFilters = { // Compare the value of a given preference. Takes a `default` value as an // optional argument to pass into `Preferences.get`. preferenceValue(prefKey, defaultValue) { diff --git a/browser/extensions/shield-recipe-client/lib/RecipeRunner.jsm b/browser/extensions/shield-recipe-client/lib/RecipeRunner.jsm index 7c7f2342d5b46..cabb546da4e96 100644 --- a/browser/extensions/shield-recipe-client/lib/RecipeRunner.jsm +++ b/browser/extensions/shield-recipe-client/lib/RecipeRunner.jsm @@ -35,7 +35,7 @@ ChromeUtils.defineModuleGetter(this, "Uptake", Cu.importGlobalProperties(["fetch"]); -this.EXPORTED_SYMBOLS = ["RecipeRunner"]; +var EXPORTED_SYMBOLS = ["RecipeRunner"]; const log = LogManager.getLogger("recipe-runner"); const TIMER_NAME = "recipe-client-addon-run"; @@ -58,7 +58,7 @@ const PREFS_TO_WATCH = [ API_URL_PREF, ]; -this.RecipeRunner = { +var RecipeRunner = { async init() { this.enabled = null; this.checkPrefs(); // sets this.enabled diff --git a/browser/extensions/shield-recipe-client/lib/Sampling.jsm b/browser/extensions/shield-recipe-client/lib/Sampling.jsm index 9866dd6b83298..d611441690089 100644 --- a/browser/extensions/shield-recipe-client/lib/Sampling.jsm +++ b/browser/extensions/shield-recipe-client/lib/Sampling.jsm @@ -6,13 +6,13 @@ Cu.importGlobalProperties(["crypto", "TextEncoder"]); -this.EXPORTED_SYMBOLS = ["Sampling"]; +var EXPORTED_SYMBOLS = ["Sampling"]; const hashBits = 48; const hashLength = hashBits / 4; // each hexadecimal digit represents 4 bits const hashMultiplier = Math.pow(2, hashBits) - 1; -this.Sampling = { +var Sampling = { /** * Map from the range [0, 1] to [0, 2^48]. * @param {number} frac A float from 0.0 to 1.0. diff --git a/browser/extensions/shield-recipe-client/lib/SandboxManager.jsm b/browser/extensions/shield-recipe-client/lib/SandboxManager.jsm index edf47e483d7e4..a760476b26d38 100644 --- a/browser/extensions/shield-recipe-client/lib/SandboxManager.jsm +++ b/browser/extensions/shield-recipe-client/lib/SandboxManager.jsm @@ -1,6 +1,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.EXPORTED_SYMBOLS = ["SandboxManager"]; +var EXPORTED_SYMBOLS = ["SandboxManager"]; /** * A wrapper class with helper methods for manipulating a sandbox. @@ -10,7 +10,7 @@ this.EXPORTED_SYMBOLS = ["SandboxManager"]; * holds are removed. This allows sandboxes to trigger async operations and * automatically nuke themselves when they're done. */ -this.SandboxManager = class { +var SandboxManager = class { constructor() { this._sandbox = new Cu.Sandbox(null, { wantComponents: false, diff --git a/browser/extensions/shield-recipe-client/lib/ShieldPreferences.jsm b/browser/extensions/shield-recipe-client/lib/ShieldPreferences.jsm index 4be63e6d27d60..0af3460f0e9c0 100644 --- a/browser/extensions/shield-recipe-client/lib/ShieldPreferences.jsm +++ b/browser/extensions/shield-recipe-client/lib/ShieldPreferences.jsm @@ -16,7 +16,7 @@ ChromeUtils.defineModuleGetter( this, "CleanupManager", "resource://shield-recipe-client/lib/CleanupManager.jsm" ); -this.EXPORTED_SYMBOLS = ["ShieldPreferences"]; +var EXPORTED_SYMBOLS = ["ShieldPreferences"]; const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed"; // from modules/libpref/nsIPrefBranch.idl @@ -26,7 +26,7 @@ const OPT_OUT_STUDIES_ENABLED_PREF = "app.shield.optoutstudies.enabled"; /** * Handles Shield-specific preferences, including their UI. */ -this.ShieldPreferences = { +var ShieldPreferences = { init() { // If the FHR pref was disabled since our last run, disable opt-out as well. if (!Services.prefs.getBoolPref(FHR_UPLOAD_ENABLED_PREF)) { diff --git a/browser/extensions/shield-recipe-client/lib/ShieldRecipeClient.jsm b/browser/extensions/shield-recipe-client/lib/ShieldRecipeClient.jsm index b1e95a4c2e954..09b88df893725 100644 --- a/browser/extensions/shield-recipe-client/lib/ShieldRecipeClient.jsm +++ b/browser/extensions/shield-recipe-client/lib/ShieldRecipeClient.jsm @@ -24,7 +24,7 @@ ChromeUtils.defineModuleGetter(this, "AddonStudies", ChromeUtils.defineModuleGetter(this, "TelemetryEvents", "resource://shield-recipe-client/lib/TelemetryEvents.jsm"); -this.EXPORTED_SYMBOLS = ["ShieldRecipeClient"]; +var EXPORTED_SYMBOLS = ["ShieldRecipeClient"]; const PREF_LOGGING_LEVEL = "extensions.shield-recipe-client.logging.level"; const SHIELD_INIT_NOTIFICATION = "shield-init-complete"; @@ -36,7 +36,7 @@ let log = null; * module for most tasks so that we can more easily test startup and shutdown * (bootstrap.js is difficult to import in tests). */ -this.ShieldRecipeClient = { +var ShieldRecipeClient = { async startup() { // Setup logging and listen for changes to logging prefs LogManager.configure(Services.prefs.getIntPref(PREF_LOGGING_LEVEL)); diff --git a/browser/extensions/shield-recipe-client/lib/Storage.jsm b/browser/extensions/shield-recipe-client/lib/Storage.jsm index 8ca342ef0c971..1d61f1355c671 100644 --- a/browser/extensions/shield-recipe-client/lib/Storage.jsm +++ b/browser/extensions/shield-recipe-client/lib/Storage.jsm @@ -9,7 +9,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "JSONFile", "resource://gre/modules/JSONFile.jsm"); ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); -this.EXPORTED_SYMBOLS = ["Storage"]; +var EXPORTED_SYMBOLS = ["Storage"]; // Lazy-load JSON file that backs Storage instances. XPCOMUtils.defineLazyGetter(this, "lazyStore", async function() { @@ -19,7 +19,7 @@ XPCOMUtils.defineLazyGetter(this, "lazyStore", async function() { return store; }); -this.Storage = class { +var Storage = class { constructor(prefix) { this.prefix = prefix; } diff --git a/browser/extensions/shield-recipe-client/lib/TelemetryEvents.jsm b/browser/extensions/shield-recipe-client/lib/TelemetryEvents.jsm index 32b08a7552dd2..adfc498af8578 100644 --- a/browser/extensions/shield-recipe-client/lib/TelemetryEvents.jsm +++ b/browser/extensions/shield-recipe-client/lib/TelemetryEvents.jsm @@ -6,7 +6,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -this.EXPORTED_SYMBOLS = ["TelemetryEvents"]; +var EXPORTED_SYMBOLS = ["TelemetryEvents"]; const TELEMETRY_CATEGORY = "normandy"; diff --git a/browser/extensions/shield-recipe-client/lib/Uptake.jsm b/browser/extensions/shield-recipe-client/lib/Uptake.jsm index 012c3c1bbd3a5..2b13313f8dddc 100644 --- a/browser/extensions/shield-recipe-client/lib/Uptake.jsm +++ b/browser/extensions/shield-recipe-client/lib/Uptake.jsm @@ -9,11 +9,11 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter( this, "UptakeTelemetry", "resource://services-common/uptake-telemetry.js"); -this.EXPORTED_SYMBOLS = ["Uptake"]; +var EXPORTED_SYMBOLS = ["Uptake"]; const SOURCE_PREFIX = "shield-recipe-client"; -this.Uptake = { +var Uptake = { // Action uptake ACTION_NETWORK_ERROR: UptakeTelemetry.STATUS.NETWORK_ERROR, ACTION_PRE_EXECUTION_ERROR: UptakeTelemetry.STATUS.CUSTOM_1_ERROR, diff --git a/browser/extensions/shield-recipe-client/lib/Utils.jsm b/browser/extensions/shield-recipe-client/lib/Utils.jsm index 146fa69b5d178..5c10b81977421 100644 --- a/browser/extensions/shield-recipe-client/lib/Utils.jsm +++ b/browser/extensions/shield-recipe-client/lib/Utils.jsm @@ -6,11 +6,11 @@ ChromeUtils.import("resource://shield-recipe-client/lib/LogManager.jsm"); -this.EXPORTED_SYMBOLS = ["Utils"]; +var EXPORTED_SYMBOLS = ["Utils"]; const log = LogManager.getLogger("utils"); -this.Utils = { +var Utils = { /** * Convert an array of objects to an object. Each item is keyed by the value * of the given key on the item. diff --git a/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm b/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm index 20e03a99c92ef..3ea7dea3a3df3 100644 --- a/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm +++ b/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm @@ -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 = ["WebCompatReporter"]; +var EXPORTED_SYMBOLS = ["WebCompatReporter"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/extensions/webcompat/content/data/ua_overrides.jsm b/browser/extensions/webcompat/content/data/ua_overrides.jsm index 598e18bd0a94f..b0958673a313f 100644 --- a/browser/extensions/webcompat/content/data/ua_overrides.jsm +++ b/browser/extensions/webcompat/content/data/ua_overrides.jsm @@ -57,4 +57,4 @@ const UAOverrides = [ } ]; -this.EXPORTED_SYMBOLS = ["UAOverrides"]; /* exported UAOverrides */ +var EXPORTED_SYMBOLS = ["UAOverrides"]; /* exported UAOverrides */ diff --git a/browser/extensions/webcompat/content/lib/ua_overrider.jsm b/browser/extensions/webcompat/content/lib/ua_overrider.jsm index 516ea69d943dc..fe4a78270feb7 100644 --- a/browser/extensions/webcompat/content/lib/ua_overrider.jsm +++ b/browser/extensions/webcompat/content/lib/ua_overrider.jsm @@ -90,4 +90,4 @@ class UAOverrider { } } -this.EXPORTED_SYMBOLS = ["UAOverrider"]; /* exported UAOverrider */ +var EXPORTED_SYMBOLS = ["UAOverrider"]; /* exported UAOverrider */ diff --git a/browser/modules/AboutHome.jsm b/browser/modules/AboutHome.jsm index 0a220414033e1..51266de9ebdb0 100644 --- a/browser/modules/AboutHome.jsm +++ b/browser/modules/AboutHome.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "AboutHomeUtils", "AboutHome" ]; +var EXPORTED_SYMBOLS = [ "AboutHomeUtils", "AboutHome" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -24,7 +24,7 @@ const SNIPPETS_URL_PREF = "browser.aboutHomeSnippets.updateUrl"; // Should be bumped up if the snippets content format changes. const STARTPAGE_VERSION = 4; -this.AboutHomeUtils = { +var AboutHomeUtils = { get snippetsVersion() { return STARTPAGE_VERSION; }, diff --git a/browser/modules/AboutNewTab.jsm b/browser/modules/AboutNewTab.jsm index 3787579126f1d..5befddc82f5a0 100644 --- a/browser/modules/AboutNewTab.jsm +++ b/browser/modules/AboutNewTab.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "AboutNewTab" ]; +var EXPORTED_SYMBOLS = [ "AboutNewTab" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/AttributionCode.jsm b/browser/modules/AttributionCode.jsm index 7fe29cae898fe..767e26ac98358 100644 --- a/browser/modules/AttributionCode.jsm +++ b/browser/modules/AttributionCode.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["AttributionCode"]; +var EXPORTED_SYMBOLS = ["AttributionCode"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "AppConstants", diff --git a/browser/modules/BrowserErrorReporter.jsm b/browser/modules/BrowserErrorReporter.jsm index a157e105b493c..69a8cb103e393 100644 --- a/browser/modules/BrowserErrorReporter.jsm +++ b/browser/modules/BrowserErrorReporter.jsm @@ -12,7 +12,7 @@ ChromeUtils.defineModuleGetter(this, "UpdateUtils", "resource://gre/modules/Upda Cu.importGlobalProperties(["fetch", "URL"]); -this.EXPORTED_SYMBOLS = ["BrowserErrorReporter"]; +var EXPORTED_SYMBOLS = ["BrowserErrorReporter"]; const ERROR_PREFIX_RE = /^[^\W]+:/m; const PREF_ENABLED = "browser.chrome.errorReporter.enabled"; diff --git a/browser/modules/BrowserUITelemetry.jsm b/browser/modules/BrowserUITelemetry.jsm index 1d07db4ab6c1e..74ebb278e47dd 100644 --- a/browser/modules/BrowserUITelemetry.jsm +++ b/browser/modules/BrowserUITelemetry.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["BrowserUITelemetry"]; +var EXPORTED_SYMBOLS = ["BrowserUITelemetry"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -164,7 +164,7 @@ const BUCKET_PREFIX = "bucket_"; // as primary name and the time step string. const BUCKET_SEPARATOR = "|"; -this.BrowserUITelemetry = { +var BrowserUITelemetry = { init() { UITelemetry.addSimpleMeasureFunction("toolbars", this.getToolbarMeasures.bind(this)); diff --git a/browser/modules/BrowserUsageTelemetry.jsm b/browser/modules/BrowserUsageTelemetry.jsm index 97e230d555cf1..af2270c0d8f9f 100644 --- a/browser/modules/BrowserUsageTelemetry.jsm +++ b/browser/modules/BrowserUsageTelemetry.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "BrowserUsageTelemetry", "URLBAR_SELECTED_RESULT_TYPES", "URLBAR_SELECTED_RESULT_METHODS", diff --git a/browser/modules/CastingApps.jsm b/browser/modules/CastingApps.jsm index cd776abc8a516..02c3f953c473f 100644 --- a/browser/modules/CastingApps.jsm +++ b/browser/modules/CastingApps.jsm @@ -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/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["CastingApps"]; +var EXPORTED_SYMBOLS = ["CastingApps"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/SimpleServiceDiscovery.jsm"); diff --git a/browser/modules/ContentClick.jsm b/browser/modules/ContentClick.jsm index 6ea6c519ef4e4..74e4f9424dbaa 100644 --- a/browser/modules/ContentClick.jsm +++ b/browser/modules/ContentClick.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ContentClick" ]; +var EXPORTED_SYMBOLS = [ "ContentClick" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/browser/modules/ContentCrashHandlers.jsm b/browser/modules/ContentCrashHandlers.jsm index 6ce0e9c553777..152405367757b 100644 --- a/browser/modules/ContentCrashHandlers.jsm +++ b/browser/modules/ContentCrashHandlers.jsm @@ -4,9 +4,9 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "TabCrashHandler", - "PluginCrashReporter", - "UnsubmittedCrashHandler" ]; +var EXPORTED_SYMBOLS = [ "TabCrashHandler", + "PluginCrashReporter", + "UnsubmittedCrashHandler" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -74,7 +74,7 @@ class BrowserWeakMap extends WeakMap { } } -this.TabCrashHandler = { +var TabCrashHandler = { _crashedTabCount: 0, childMap: new Map(), browserMap: new BrowserWeakMap(), @@ -572,7 +572,7 @@ this.TabCrashHandler = { * submit those reports automatically without prompting if * the user has opted in. */ -this.UnsubmittedCrashHandler = { +var UnsubmittedCrashHandler = { get prefs() { delete this.prefs; return this.prefs = @@ -931,7 +931,7 @@ this.UnsubmittedCrashHandler = { }, }; -this.PluginCrashReporter = { +var PluginCrashReporter = { /** * Makes the PluginCrashReporter ready to hear about and * submit crash reports. diff --git a/browser/modules/ContentLinkHandler.jsm b/browser/modules/ContentLinkHandler.jsm index 8006c39fbbcc2..d44f9389a08b6 100644 --- a/browser/modules/ContentLinkHandler.jsm +++ b/browser/modules/ContentLinkHandler.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ContentLinkHandler" ]; +var EXPORTED_SYMBOLS = [ "ContentLinkHandler" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -264,7 +264,7 @@ function handleFaviconLink(aLink, aIsRichIcon, aChromeGlobal, aFaviconLoads) { return true; } -this.ContentLinkHandler = { +var ContentLinkHandler = { init(chromeGlobal) { const faviconLoads = new Map(); chromeGlobal.addEventListener("DOMLinkAdded", event => { diff --git a/browser/modules/ContentMetaHandler.jsm b/browser/modules/ContentMetaHandler.jsm index 3b4e931240391..9d0cdd23f8d85 100644 --- a/browser/modules/ContentMetaHandler.jsm +++ b/browser/modules/ContentMetaHandler.jsm @@ -68,7 +68,7 @@ function checkLoadURIStr(aURL) { return true; } -this.EXPORTED_SYMBOLS = [ "ContentMetaHandler" ]; +var EXPORTED_SYMBOLS = [ "ContentMetaHandler" ]; /* * This listens to DOMMetaAdded events and collects relevant metadata about the @@ -76,7 +76,7 @@ this.EXPORTED_SYMBOLS = [ "ContentMetaHandler" ]; * and the url of the page as it's payload to be inserted into moz_places. */ -this.ContentMetaHandler = { +var ContentMetaHandler = { init(chromeGlobal) { // Store a locally-scoped (for this chromeGlobal) mapping of the best // description and preview image collected so far for a given URL diff --git a/browser/modules/ContentSearch.jsm b/browser/modules/ContentSearch.jsm index 6b60ff0df991a..4e20714eba227 100644 --- a/browser/modules/ContentSearch.jsm +++ b/browser/modules/ContentSearch.jsm @@ -3,7 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "ContentSearch", ]; @@ -86,7 +86,7 @@ const MAX_SUGGESTIONS = 6; * data: null */ -this.ContentSearch = { +var ContentSearch = { // Inbound events are queued and processed in FIFO order instead of handling // them immediately, which would result in non-FIFO responses due to the diff --git a/browser/modules/ContentWebRTC.jsm b/browser/modules/ContentWebRTC.jsm index 78fe962a2b0f8..494e395e58b20 100644 --- a/browser/modules/ContentWebRTC.jsm +++ b/browser/modules/ContentWebRTC.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ContentWebRTC" ]; +var EXPORTED_SYMBOLS = [ "ContentWebRTC" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -14,7 +14,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "MediaManagerService", const kBrowserURL = "chrome://browser/content/browser.xul"; -this.ContentWebRTC = { +var ContentWebRTC = { // Called only for 'unload' to remove pending gUM prompts in reloaded frames. handleEvent(aEvent) { let contentWindow = aEvent.target.defaultView; diff --git a/browser/modules/ContextMenu.jsm b/browser/modules/ContextMenu.jsm index a1de609ebbf6b..9a5282b366487 100644 --- a/browser/modules/ContextMenu.jsm +++ b/browser/modules/ContextMenu.jsm @@ -6,7 +6,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ContextMenu"]; +var EXPORTED_SYMBOLS = ["ContextMenu"]; Cu.importGlobalProperties(["URL"]); diff --git a/browser/modules/DirectoryLinksProvider.jsm b/browser/modules/DirectoryLinksProvider.jsm index 9a2d52ff98450..ff54c96ea535b 100644 --- a/browser/modules/DirectoryLinksProvider.jsm +++ b/browser/modules/DirectoryLinksProvider.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["DirectoryLinksProvider"]; +var EXPORTED_SYMBOLS = ["DirectoryLinksProvider"]; Cu.importGlobalProperties(["XMLHttpRequest"]); diff --git a/browser/modules/ExtensionsUI.jsm b/browser/modules/ExtensionsUI.jsm index 8cb4ac5d7c259..40f64b1c928f8 100644 --- a/browser/modules/ExtensionsUI.jsm +++ b/browser/modules/ExtensionsUI.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ExtensionsUI"]; +var EXPORTED_SYMBOLS = ["ExtensionsUI"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/EventEmitter.jsm"); @@ -31,7 +31,7 @@ const BRAND_PROPERTIES = "chrome://branding/locale/brand.properties"; const HTML_NS = "http://www.w3.org/1999/xhtml"; -this.ExtensionsUI = { +var ExtensionsUI = { sideloaded: new Set(), updates: new Set(), sideloadListener: null, diff --git a/browser/modules/Feeds.jsm b/browser/modules/Feeds.jsm index 0fb1566b365e0..54f54a31b2f0d 100644 --- a/browser/modules/Feeds.jsm +++ b/browser/modules/Feeds.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "Feeds" ]; +var EXPORTED_SYMBOLS = [ "Feeds" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -14,7 +14,7 @@ ChromeUtils.defineModuleGetter(this, "BrowserUtils", ChromeUtils.defineModuleGetter(this, "RecentWindow", "resource:///modules/RecentWindow.jsm"); -this.Feeds = { +var Feeds = { // Listeners are added in nsBrowserGlue.js receiveMessage(aMessage) { let data = aMessage.data; diff --git a/browser/modules/FormSubmitObserver.jsm b/browser/modules/FormSubmitObserver.jsm index 512db328cf59e..19c83fbd31a6d 100644 --- a/browser/modules/FormSubmitObserver.jsm +++ b/browser/modules/FormSubmitObserver.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "FormSubmitObserver" ]; +var EXPORTED_SYMBOLS = [ "FormSubmitObserver" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/FormValidationHandler.jsm b/browser/modules/FormValidationHandler.jsm index c455884a5ffe9..ff73e07bd0404 100644 --- a/browser/modules/FormValidationHandler.jsm +++ b/browser/modules/FormValidationHandler.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "FormValidationHandler" ]; +var EXPORTED_SYMBOLS = [ "FormValidationHandler" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/LaterRun.jsm b/browser/modules/LaterRun.jsm index b19d29c5e5c1c..2dce21e2b8ba6 100644 --- a/browser/modules/LaterRun.jsm +++ b/browser/modules/LaterRun.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["LaterRun"]; +var EXPORTED_SYMBOLS = ["LaterRun"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/PageActions.jsm b/browser/modules/PageActions.jsm index a96d5b9663906..55c687883bc92 100644 --- a/browser/modules/PageActions.jsm +++ b/browser/modules/PageActions.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "PageActions", // PageActions.Action // PageActions.Button @@ -33,7 +33,7 @@ const PREF_PERSISTED_ACTIONS = "browser.pageActions.persistedActions"; const PERSISTED_ACTIONS_CURRENT_VERSION = 1; -this.PageActions = { +var PageActions = { /** * Inits. Call to init. */ diff --git a/browser/modules/PermissionUI.jsm b/browser/modules/PermissionUI.jsm index 4a2ff2b996b32..f99ae8b61496e 100644 --- a/browser/modules/PermissionUI.jsm +++ b/browser/modules/PermissionUI.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "PermissionUI", ]; @@ -78,7 +78,7 @@ XPCOMUtils.defineLazyGetter(this, "gBrowserBundle", function() { .createBundle("chrome://browser/locale/browser.properties"); }); -this.PermissionUI = {}; +var PermissionUI = {}; /** * PermissionPromptPrototype should be subclassed by callers that @@ -89,7 +89,7 @@ this.PermissionUI = {}; * nsIContentPermissionRequest, you'll want to subclass * PermissionPromptForRequestPrototype instead. */ -this.PermissionPromptPrototype = { +var PermissionPromptPrototype = { /** * Returns the associated for the request. This should * work for the e10s and non-e10s case. @@ -375,7 +375,7 @@ PermissionUI.PermissionPromptPrototype = PermissionPromptPrototype; * nsIContentPermissionRequest, this should be subclassed * rather than PermissionPromptPrototype. */ -this.PermissionPromptForRequestPrototype = { +var PermissionPromptForRequestPrototype = { __proto__: PermissionPromptPrototype, get browser() { diff --git a/browser/modules/PingCentre.jsm b/browser/modules/PingCentre.jsm index dff9c8ba92653..2441e5e2e062e 100644 --- a/browser/modules/PingCentre.jsm +++ b/browser/modules/PingCentre.jsm @@ -189,10 +189,10 @@ class PingCentre { } this.PingCentre = PingCentre; -this.PingCentreConstants = { +var PingCentreConstants = { PRODUCTION_ENDPOINT_PREF, FHR_UPLOAD_ENABLED_PREF, TELEMETRY_PREF, LOGGING_PREF }; -this.EXPORTED_SYMBOLS = ["PingCentre", "PingCentreConstants"]; +var EXPORTED_SYMBOLS = ["PingCentre", "PingCentreConstants"]; diff --git a/browser/modules/PluginContent.jsm b/browser/modules/PluginContent.jsm index e1b972d9b8116..4be90db6d0493 100644 --- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "PluginContent" ]; +var EXPORTED_SYMBOLS = [ "PluginContent" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -21,7 +21,7 @@ XPCOMUtils.defineLazyGetter(this, "gNavigatorBundle", function() { ChromeUtils.defineModuleGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm"); -this.PluginContent = function(global) { +var PluginContent = function(global) { this.init(global); }; diff --git a/browser/modules/ProcessHangMonitor.jsm b/browser/modules/ProcessHangMonitor.jsm index aa1ccf42d0206..c4eb440a2cae5 100644 --- a/browser/modules/ProcessHangMonitor.jsm +++ b/browser/modules/ProcessHangMonitor.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ProcessHangMonitor"]; +var EXPORTED_SYMBOLS = ["ProcessHangMonitor"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/ReaderParent.jsm b/browser/modules/ReaderParent.jsm index 3f1b73581c109..b9829551b044d 100644 --- a/browser/modules/ReaderParent.jsm +++ b/browser/modules/ReaderParent.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ReaderParent" ]; +var EXPORTED_SYMBOLS = [ "ReaderParent" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/RecentWindow.jsm b/browser/modules/RecentWindow.jsm index 634fa951c22b6..e367ea76e61ec 100644 --- a/browser/modules/RecentWindow.jsm +++ b/browser/modules/RecentWindow.jsm @@ -4,13 +4,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["RecentWindow"]; +var EXPORTED_SYMBOLS = ["RecentWindow"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); -this.RecentWindow = { +var RecentWindow = { /* * Get the most recent browser window. * diff --git a/browser/modules/RemotePrompt.jsm b/browser/modules/RemotePrompt.jsm index d2d8f594be82c..45755c2446fc7 100644 --- a/browser/modules/RemotePrompt.jsm +++ b/browser/modules/RemotePrompt.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "RemotePrompt" ]; +var EXPORTED_SYMBOLS = [ "RemotePrompt" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/browser/modules/SchedulePressure.jsm b/browser/modules/SchedulePressure.jsm index 079b9739e4da9..1b7b0f0dbcdf5 100644 --- a/browser/modules/SchedulePressure.jsm +++ b/browser/modules/SchedulePressure.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SchedulePressure"]; +var EXPORTED_SYMBOLS = ["SchedulePressure"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "TelemetryStopwatch", @@ -19,7 +19,7 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "TIMEOUT_AMOUNT", * the behavior of a program based on the idle activity of the * host machine. */ -this.SchedulePressure = { +var SchedulePressure = { _idleCallbackWeakMap: new WeakMap(), _setTimeoutWeakMap: new WeakMap(), _telemetryCallbackWeakMap: new WeakMap(), diff --git a/browser/modules/SitePermissions.jsm b/browser/modules/SitePermissions.jsm index 3ac7eaf37f553..9d7122b5d61f5 100644 --- a/browser/modules/SitePermissions.jsm +++ b/browser/modules/SitePermissions.jsm @@ -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 = [ "SitePermissions" ]; +var EXPORTED_SYMBOLS = [ "SitePermissions" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -136,7 +136,7 @@ const TemporaryBlockedPermissions = { * Some methods have the side effect of dispatching a "PermissionStateChange" * event on changes to temporary permissions, as mentioned in the respective docs. */ -this.SitePermissions = { +var SitePermissions = { // Permission states. UNKNOWN: Services.perms.UNKNOWN_ACTION, ALLOW: Services.perms.ALLOW_ACTION, diff --git a/browser/modules/TransientPrefs.jsm b/browser/modules/TransientPrefs.jsm index c0d883b94f72b..a5387c023123d 100644 --- a/browser/modules/TransientPrefs.jsm +++ b/browser/modules/TransientPrefs.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["TransientPrefs"]; +var EXPORTED_SYMBOLS = ["TransientPrefs"]; ChromeUtils.import("resource://gre/modules/Preferences.jsm"); @@ -14,7 +14,7 @@ var prefVisibility = new Map; When reset to their default state, they remain visible until restarting the application. */ -this.TransientPrefs = { +var TransientPrefs = { prefShouldBeVisible(prefName) { if (Preferences.isSet(prefName)) prefVisibility.set(prefName, true); diff --git a/browser/modules/UpdateTopLevelContentWindowIDHelper.jsm b/browser/modules/UpdateTopLevelContentWindowIDHelper.jsm index 55755cccc5b4e..641331a4d9831 100644 --- a/browser/modules/UpdateTopLevelContentWindowIDHelper.jsm +++ b/browser/modules/UpdateTopLevelContentWindowIDHelper.jsm @@ -7,7 +7,7 @@ * the current selected tab's content outer window ID. */ -this.EXPORTED_SYMBOLS = ["trackBrowserWindow"]; +var EXPORTED_SYMBOLS = ["trackBrowserWindow"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -27,9 +27,9 @@ var _lastFocusedWindow = null; var _lastTopLevelWindowID = 0; // Exported symbol -this.trackBrowserWindow = function trackBrowserWindow(aWindow) { +function trackBrowserWindow(aWindow) { WindowHelper.addWindow(aWindow); -}; +} // Global methods function debug(s) { diff --git a/browser/modules/Windows8WindowFrameColor.jsm b/browser/modules/Windows8WindowFrameColor.jsm index 2158cbef5b569..ef5d05e677152 100644 --- a/browser/modules/Windows8WindowFrameColor.jsm +++ b/browser/modules/Windows8WindowFrameColor.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"]; +var EXPORTED_SYMBOLS = ["Windows8WindowFrameColor"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/browser/modules/WindowsJumpLists.jsm b/browser/modules/WindowsJumpLists.jsm index 5090659c8664a..c91f5df9aba9c 100644 --- a/browser/modules/WindowsJumpLists.jsm +++ b/browser/modules/WindowsJumpLists.jsm @@ -28,7 +28,7 @@ const LIST_TYPE = { * Exports */ -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "WinTaskbarJumpList", ]; @@ -116,7 +116,7 @@ var tasksCfg = [ // Implementation -this.WinTaskbarJumpList = +var WinTaskbarJumpList = { _builder: null, _tasks: null, diff --git a/browser/modules/WindowsPreviewPerTab.jsm b/browser/modules/WindowsPreviewPerTab.jsm index 5d29133fb57f6..8823a288e4b1a 100644 --- a/browser/modules/WindowsPreviewPerTab.jsm +++ b/browser/modules/WindowsPreviewPerTab.jsm @@ -41,7 +41,7 @@ * buttons appear on the taskbar, so a magic pref-controlled number determines * when this threshold has been crossed. */ -this.EXPORTED_SYMBOLS = ["AeroPeek"]; +var EXPORTED_SYMBOLS = ["AeroPeek"]; ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm"); @@ -630,7 +630,7 @@ TabWindow.prototype = { * This object acts as global storage and external interface for this feature. * It maintains the values of the prefs. */ -this.AeroPeek = { +var AeroPeek = { available: false, // Does the pref say we're enabled? __prefenabled: false, diff --git a/browser/modules/ZoomUI.jsm b/browser/modules/ZoomUI.jsm index 8f208ca8b7316..ddf5b0254305e 100644 --- a/browser/modules/ZoomUI.jsm +++ b/browser/modules/ZoomUI.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ZoomUI" ]; +var EXPORTED_SYMBOLS = [ "ZoomUI" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/browser/modules/offlineAppCache.jsm b/browser/modules/offlineAppCache.jsm index ea0b8d00d916f..ec4ad80cccb0e 100644 --- a/browser/modules/offlineAppCache.jsm +++ b/browser/modules/offlineAppCache.jsm @@ -2,11 +2,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/. */ -this.EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"]; +var EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.OfflineAppCacheHelper = { +var OfflineAppCacheHelper = { clear() { var appCacheStorage = Services.cache2.appCacheStorage(Services.loadContextInfo.default, null); try { diff --git a/browser/modules/webrtcUI.jsm b/browser/modules/webrtcUI.jsm index 136ef1a9635db..b538a840e5ad9 100644 --- a/browser/modules/webrtcUI.jsm +++ b/browser/modules/webrtcUI.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["webrtcUI"]; +var EXPORTED_SYMBOLS = ["webrtcUI"]; ChromeUtils.import("resource:///modules/syncedtabs/EventEmitter.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -23,7 +23,7 @@ XPCOMUtils.defineLazyGetter(this, "gBrandBundle", function() { return Services.strings.createBundle("chrome://branding/locale/brand.properties"); }); -this.webrtcUI = { +var webrtcUI = { peerConnectionBlockers: new Set(), emitter: new EventEmitter(), diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm index 931b44ba310fc..31d402256bb0d 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Screenshot"]; +var EXPORTED_SYMBOLS = ["Screenshot"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); @@ -24,7 +24,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => { return new ConsoleAPI(consoleOptions); }); -this.Screenshot = { +var Screenshot = { _extensionPath: null, _path: null, _imagePrefix: "", diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm index d1a287eecd3b2..cdf5fb5378067 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["TestRunner"]; +var EXPORTED_SYMBOLS = ["TestRunner"]; const env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment); const APPLY_CONFIG_TIMEOUT_MS = 60 * 1000; @@ -23,7 +23,7 @@ ChromeUtils.defineModuleGetter(this, "BrowserTestUtils", // Screenshot.jsm must be imported this way for xpcshell tests to work ChromeUtils.defineModuleGetter(this, "Screenshot", "chrome://mozscreenshots/content/Screenshot.jsm"); -this.TestRunner = { +var TestRunner = { combos: null, completedCombos: 0, currentComboIndex: 0, diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/AppMenu.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/AppMenu.jsm index 7fcb2660781b3..10f07ca44f2d9 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/AppMenu.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/AppMenu.jsm @@ -4,12 +4,12 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AppMenu"]; +var EXPORTED_SYMBOLS = ["AppMenu"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm"); -this.AppMenu = { +var AppMenu = { init(libDir) {}, diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm index 011dbc6b9fa1f..e9a7f42298618 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm @@ -4,12 +4,12 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Buttons"]; +var EXPORTED_SYMBOLS = ["Buttons"]; ChromeUtils.import("resource:///modules/CustomizableUI.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.Buttons = { +var Buttons = { init(libDir) { createWidget(); diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm index a4e42baa684ba..87ee65e024102 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ControlCenter"]; +var EXPORTED_SYMBOLS = ["ControlCenter"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); @@ -25,7 +25,7 @@ const MIXED_ACTIVE_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed_act const MIXED_PASSIVE_CONTENT_URL = `https://example.com/${RESOURCE_PATH}/mixed_passive.html`; const TRACKING_PAGE = `http://tracking.example.org/${RESOURCE_PATH}/tracking.html`; -this.ControlCenter = { +var ControlCenter = { init(libDir) { }, configurations: { diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/CustomizeMode.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/CustomizeMode.jsm index 08134330634ee..83cee640869d9 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/CustomizeMode.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/CustomizeMode.jsm @@ -4,12 +4,12 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["CustomizeMode"]; +var EXPORTED_SYMBOLS = ["CustomizeMode"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.CustomizeMode = { +var CustomizeMode = { init(libDir) {}, diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm index 52f7f0aeb581e..8fdf9436ffcba 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/DevTools.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["DevTools"]; +var EXPORTED_SYMBOLS = ["DevTools"]; ChromeUtils.import("resource://devtools/client/framework/gDevTools.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -23,7 +23,7 @@ function selectToolbox() { return gDevTools.getToolbox(getTargetForSelectedTab()).win.document.querySelector("#toolbox-container"); } -this.DevTools = { +var DevTools = { init(libDir) { let panels = ["options", "webconsole", "jsdebugger", "styleeditor", "performance", "netmonitor"]; diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm index f1b8cc5133dee..8ad418d36cd36 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm @@ -4,13 +4,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["LightweightThemes"]; +var EXPORTED_SYMBOLS = ["LightweightThemes"]; ChromeUtils.import("resource://gre/modules/LightweightThemeManager.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.LightweightThemes = { +var LightweightThemes = { init(libDir) { // convert -size 3000x200 canvas:#333 black_theme.png let blackImage = libDir.clone(); diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm index 8a31a909eabe2..8413ada20eef0 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/PermissionPrompts.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PermissionPrompts"]; +var EXPORTED_SYMBOLS = ["PermissionPrompts"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/E10SUtils.jsm"); @@ -14,7 +14,7 @@ ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm"); const URL = "https://test1.example.com/browser/browser/tools/mozscreenshots/mozscreenshots/extension/mozscreenshots/browser/chrome/mozscreenshots/lib/permissionPrompts.html"; let lastTab = null; -this.PermissionPrompts = { +var PermissionPrompts = { init(libDir) { Services.prefs.setBoolPref("browser.storageManager.enabled", true); Services.prefs.setBoolPref("media.navigator.permission.fake", true); diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm index f06909abd99c1..241a404113a87 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm @@ -4,13 +4,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Preferences"]; +var EXPORTED_SYMBOLS = ["Preferences"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://testing-common/TestUtils.jsm"); ChromeUtils.import("resource://testing-common/ContentTask.jsm"); -this.Preferences = { +var Preferences = { init(libDir) { let panes = [ diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Tabs.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Tabs.jsm index d20743e9a1e57..1ce2bf4429824 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Tabs.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Tabs.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Tabs"]; +var EXPORTED_SYMBOLS = ["Tabs"]; const CUST_TAB = "chrome://browser/skin/customize.svg"; const PREFS_TAB = "chrome://browser/skin/settings.svg"; @@ -17,7 +17,7 @@ ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm"); Cu.importGlobalProperties(["InspectorUtils"]); -this.Tabs = { +var Tabs = { init(libDir) {}, configurations: { diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/TabsInTitlebar.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/TabsInTitlebar.jsm index 3703f775509ef..f7ee323fc6e76 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/TabsInTitlebar.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/TabsInTitlebar.jsm @@ -4,13 +4,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["TabsInTitlebar"]; +var EXPORTED_SYMBOLS = ["TabsInTitlebar"]; const PREF_TABS_IN_TITLEBAR = "browser.tabs.drawInTitlebar"; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.TabsInTitlebar = { +var TabsInTitlebar = { init(libDir) {}, diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Toolbars.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Toolbars.jsm index ed1f489819f2d..1a776c508bfa6 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Toolbars.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Toolbars.jsm @@ -4,11 +4,11 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Toolbars"]; +var EXPORTED_SYMBOLS = ["Toolbars"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.Toolbars = { +var Toolbars = { init(libDir) {}, configurations: { diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/UIDensities.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/UIDensities.jsm index 215db68cbbcae..f7ad64d844e3b 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/UIDensities.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/UIDensities.jsm @@ -4,11 +4,11 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["UIDensities"]; +var EXPORTED_SYMBOLS = ["UIDensities"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.UIDensities = { +var UIDensities = { init(libDir) {}, diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/WindowSize.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/WindowSize.jsm index ff046e939ac90..66c75b576518c 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/WindowSize.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/WindowSize.jsm @@ -4,13 +4,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["WindowSize"]; +var EXPORTED_SYMBOLS = ["WindowSize"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); ChromeUtils.import("resource://testing-common/BrowserTestUtils.jsm"); -this.WindowSize = { +var WindowSize = { init(libDir) { Services.prefs.setBoolPref("browser.fullscreen.autohide", false); diff --git a/dom/base/DOMRequestHelper.jsm b/dom/base/DOMRequestHelper.jsm index fd857b8275354..a5323f4c147e6 100644 --- a/dom/base/DOMRequestHelper.jsm +++ b/dom/base/DOMRequestHelper.jsm @@ -16,7 +16,7 @@ * to the child side of frame and process message manager and removing them * when needed. */ -this.EXPORTED_SYMBOLS = ["DOMRequestIpcHelper"]; +var EXPORTED_SYMBOLS = ["DOMRequestIpcHelper"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -25,7 +25,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "cpmm", "@mozilla.org/childprocessmessagemanager;1", "nsIMessageListenerManager"); -this.DOMRequestIpcHelper = function DOMRequestIpcHelper() { +function DOMRequestIpcHelper() { // _listeners keeps a list of messages for which we added a listener and the // kind of listener that we added (strong or weak). It's an object of this // form: diff --git a/dom/base/IndexedDBHelper.jsm b/dom/base/IndexedDBHelper.jsm index f3c6d04927f95..1203996c2c104 100644 --- a/dom/base/IndexedDBHelper.jsm +++ b/dom/base/IndexedDBHelper.jsm @@ -12,7 +12,7 @@ if (DEBUG) { debug = function (s) {} } -this.EXPORTED_SYMBOLS = ["IndexedDBHelper"]; +var EXPORTED_SYMBOLS = ["IndexedDBHelper"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.importGlobalProperties(["indexedDB"]); @@ -24,7 +24,7 @@ function getErrorName(err) { return err && err.name || "UnknownError"; } -this.IndexedDBHelper = function IndexedDBHelper() { +function IndexedDBHelper() { } IndexedDBHelper.prototype = { diff --git a/dom/browser-element/BrowserElementPromptService.jsm b/dom/browser-element/BrowserElementPromptService.jsm index 8e490845359eb..c9fc31e41fbbe 100644 --- a/dom/browser-element/BrowserElementPromptService.jsm +++ b/dom/browser-element/BrowserElementPromptService.jsm @@ -7,7 +7,7 @@ var Cm = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); -this.EXPORTED_SYMBOLS = ["BrowserElementPromptService"]; +var EXPORTED_SYMBOLS = ["BrowserElementPromptService"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -562,7 +562,7 @@ BrowserElementPromptFactory.prototype = { } }; -this.BrowserElementPromptService = { +var BrowserElementPromptService = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), diff --git a/dom/console/tests/console.jsm b/dom/console/tests/console.jsm index b711f9b3b2447..d89074b5879d3 100644 --- a/dom/console/tests/console.jsm +++ b/dom/console/tests/console.jsm @@ -2,9 +2,9 @@ * Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -this.EXPORTED_SYMBOLS = [ "ConsoleTest" ]; +var EXPORTED_SYMBOLS = [ "ConsoleTest" ]; -this.ConsoleTest = { +var ConsoleTest = { go: function(dumpFunction) { console.log("Hello world!"); console.createInstance().log("Hello world!"); diff --git a/dom/encoding/test/file_stringencoding.jsm b/dom/encoding/test/file_stringencoding.jsm index cf554217027dd..d3d613789555c 100644 --- a/dom/encoding/test/file_stringencoding.jsm +++ b/dom/encoding/test/file_stringencoding.jsm @@ -1,6 +1,6 @@ -this.EXPORTED_SYMBOLS = ['checkFromJSM']; +var EXPORTED_SYMBOLS = ['checkFromJSM']; -this.checkFromJSM = function checkFromJSM(is_op) { +function checkFromJSM(is_op) { is_op(new TextDecoder().encoding, "utf-8", "JSM should have TextDecoder"); is_op(new TextEncoder().encoding, "utf-8", "JSM should have TextEncoder"); -} +} \ No newline at end of file diff --git a/dom/indexedDB/test/unit/GlobalObjectsModule.jsm b/dom/indexedDB/test/unit/GlobalObjectsModule.jsm index 8492ea89e83bc..d05bde7d9cb50 100644 --- a/dom/indexedDB/test/unit/GlobalObjectsModule.jsm +++ b/dom/indexedDB/test/unit/GlobalObjectsModule.jsm @@ -5,12 +5,12 @@ Components.utils.importGlobalProperties(["indexedDB"]); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "GlobalObjectsModule" ]; -this.GlobalObjectsModule = function GlobalObjectsModule() { -}; +function GlobalObjectsModule() { +} GlobalObjectsModule.prototype = { runTest() { diff --git a/dom/manifest/ImageObjectProcessor.jsm b/dom/manifest/ImageObjectProcessor.jsm index 7ef5fe811e266..a29886ed38cc8 100644 --- a/dom/manifest/ImageObjectProcessor.jsm +++ b/dom/manifest/ImageObjectProcessor.jsm @@ -149,5 +149,4 @@ ImageObjectProcessor.prototype.process = function( } } }; -this.ImageObjectProcessor = ImageObjectProcessor; // jshint ignore:line -this.EXPORTED_SYMBOLS = ['ImageObjectProcessor']; // jshint ignore:line +var EXPORTED_SYMBOLS = ['ImageObjectProcessor']; // jshint ignore:line diff --git a/dom/manifest/Manifest.jsm b/dom/manifest/Manifest.jsm index a3929511c8f0c..c37e288b8f369 100644 --- a/dom/manifest/Manifest.jsm +++ b/dom/manifest/Manifest.jsm @@ -223,4 +223,4 @@ var Manifests = { }; -this.EXPORTED_SYMBOLS = ["Manifests"]; // jshint ignore:line +var EXPORTED_SYMBOLS = ["Manifests"]; // jshint ignore:line diff --git a/dom/manifest/ManifestFinder.jsm b/dom/manifest/ManifestFinder.jsm index 6257abba1577a..d7938503797f1 100644 --- a/dom/manifest/ManifestFinder.jsm +++ b/dom/manifest/ManifestFinder.jsm @@ -8,7 +8,7 @@ const { } = Components; ChromeUtils.import("resource://gre/modules/PromiseMessage.jsm"); -this.ManifestFinder = {// jshint ignore:line +var ManifestFinder = {// jshint ignore:line /** * Check from content process if DOM Window has a conforming * manifest link relationship. @@ -60,6 +60,6 @@ function checkForManifest(aWindow) { return true; } -this.EXPORTED_SYMBOLS = [// jshint ignore:line +var EXPORTED_SYMBOLS = [// jshint ignore:line "ManifestFinder" ]; diff --git a/dom/manifest/ManifestIcons.jsm b/dom/manifest/ManifestIcons.jsm index cbe401148bd8c..3489aa8c179a9 100644 --- a/dom/manifest/ManifestIcons.jsm +++ b/dom/manifest/ManifestIcons.jsm @@ -8,7 +8,7 @@ const { ChromeUtils.import("resource://gre/modules/PromiseMessage.jsm"); -this.ManifestIcons = { +var ManifestIcons = { async browserFetchIcon(aBrowser, manifest, iconSize) { const msgKey = "DOM:WebManifest:fetchIcon"; @@ -82,4 +82,4 @@ async function fetchIcon(aWindow, src) { })); } -this.EXPORTED_SYMBOLS = ["ManifestIcons"]; // jshint ignore:line +var EXPORTED_SYMBOLS = ["ManifestIcons"]; // jshint ignore:line diff --git a/dom/manifest/ManifestObtainer.jsm b/dom/manifest/ManifestObtainer.jsm index 89c8b6cad5cf5..e91c72a05a554 100644 --- a/dom/manifest/ManifestObtainer.jsm +++ b/dom/manifest/ManifestObtainer.jsm @@ -36,7 +36,7 @@ ChromeUtils.import("resource://gre/modules/ManifestProcessor.jsm"); ChromeUtils.defineModuleGetter(this, "BrowserUtils", // jshint ignore:line "resource://gre/modules/BrowserUtils.jsm"); -this.ManifestObtainer = { // jshint ignore:line +var ManifestObtainer = { // jshint ignore:line /** * Public interface for obtaining a web manifest from a XUL browser, to use * on the parent process. @@ -156,4 +156,4 @@ const fetchManifest = async function(aWindow) { return manifest; }; -this.EXPORTED_SYMBOLS = ["ManifestObtainer"]; // jshint ignore:line +var EXPORTED_SYMBOLS = ["ManifestObtainer"]; // jshint ignore:line diff --git a/dom/manifest/ManifestProcessor.jsm b/dom/manifest/ManifestProcessor.jsm index a6703ac8adcb8..3de52d568fdd8 100644 --- a/dom/manifest/ManifestProcessor.jsm +++ b/dom/manifest/ManifestProcessor.jsm @@ -42,7 +42,7 @@ ChromeUtils.import('resource://gre/modules/ValueExtractor.jsm'); // ImageObjectProcessor is used to process things like icons and images ChromeUtils.import('resource://gre/modules/ImageObjectProcessor.jsm'); -this.ManifestProcessor = { // jshint ignore:line +var ManifestProcessor = { // jshint ignore:line get defaultDisplayMode() { return 'browser'; }, @@ -270,4 +270,4 @@ this.ManifestProcessor = { // jshint ignore:line } } }; -this.EXPORTED_SYMBOLS = ['ManifestProcessor']; // jshint ignore:line +var EXPORTED_SYMBOLS = ['ManifestProcessor']; // jshint ignore:line diff --git a/dom/manifest/ValueExtractor.jsm b/dom/manifest/ValueExtractor.jsm index 955426a49ed70..9b7ec33d1f3c9 100644 --- a/dom/manifest/ValueExtractor.jsm +++ b/dom/manifest/ValueExtractor.jsm @@ -62,5 +62,4 @@ ValueExtractor.prototype = { return color; } }; -this.ValueExtractor = ValueExtractor; // jshint ignore:line -this.EXPORTED_SYMBOLS = ['ValueExtractor']; // jshint ignore:line +var EXPORTED_SYMBOLS = ['ValueExtractor']; // jshint ignore:line diff --git a/dom/media/IdpSandbox.jsm b/dom/media/IdpSandbox.jsm index d521ecac1c802..2c27bd37a59f9 100644 --- a/dom/media/IdpSandbox.jsm +++ b/dom/media/IdpSandbox.jsm @@ -266,5 +266,4 @@ IdpSandbox.prototype = { } }; -this.EXPORTED_SYMBOLS = ["IdpSandbox"]; -this.IdpSandbox = IdpSandbox; +var EXPORTED_SYMBOLS = ["IdpSandbox"]; diff --git a/dom/media/PeerConnectionIdp.jsm b/dom/media/PeerConnectionIdp.jsm index 4d78754185a0f..dbfb1568d6915 100644 --- a/dom/media/PeerConnectionIdp.jsm +++ b/dom/media/PeerConnectionIdp.jsm @@ -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 = ["PeerConnectionIdp"]; +var EXPORTED_SYMBOLS = ["PeerConnectionIdp"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -336,4 +336,3 @@ PeerConnectionIdp.prototype = { } }; -this.PeerConnectionIdp = PeerConnectionIdp; diff --git a/dom/media/RTCStatsReport.jsm b/dom/media/RTCStatsReport.jsm index ab37c7c9b2005..78cfee9ad369e 100644 --- a/dom/media/RTCStatsReport.jsm +++ b/dom/media/RTCStatsReport.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["convertToRTCStatsReport"]; +var EXPORTED_SYMBOLS = ["convertToRTCStatsReport"]; function convertToRTCStatsReport(dict) { function appendStats(stats, report) { @@ -26,4 +26,3 @@ function convertToRTCStatsReport(dict) { return report; } -this.convertToRTCStatsReport = convertToRTCStatsReport; diff --git a/dom/media/webvtt/vtt.jsm b/dom/media/webvtt/vtt.jsm index e7ae72ae70f98..fb2d182a98575 100644 --- a/dom/media/webvtt/vtt.jsm +++ b/dom/media/webvtt/vtt.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["WebVTT"]; +var EXPORTED_SYMBOLS = ["WebVTT"]; /** * Code below is vtt.js the JS WebVTT implementation. diff --git a/dom/network/tests/tcpsocket_test.jsm b/dom/network/tests/tcpsocket_test.jsm index 54d0761886a9f..0a9da7bbedf19 100644 --- a/dom/network/tests/tcpsocket_test.jsm +++ b/dom/network/tests/tcpsocket_test.jsm @@ -1,16 +1,16 @@ -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ 'createSocket', 'createServer', 'socketCompartmentInstanceOfArrayBuffer']; -this.createSocket = function(host, port, options) { +var createSocket = function(host, port, options) { return new TCPSocket(host, port, options); } -this.createServer = function(port, options, backlog) { +var createServer = function(port, options, backlog) { return new TCPServerSocket(port, options, backlog); } // See test_tcpsocket_client_and_server_basics.html's version for rationale. -this.socketCompartmentInstanceOfArrayBuffer = function(obj) { +var socketCompartmentInstanceOfArrayBuffer = function(obj) { return obj instanceof ArrayBuffer; } diff --git a/dom/notification/NotificationDB.jsm b/dom/notification/NotificationDB.jsm index 8742136d2ec45..625b674c446f6 100644 --- a/dom/notification/NotificationDB.jsm +++ b/dom/notification/NotificationDB.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = []; +var EXPORTED_SYMBOLS = []; const DEBUG = false; function debug(s) { dump("-*- NotificationDB component: " + s + "\n"); } diff --git a/dom/presentation/provider/ControllerStateMachine.jsm b/dom/presentation/provider/ControllerStateMachine.jsm index 4662a2c5c4f6b..65e736ddb9f1b 100644 --- a/dom/presentation/provider/ControllerStateMachine.jsm +++ b/dom/presentation/provider/ControllerStateMachine.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ControllerStateMachine"]; // jshint ignore:line +var EXPORTED_SYMBOLS = ["ControllerStateMachine"]; // jshint ignore:line /* globals State, CommandType */ ChromeUtils.import("resource://gre/modules/presentation/StateMachineHelper.jsm"); @@ -235,4 +235,3 @@ ControllerStateMachine.prototype = { }, }; -this.ControllerStateMachine = ControllerStateMachine; // jshint ignore:line diff --git a/dom/presentation/provider/ReceiverStateMachine.jsm b/dom/presentation/provider/ReceiverStateMachine.jsm index 88485e3a1982e..7fe5cd13e5eb6 100644 --- a/dom/presentation/provider/ReceiverStateMachine.jsm +++ b/dom/presentation/provider/ReceiverStateMachine.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ReceiverStateMachine"]; // jshint ignore:line +var EXPORTED_SYMBOLS = ["ReceiverStateMachine"]; // jshint ignore:line /* globals State, CommandType */ ChromeUtils.import("resource://gre/modules/presentation/StateMachineHelper.jsm"); @@ -233,4 +233,3 @@ ReceiverStateMachine.prototype = { }, }; -this.ReceiverStateMachine = ReceiverStateMachine; // jshint ignore:line diff --git a/dom/presentation/provider/StateMachineHelper.jsm b/dom/presentation/provider/StateMachineHelper.jsm index 6e07863d4173b..c7a72ff2339db 100644 --- a/dom/presentation/provider/StateMachineHelper.jsm +++ b/dom/presentation/provider/StateMachineHelper.jsm @@ -7,7 +7,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["State", "CommandType"]; // jshint ignore:line +var EXPORTED_SYMBOLS = ["State", "CommandType"]; // jshint ignore:line const State = Object.freeze({ INIT: 0, diff --git a/dom/push/PushCrypto.jsm b/dom/push/PushCrypto.jsm index cfd22ee49d319..6de11b1b61030 100644 --- a/dom/push/PushCrypto.jsm +++ b/dom/push/PushCrypto.jsm @@ -13,7 +13,7 @@ XPCOMUtils.defineLazyGetter(this, 'gDOMBundle', () => Cu.importGlobalProperties(['crypto']); -this.EXPORTED_SYMBOLS = ['PushCrypto', 'concatArray']; +var EXPORTED_SYMBOLS = ['PushCrypto', 'concatArray']; var UTF8 = new TextEncoder('utf-8'); @@ -218,7 +218,7 @@ function chunkArray(array, size) { return result; } -this.concatArray = function(arrays) { +var concatArray = function(arrays) { var size = arrays.reduce((total, a) => total + a.byteLength, 0); var index = 0; return arrays.reduce((result, a) => { @@ -561,7 +561,7 @@ class aesgcm128Decoder extends OldSchemeDecoder { } } -this.PushCrypto = { +var PushCrypto = { generateAuthenticationSecret() { return crypto.getRandomValues(new Uint8Array(16)); diff --git a/dom/push/PushDB.jsm b/dom/push/PushDB.jsm index bebd0c0a38a47..254cd5abad061 100644 --- a/dom/push/PushDB.jsm +++ b/dom/push/PushDB.jsm @@ -9,7 +9,7 @@ ChromeUtils.import("resource://gre/modules/IndexedDBHelper.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.importGlobalProperties(["indexedDB"]); -this.EXPORTED_SYMBOLS = ["PushDB"]; +var EXPORTED_SYMBOLS = ["PushDB"]; XPCOMUtils.defineLazyGetter(this, "console", () => { let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {}); @@ -19,7 +19,7 @@ XPCOMUtils.defineLazyGetter(this, "console", () => { }); }); -this.PushDB = function PushDB(dbName, dbVersion, dbStoreName, keyPath, model) { +function PushDB(dbName, dbVersion, dbStoreName, keyPath, model) { console.debug("PushDB()"); this._dbStoreName = dbStoreName; this._keyPath = keyPath; @@ -28,7 +28,7 @@ this.PushDB = function PushDB(dbName, dbVersion, dbStoreName, keyPath, model) { // set the indexeddb database this.initDBHelper(dbName, dbVersion, [dbStoreName]); -}; +} this.PushDB.prototype = { __proto__: IndexedDBHelper.prototype, diff --git a/dom/push/PushRecord.jsm b/dom/push/PushRecord.jsm index afe1c6ca42156..99cdc36de9dc5 100644 --- a/dom/push/PushRecord.jsm +++ b/dom/push/PushRecord.jsm @@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"); -this.EXPORTED_SYMBOLS = ["PushRecord"]; +var EXPORTED_SYMBOLS = ["PushRecord"]; const prefs = Services.prefs.getBranch("dom.push."); diff --git a/dom/push/PushService.jsm b/dom/push/PushService.jsm index 30b183f8d81ee..186d0e3a261f9 100644 --- a/dom/push/PushService.jsm +++ b/dom/push/PushService.jsm @@ -33,7 +33,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gPushNotifier", "@mozilla.org/push/Notifier;1", "nsIPushNotifier"); -this.EXPORTED_SYMBOLS = ["PushService"]; +var EXPORTED_SYMBOLS = ["PushService"]; XPCOMUtils.defineLazyGetter(this, "console", () => { let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {}); @@ -117,7 +117,7 @@ function hasRootDomain(str, aDomain) * (PushServiceWebSocket) to communicate with the server and PushDB (IndexedDB) * for persistence. */ -this.PushService = { +var PushService = { _service: null, _state: PUSH_SERVICE_UNINIT, _db: null, diff --git a/dom/push/PushServiceAndroidGCM.jsm b/dom/push/PushServiceAndroidGCM.jsm index 4837d97c3ee3c..b9adab04b672b 100644 --- a/dom/push/PushServiceAndroidGCM.jsm +++ b/dom/push/PushServiceAndroidGCM.jsm @@ -15,7 +15,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); /*global: XPCOMUtil const Log = ChromeUtils.import("resource://gre/modules/AndroidLog.jsm", {}).AndroidLog.bind("Push"); -this.EXPORTED_SYMBOLS = ["PushServiceAndroidGCM"]; +var EXPORTED_SYMBOLS = ["PushServiceAndroidGCM"]; XPCOMUtils.defineLazyGetter(this, "console", () => { let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {}); @@ -38,7 +38,7 @@ const prefs = new Preferences("dom.push."); * The implementation of WebPush push backed by Android's GCM * delivery. */ -this.PushServiceAndroidGCM = { +var PushServiceAndroidGCM = { _mainPushService: null, _serverURI: null, diff --git a/dom/push/PushServiceHttp2.jsm b/dom/push/PushServiceHttp2.jsm index cf6175dd46c19..1df585233089e 100644 --- a/dom/push/PushServiceHttp2.jsm +++ b/dom/push/PushServiceHttp2.jsm @@ -18,7 +18,7 @@ const { concatArray, } = ChromeUtils.import("resource://gre/modules/PushCrypto.jsm"); -this.EXPORTED_SYMBOLS = ["PushServiceHttp2"]; +var EXPORTED_SYMBOLS = ["PushServiceHttp2"]; XPCOMUtils.defineLazyGetter(this, "console", () => { let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {}); @@ -401,7 +401,7 @@ function linkParser(linkHeader, serverURI) { /** * The implementation of the WebPush. */ -this.PushServiceHttp2 = { +var PushServiceHttp2 = { _mainPushService: null, _serverURI: null, diff --git a/dom/push/PushServiceWebSocket.jsm b/dom/push/PushServiceWebSocket.jsm index d66cf3fa32928..bff25b82f5a1c 100644 --- a/dom/push/PushServiceWebSocket.jsm +++ b/dom/push/PushServiceWebSocket.jsm @@ -45,7 +45,7 @@ const kDELIVERY_REASON_TO_CODE = { const prefs = new Preferences("dom.push."); -this.EXPORTED_SYMBOLS = ["PushServiceWebSocket"]; +var EXPORTED_SYMBOLS = ["PushServiceWebSocket"]; XPCOMUtils.defineLazyGetter(this, "console", () => { let {ConsoleAPI} = ChromeUtils.import("resource://gre/modules/Console.jsm", {}); @@ -116,7 +116,7 @@ const STATE_WAITING_FOR_HELLO = 2; // Websocket operational, handshake completed, begin protocol messaging. const STATE_READY = 3; -this.PushServiceWebSocket = { +var PushServiceWebSocket = { _mainPushService: null, _serverURI: null, diff --git a/dom/url/tests/file_url.jsm b/dom/url/tests/file_url.jsm index a90f8c95dcba4..5c67b8c508d32 100644 --- a/dom/url/tests/file_url.jsm +++ b/dom/url/tests/file_url.jsm @@ -1,6 +1,6 @@ -this.EXPORTED_SYMBOLS = ['checkFromJSM']; +var EXPORTED_SYMBOLS = ['checkFromJSM']; -this.checkFromJSM = function checkFromJSM(ok, is) { +function checkFromJSM(ok, is) { Components.utils.importGlobalProperties(['URL', 'Blob']); var url = new URL('http://www.example.com'); @@ -19,4 +19,4 @@ this.checkFromJSM = function checkFromJSM(ok, is) { URL.revokeObjectURL(url); ok(true, "URL is revoked"); -} +} \ No newline at end of file diff --git a/dom/url/tests/file_worker_url.jsm b/dom/url/tests/file_worker_url.jsm index d0bbf62fed244..9f4f22397f339 100644 --- a/dom/url/tests/file_worker_url.jsm +++ b/dom/url/tests/file_worker_url.jsm @@ -1,8 +1,8 @@ -this.EXPORTED_SYMBOLS = ['checkFromJSM']; +var EXPORTED_SYMBOLS = ['checkFromJSM']; Components.utils.importGlobalProperties(['URL']); -this.checkFromJSM = function checkFromJSM(ok, is, finish) { +function checkFromJSM(ok, is, finish) { let worker = new ChromeWorker("jsm_url_worker.js"); worker.onmessage = function(event) { @@ -23,4 +23,4 @@ this.checkFromJSM = function checkFromJSM(ok, is, finish) { }; worker.postMessage(0); -} +} \ No newline at end of file diff --git a/dom/url/tests/test_bug883784.jsm b/dom/url/tests/test_bug883784.jsm index ea04f5fdbc856..1441fb8f87332 100644 --- a/dom/url/tests/test_bug883784.jsm +++ b/dom/url/tests/test_bug883784.jsm @@ -1,8 +1,8 @@ -this.EXPORTED_SYMBOLS = ["Test"]; +var EXPORTED_SYMBOLS = ["Test"]; Cu.importGlobalProperties(["URL", "XMLHttpRequest"]); -this.Test = { +var Test = { start: function(ok, is, finish) { let worker = new ChromeWorker("jsm_url_worker.js"); worker.onmessage = function(event) { diff --git a/dom/workers/test/WorkerTest.jsm b/dom/workers/test/WorkerTest.jsm index 86431b7f89260..3d1b866a4de9f 100644 --- a/dom/workers/test/WorkerTest.jsm +++ b/dom/workers/test/WorkerTest.jsm @@ -2,11 +2,11 @@ * Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "WorkerTest" ]; -this.WorkerTest = { +var WorkerTest = { go: function(message, messageCallback, errorCallback) { let worker = new ChromeWorker("WorkerTest_worker.js"); worker.onmessage = messageCallback; diff --git a/editor/AsyncSpellCheckTestHelper.jsm b/editor/AsyncSpellCheckTestHelper.jsm index fa54401dbf299..27a08fcc41188 100644 --- a/editor/AsyncSpellCheckTestHelper.jsm +++ b/editor/AsyncSpellCheckTestHelper.jsm @@ -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 = [ +var EXPORTED_SYMBOLS = [ "onSpellCheck", ]; diff --git a/intl/l10n/DOMLocalization.jsm b/intl/l10n/DOMLocalization.jsm index 7f046228c137e..69c9ed4889d06 100644 --- a/intl/l10n/DOMLocalization.jsm +++ b/intl/l10n/DOMLocalization.jsm @@ -626,4 +626,4 @@ class DOMLocalization extends Localization { } this.DOMLocalization = DOMLocalization; -this.EXPORTED_SYMBOLS = ["DOMLocalization"]; +var EXPORTED_SYMBOLS = ["DOMLocalization"]; diff --git a/intl/l10n/L10nRegistry.jsm b/intl/l10n/L10nRegistry.jsm index d55891c05b4d2..ae1e6f368f3f4 100644 --- a/intl/l10n/L10nRegistry.jsm +++ b/intl/l10n/L10nRegistry.jsm @@ -423,4 +423,4 @@ this.L10nRegistry = L10nRegistry; this.FileSource = FileSource; this.IndexedFileSource = IndexedFileSource; -this.EXPORTED_SYMBOLS = ["L10nRegistry", "FileSource", "IndexedFileSource"]; +var EXPORTED_SYMBOLS = ["L10nRegistry", "FileSource", "IndexedFileSource"]; diff --git a/intl/l10n/Localization.jsm b/intl/l10n/Localization.jsm index 903d776237135..a2ad1614f2658 100644 --- a/intl/l10n/Localization.jsm +++ b/intl/l10n/Localization.jsm @@ -432,4 +432,4 @@ function keysFromContext(method, ctx, keys, translations) { } this.Localization = Localization; -this.EXPORTED_SYMBOLS = ["Localization"]; +var EXPORTED_SYMBOLS = ["Localization"]; diff --git a/intl/l10n/MessageContext.jsm b/intl/l10n/MessageContext.jsm index d7196922aadb0..b1045d16d871c 100644 --- a/intl/l10n/MessageContext.jsm +++ b/intl/l10n/MessageContext.jsm @@ -1847,4 +1847,4 @@ class MessageContext { } this.MessageContext = MessageContext; -this.EXPORTED_SYMBOLS = ["MessageContext"]; +var EXPORTED_SYMBOLS = ["MessageContext"]; diff --git a/intl/locale/PluralForm.jsm b/intl/locale/PluralForm.jsm index ff3bc788834e4..59b2890782e0a 100644 --- a/intl/locale/PluralForm.jsm +++ b/intl/locale/PluralForm.jsm @@ -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 = [ "PluralForm" ]; +var EXPORTED_SYMBOLS = [ "PluralForm" ]; /** * This module provides the PluralForm object which contains a method to figure @@ -77,7 +77,7 @@ var gFunctions = [ [6, (n) => n==0?0:n==1?1:n==2?2:n==3?3:n==6?4:5], ]; -this.PluralForm = { +var PluralForm = { /** * Get the correct plural form of a word based on the number * diff --git a/js/ductwork/debugger/jsdebugger.jsm b/js/ductwork/debugger/jsdebugger.jsm index 8b87c0a059e1b..0fb5ba52da490 100644 --- a/js/ductwork/debugger/jsdebugger.jsm +++ b/js/ductwork/debugger/jsdebugger.jsm @@ -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 = [ "addDebuggerToGlobal" ]; +var EXPORTED_SYMBOLS = [ "addDebuggerToGlobal" ]; /* * This is the js module for Debugger. Import it like so: @@ -19,10 +19,10 @@ this.EXPORTED_SYMBOLS = [ "addDebuggerToGlobal" ]; */ const init = Components.classes["@mozilla.org/jsdebugger;1"].createInstance(Components.interfaces.IJSDebugger); -this.addDebuggerToGlobal = function addDebuggerToGlobal(global) { +function addDebuggerToGlobal(global) { init.addClass(global); initPromiseDebugging(global); -}; +} function initPromiseDebugging(global) { if (global.Debugger.Object.prototype.PromiseDebugging) { diff --git a/js/xpconnect/loader/XPCOMUtils.jsm b/js/xpconnect/loader/XPCOMUtils.jsm index e48943a3627ad..e730671772907 100644 --- a/js/xpconnect/loader/XPCOMUtils.jsm +++ b/js/xpconnect/loader/XPCOMUtils.jsm @@ -88,9 +88,9 @@ */ -this.EXPORTED_SYMBOLS = [ "XPCOMUtils" ]; +var EXPORTED_SYMBOLS = [ "XPCOMUtils" ]; -this.XPCOMUtils = { +var XPCOMUtils = { /** * Generate a QueryInterface implementation. The returned function must be * assigned to the 'QueryInterface' property of a JS object. When invoked on diff --git a/js/xpconnect/tests/chrome/file_expandosharing.jsm b/js/xpconnect/tests/chrome/file_expandosharing.jsm index 2e7ffe5416cb4..78718b28ec1c7 100644 --- a/js/xpconnect/tests/chrome/file_expandosharing.jsm +++ b/js/xpconnect/tests/chrome/file_expandosharing.jsm @@ -1,10 +1,10 @@ -this.EXPORTED_SYMBOLS = ['checkFromJSM']; +var EXPORTED_SYMBOLS = ['checkFromJSM']; -this.checkFromJSM = function checkFromJSM(target, is_op) { +function checkFromJSM(target, is_op) { is_op(target.numProp, 42, "Number expando works"); is_op(target.strProp, "foo", "String expando works"); // If is_op is todo_is, target.objProp will be undefined. try { is_op(target.objProp.bar, "baz", "Object expando works"); } catch(e) { is_op(0, 1, "No object expando"); } -} +} \ No newline at end of file diff --git a/js/xpconnect/tests/unit/bogus_element_type.jsm b/js/xpconnect/tests/unit/bogus_element_type.jsm index ba6583bba1d8d..882ca5680941a 100644 --- a/js/xpconnect/tests/unit/bogus_element_type.jsm +++ b/js/xpconnect/tests/unit/bogus_element_type.jsm @@ -1 +1 @@ -this.EXPORTED_SYMBOLS = [{}]; +var EXPORTED_SYMBOLS = [{}]; diff --git a/js/xpconnect/tests/unit/bogus_exports_type.jsm b/js/xpconnect/tests/unit/bogus_exports_type.jsm index 4ec23b2153759..4b306e4e89d09 100644 --- a/js/xpconnect/tests/unit/bogus_exports_type.jsm +++ b/js/xpconnect/tests/unit/bogus_exports_type.jsm @@ -1 +1 @@ -this.EXPORTED_SYMBOLS = "not an array"; +var EXPORTED_SYMBOLS = "not an array"; diff --git a/js/xpconnect/tests/unit/recursive_importA.jsm b/js/xpconnect/tests/unit/recursive_importA.jsm index d8689695b335e..ac763354c496b 100644 --- a/js/xpconnect/tests/unit/recursive_importA.jsm +++ b/js/xpconnect/tests/unit/recursive_importA.jsm @@ -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 = ["foo", "bar"]; +var EXPORTED_SYMBOLS = ["foo", "bar"]; function foo() { return "foo"; diff --git a/js/xpconnect/tests/unit/recursive_importB.jsm b/js/xpconnect/tests/unit/recursive_importB.jsm index 90442d4b2afee..1bf84971b65ee 100644 --- a/js/xpconnect/tests/unit/recursive_importB.jsm +++ b/js/xpconnect/tests/unit/recursive_importB.jsm @@ -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 = ["baz", "qux"]; +var EXPORTED_SYMBOLS = ["baz", "qux"]; function baz() { return "baz"; diff --git a/layout/tools/reftest/globals.jsm b/layout/tools/reftest/globals.jsm index bb7157a889948..f8bbd4df1a889 100644 --- a/layout/tools/reftest/globals.jsm +++ b/layout/tools/reftest/globals.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = []; +var EXPORTED_SYMBOLS = []; for (let [key, val] of Object.entries({ /* Constants */ diff --git a/layout/tools/reftest/manifest.jsm b/layout/tools/reftest/manifest.jsm index 8421166f2765c..8a7ee8eecb3a2 100644 --- a/layout/tools/reftest/manifest.jsm +++ b/layout/tools/reftest/manifest.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ReadTopManifest", "CreateUrls"]; +var EXPORTED_SYMBOLS = ["ReadTopManifest", "CreateUrls"]; var CC = Components.classes; const CI = Components.interfaces; diff --git a/layout/tools/reftest/reftest.jsm b/layout/tools/reftest/reftest.jsm index 335f796d5641b..8ab306a3e9308 100644 --- a/layout/tools/reftest/reftest.jsm +++ b/layout/tools/reftest/reftest.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "OnRefTestLoad", "OnRefTestUnload", "getTestPlugin" diff --git a/mobile/android/modules/Accounts.jsm b/mobile/android/modules/Accounts.jsm index d51bd4e139409..e4a8f6f5bed5a 100644 --- a/mobile/android/modules/Accounts.jsm +++ b/mobile/android/modules/Accounts.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Accounts"]; +var EXPORTED_SYMBOLS = ["Accounts"]; ChromeUtils.import("resource://gre/modules/Messaging.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/mobile/android/modules/ActionBarHandler.jsm b/mobile/android/modules/ActionBarHandler.jsm index 97589f9095063..9bee898709c82 100644 --- a/mobile/android/modules/ActionBarHandler.jsm +++ b/mobile/android/modules/ActionBarHandler.jsm @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ActionBarHandler"]; +var EXPORTED_SYMBOLS = ["ActionBarHandler"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/BrowserActions.jsm b/mobile/android/modules/BrowserActions.jsm index 3888b43ebe48d..e32f877d6b54f 100644 --- a/mobile/android/modules/BrowserActions.jsm +++ b/mobile/android/modules/BrowserActions.jsm @@ -8,7 +8,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Messaging.jsm"); -this.EXPORTED_SYMBOLS = ["BrowserActions"]; +var EXPORTED_SYMBOLS = ["BrowserActions"]; var BrowserActions = { _browserActions: {}, diff --git a/mobile/android/modules/DelayedInit.jsm b/mobile/android/modules/DelayedInit.jsm index 05e4963aa221b..c6f96ad89307f 100644 --- a/mobile/android/modules/DelayedInit.jsm +++ b/mobile/android/modules/DelayedInit.jsm @@ -5,7 +5,7 @@ /* globals MessageLoop */ -this.EXPORTED_SYMBOLS = ["DelayedInit"]; +var EXPORTED_SYMBOLS = ["DelayedInit"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/DownloadNotifications.jsm b/mobile/android/modules/DownloadNotifications.jsm index ccb0a79870178..78b0d9d0f4ba8 100644 --- a/mobile/android/modules/DownloadNotifications.jsm +++ b/mobile/android/modules/DownloadNotifications.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["DownloadNotifications"]; +var EXPORTED_SYMBOLS = ["DownloadNotifications"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/FormAssistant.jsm b/mobile/android/modules/FormAssistant.jsm index c9afb1dd480ea..c8d64b034c3bf 100644 --- a/mobile/android/modules/FormAssistant.jsm +++ b/mobile/android/modules/FormAssistant.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["FormAssistant"]; +var EXPORTED_SYMBOLS = ["FormAssistant"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/FxAccountsWebChannel.jsm b/mobile/android/modules/FxAccountsWebChannel.jsm index 07385df26ccef..2666e6a225271 100644 --- a/mobile/android/modules/FxAccountsWebChannel.jsm +++ b/mobile/android/modules/FxAccountsWebChannel.jsm @@ -10,7 +10,7 @@ * Use the WebChannel component to receive messages about account * state changes. */ -this.EXPORTED_SYMBOLS = ["EnsureFxAccountsWebChannel"]; +var EXPORTED_SYMBOLS = ["EnsureFxAccountsWebChannel"]; const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; /* global Components */ @@ -381,7 +381,7 @@ var singleton; // ever created - we require this because the WebChannel is global in scope and // allowing multiple channels would cause such notifications to be sent multiple // times. -this.EnsureFxAccountsWebChannel = () => { +var EnsureFxAccountsWebChannel = () => { if (!singleton) { let contentUri = Services.urlFormatter.formatURLPref("identity.fxaccounts.remote.webchannel.uri"); // The FxAccountsWebChannel listens for events and updates the Java layer. diff --git a/mobile/android/modules/HelperApps.jsm b/mobile/android/modules/HelperApps.jsm index 2d3fe1938edb2..007e1d048fe94 100644 --- a/mobile/android/modules/HelperApps.jsm +++ b/mobile/android/modules/HelperApps.jsm @@ -20,7 +20,7 @@ XPCOMUtils.defineLazyGetter(this, "ContentAreaUtils", function() { return ContentAreaUtils; }); -this.EXPORTED_SYMBOLS = ["App", "HelperApps"]; +var EXPORTED_SYMBOLS = ["App", "HelperApps"]; function App(data) { this.name = data.name; diff --git a/mobile/android/modules/Home.jsm b/mobile/android/modules/Home.jsm index 18073c04c2642..a9b23de9d1685 100644 --- a/mobile/android/modules/Home.jsm +++ b/mobile/android/modules/Home.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Home"]; +var EXPORTED_SYMBOLS = ["Home"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/SharedPreferences.jsm"); @@ -465,7 +465,7 @@ var HomePanels = (function() { })(); // Public API -this.Home = Object.freeze({ +var Home = Object.freeze({ banner: HomeBanner, panels: HomePanels, diff --git a/mobile/android/modules/HomeProvider.jsm b/mobile/android/modules/HomeProvider.jsm index 2561bd9a51a1e..d0e264be7a21a 100644 --- a/mobile/android/modules/HomeProvider.jsm +++ b/mobile/android/modules/HomeProvider.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "HomeProvider" ]; +var EXPORTED_SYMBOLS = [ "HomeProvider" ]; ChromeUtils.import("resource://gre/modules/Messaging.jsm"); ChromeUtils.import("resource://gre/modules/osfile.jsm"); @@ -119,18 +119,18 @@ function syncTimerCallback(timer) { } } -this.HomeStorage = function(datasetId) { +var HomeStorage = function(datasetId) { this.datasetId = datasetId; }; -this.ValidationError = function(message) { +var ValidationError = function(message) { this.name = "ValidationError"; this.message = message; }; ValidationError.prototype = new Error(); ValidationError.prototype.constructor = ValidationError; -this.HomeProvider = Object.freeze({ +var HomeProvider = Object.freeze({ ValidationError: ValidationError, /** diff --git a/mobile/android/modules/InputWidgetHelper.jsm b/mobile/android/modules/InputWidgetHelper.jsm index 0238cf990192b..01ed82642cc54 100644 --- a/mobile/android/modules/InputWidgetHelper.jsm +++ b/mobile/android/modules/InputWidgetHelper.jsm @@ -3,7 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["InputWidgetHelper"]; +var EXPORTED_SYMBOLS = ["InputWidgetHelper"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/MediaPlayerApp.jsm b/mobile/android/modules/MediaPlayerApp.jsm index 83748a1ad53f2..fc33d6586c3b9 100644 --- a/mobile/android/modules/MediaPlayerApp.jsm +++ b/mobile/android/modules/MediaPlayerApp.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["MediaPlayerApp"]; +var EXPORTED_SYMBOLS = ["MediaPlayerApp"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Messaging.jsm"); diff --git a/mobile/android/modules/NetErrorHelper.jsm b/mobile/android/modules/NetErrorHelper.jsm index f8d63d4158339..2681807602f63 100644 --- a/mobile/android/modules/NetErrorHelper.jsm +++ b/mobile/android/modules/NetErrorHelper.jsm @@ -8,7 +8,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Messaging.jsm"); ChromeUtils.import("resource://gre/modules/UITelemetry.jsm"); -this.EXPORTED_SYMBOLS = ["NetErrorHelper"]; +var EXPORTED_SYMBOLS = ["NetErrorHelper"]; const KEY_CODE_ENTER = 13; diff --git a/mobile/android/modules/Notifications.jsm b/mobile/android/modules/Notifications.jsm index 6ef66285b738b..4d06fa7013b00 100644 --- a/mobile/android/modules/Notifications.jsm +++ b/mobile/android/modules/Notifications.jsm @@ -6,7 +6,7 @@ ChromeUtils.import("resource://gre/modules/Messaging.jsm"); -this.EXPORTED_SYMBOLS = ["Notifications"]; +var EXPORTED_SYMBOLS = ["Notifications"]; var _notificationsMap = {}; var _handlersMap = {}; diff --git a/mobile/android/modules/PageActions.jsm b/mobile/android/modules/PageActions.jsm index 6e294ff8b2a9f..1ab0c015a89b3 100644 --- a/mobile/android/modules/PageActions.jsm +++ b/mobile/android/modules/PageActions.jsm @@ -12,7 +12,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "uuidgen", "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator"); -this.EXPORTED_SYMBOLS = ["PageActions"]; +var EXPORTED_SYMBOLS = ["PageActions"]; // Copied from browser.js // TODO: We should move this method to a common importable location diff --git a/mobile/android/modules/Prompt.jsm b/mobile/android/modules/Prompt.jsm index 9632709ded842..13852e74025ca 100644 --- a/mobile/android/modules/Prompt.jsm +++ b/mobile/android/modules/Prompt.jsm @@ -12,7 +12,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { Services: "resource://gre/modules/Services.jsm", }); -this.EXPORTED_SYMBOLS = ["Prompt", "DoorHanger"]; +var EXPORTED_SYMBOLS = ["Prompt", "DoorHanger"]; function log(msg) { Services.console.logStringMessage(msg); diff --git a/mobile/android/modules/RuntimePermissions.jsm b/mobile/android/modules/RuntimePermissions.jsm index 736e1946cb1e6..93dcc6708289a 100644 --- a/mobile/android/modules/RuntimePermissions.jsm +++ b/mobile/android/modules/RuntimePermissions.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["RuntimePermissions"]; +var EXPORTED_SYMBOLS = ["RuntimePermissions"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/SSLExceptions.jsm b/mobile/android/modules/SSLExceptions.jsm index 7c713e5a9894d..4d48aa99e6255 100644 --- a/mobile/android/modules/SSLExceptions.jsm +++ b/mobile/android/modules/SSLExceptions.jsm @@ -7,7 +7,7 @@ ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); Cu.importGlobalProperties(["XMLHttpRequest"]); -this.EXPORTED_SYMBOLS = ["SSLExceptions"]; +var EXPORTED_SYMBOLS = ["SSLExceptions"]; /** A class to add exceptions to override SSL certificate problems. The functionality diff --git a/mobile/android/modules/Sanitizer.jsm b/mobile/android/modules/Sanitizer.jsm index 667a5fb16b376..8284d0e244514 100644 --- a/mobile/android/modules/Sanitizer.jsm +++ b/mobile/android/modules/Sanitizer.jsm @@ -18,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { TelemetryStopwatch: "resource://gre/modules/TelemetryStopwatch.jsm", }); -this.EXPORTED_SYMBOLS = ["Sanitizer"]; +var EXPORTED_SYMBOLS = ["Sanitizer"]; function Sanitizer() {} Sanitizer.prototype = { @@ -357,4 +357,4 @@ Sanitizer.prototype = { } }; -this.Sanitizer = new Sanitizer(); +var Sanitizer = new Sanitizer(); diff --git a/mobile/android/modules/SelectHelper.jsm b/mobile/android/modules/SelectHelper.jsm index f3f0d82e5f13e..39c88875db57c 100644 --- a/mobile/android/modules/SelectHelper.jsm +++ b/mobile/android/modules/SelectHelper.jsm @@ -3,7 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["SelectHelper"]; +var EXPORTED_SYMBOLS = ["SelectHelper"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/SharedPreferences.jsm b/mobile/android/modules/SharedPreferences.jsm index 29c0747357ab1..4ed7963aa2fda 100644 --- a/mobile/android/modules/SharedPreferences.jsm +++ b/mobile/android/modules/SharedPreferences.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SharedPreferences"]; +var EXPORTED_SYMBOLS = ["SharedPreferences"]; // For adding observers. ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/mobile/android/modules/Snackbars.jsm b/mobile/android/modules/Snackbars.jsm index dc45bedfa970b..26081182d0d79 100644 --- a/mobile/android/modules/Snackbars.jsm +++ b/mobile/android/modules/Snackbars.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Snackbars"]; +var EXPORTED_SYMBOLS = ["Snackbars"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/WebrtcUI.jsm b/mobile/android/modules/WebrtcUI.jsm index fd8cba1d256a0..b978e702283f9 100644 --- a/mobile/android/modules/WebrtcUI.jsm +++ b/mobile/android/modules/WebrtcUI.jsm @@ -3,7 +3,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["WebrtcUI"]; +var EXPORTED_SYMBOLS = ["WebrtcUI"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/WebsiteMetadata.jsm b/mobile/android/modules/WebsiteMetadata.jsm index 71c4db4b6b56a..16c16ea1931ae 100644 --- a/mobile/android/modules/WebsiteMetadata.jsm +++ b/mobile/android/modules/WebsiteMetadata.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["WebsiteMetadata"]; +var EXPORTED_SYMBOLS = ["WebsiteMetadata"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewContent.jsm b/mobile/android/modules/geckoview/GeckoViewContent.jsm index ca965d1350a9e..604fc52686bbc 100644 --- a/mobile/android/modules/geckoview/GeckoViewContent.jsm +++ b/mobile/android/modules/geckoview/GeckoViewContent.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewContent"]; +var EXPORTED_SYMBOLS = ["GeckoViewContent"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewContentModule.jsm b/mobile/android/modules/geckoview/GeckoViewContentModule.jsm index cfe75dacc0616..5a4d9875f1f53 100644 --- a/mobile/android/modules/geckoview/GeckoViewContentModule.jsm +++ b/mobile/android/modules/geckoview/GeckoViewContentModule.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewContentModule"]; +var EXPORTED_SYMBOLS = ["GeckoViewContentModule"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewModule.jsm b/mobile/android/modules/geckoview/GeckoViewModule.jsm index 7f5860995f3cc..2c6a360f0068f 100644 --- a/mobile/android/modules/geckoview/GeckoViewModule.jsm +++ b/mobile/android/modules/geckoview/GeckoViewModule.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewModule"]; +var EXPORTED_SYMBOLS = ["GeckoViewModule"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm index aa620f4660b25..e40a52e41480e 100644 --- a/mobile/android/modules/geckoview/GeckoViewNavigation.jsm +++ b/mobile/android/modules/geckoview/GeckoViewNavigation.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewNavigation"]; +var EXPORTED_SYMBOLS = ["GeckoViewNavigation"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewProgress.jsm b/mobile/android/modules/geckoview/GeckoViewProgress.jsm index fb4cc5b40e0e0..aa0ff1d84fcbe 100644 --- a/mobile/android/modules/geckoview/GeckoViewProgress.jsm +++ b/mobile/android/modules/geckoview/GeckoViewProgress.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewProgress"]; +var EXPORTED_SYMBOLS = ["GeckoViewProgress"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm b/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm index 2748849a1c6cb..20ab63a4a73f5 100644 --- a/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm +++ b/mobile/android/modules/geckoview/GeckoViewRemoteDebugger.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewRemoteDebugger"]; +var EXPORTED_SYMBOLS = ["GeckoViewRemoteDebugger"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewScroll.jsm b/mobile/android/modules/geckoview/GeckoViewScroll.jsm index 47e456294e3a0..e7129bc7d3ca1 100644 --- a/mobile/android/modules/geckoview/GeckoViewScroll.jsm +++ b/mobile/android/modules/geckoview/GeckoViewScroll.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewScroll"]; +var EXPORTED_SYMBOLS = ["GeckoViewScroll"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewSettings.jsm b/mobile/android/modules/geckoview/GeckoViewSettings.jsm index 4f8bbd86a0acf..d1ef774baca40 100644 --- a/mobile/android/modules/geckoview/GeckoViewSettings.jsm +++ b/mobile/android/modules/geckoview/GeckoViewSettings.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewSettings"]; +var EXPORTED_SYMBOLS = ["GeckoViewSettings"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewTab.jsm b/mobile/android/modules/geckoview/GeckoViewTab.jsm index c685e6654562a..f2b2352f7a670 100644 --- a/mobile/android/modules/geckoview/GeckoViewTab.jsm +++ b/mobile/android/modules/geckoview/GeckoViewTab.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewTab"]; +var EXPORTED_SYMBOLS = ["GeckoViewTab"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm b/mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm index d6bccf6cb9f96..f50f1a1cdff5f 100644 --- a/mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm +++ b/mobile/android/modules/geckoview/GeckoViewTrackingProtection.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["GeckoViewTrackingProtection"]; +var EXPORTED_SYMBOLS = ["GeckoViewTrackingProtection"]; ChromeUtils.import("resource://gre/modules/GeckoViewModule.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/mobile/android/modules/geckoview/GeckoViewUtils.jsm b/mobile/android/modules/geckoview/GeckoViewUtils.jsm index 96d5845cf6ac1..0eaa2cd647960 100644 --- a/mobile/android/modules/geckoview/GeckoViewUtils.jsm +++ b/mobile/android/modules/geckoview/GeckoViewUtils.jsm @@ -10,7 +10,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { EventDispatcher: "resource://gre/modules/Messaging.jsm", }); -this.EXPORTED_SYMBOLS = ["GeckoViewUtils"]; +var EXPORTED_SYMBOLS = ["GeckoViewUtils"]; var GeckoViewUtils = { /** diff --git a/mobile/android/modules/geckoview/Messaging.jsm b/mobile/android/modules/geckoview/Messaging.jsm index 784f2857aec4d..f942cbc4f28e4 100644 --- a/mobile/android/modules/geckoview/Messaging.jsm +++ b/mobile/android/modules/geckoview/Messaging.jsm @@ -6,7 +6,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -this.EXPORTED_SYMBOLS = ["sendMessageToJava", "Messaging", "EventDispatcher"]; +var EXPORTED_SYMBOLS = ["sendMessageToJava", "Messaging", "EventDispatcher"]; ChromeUtils.defineModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); diff --git a/netwerk/base/NetUtil.jsm b/netwerk/base/NetUtil.jsm index dcee791274551..38b923c8993a7 100644 --- a/netwerk/base/NetUtil.jsm +++ b/netwerk/base/NetUtil.jsm @@ -4,7 +4,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 = [ +var EXPORTED_SYMBOLS = [ "NetUtil", ]; @@ -26,7 +26,7 @@ const BinaryInputStream = Components.Constructor("@mozilla.org/binaryinputstream //////////////////////////////////////////////////////////////////////////////// //// NetUtil Object -this.NetUtil = { +var NetUtil = { /** * Function to perform simple async copying from aSource (an input stream) * to aSink (an output stream). The copy will happen on some background diff --git a/netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm b/netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm index af677e30966aa..a1155e1e1e122 100644 --- a/netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm +++ b/netwerk/dns/mdns/libmdns/MulticastDNSAndroid.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["MulticastDNS"]; +var EXPORTED_SYMBOLS = ["MulticastDNS"]; ChromeUtils.import("resource://gre/modules/Messaging.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm b/netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm index 89bde7b6f9249..a645208a2a016 100644 --- a/netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/DNSPacket.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = ['DNSPacket']; +var EXPORTED_SYMBOLS = ['DNSPacket']; ChromeUtils.import('resource://gre/modules/Services.jsm'); diff --git a/netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm b/netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm index 7c0cbe8c5d917..9718d568aeda1 100644 --- a/netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/DNSRecord.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = ['DNSRecord']; +var EXPORTED_SYMBOLS = ['DNSRecord']; ChromeUtils.import('resource://gre/modules/DataWriter.jsm'); ChromeUtils.import('resource://gre/modules/DNSTypes.jsm'); diff --git a/netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm b/netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm index 4898676030746..ece9b2704caac 100644 --- a/netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/DNSResourceRecord.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = ['DNSResourceRecord']; +var EXPORTED_SYMBOLS = ['DNSResourceRecord']; ChromeUtils.import('resource://gre/modules/Services.jsm'); ChromeUtils.import('resource://gre/modules/DataReader.jsm'); diff --git a/netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm b/netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm index 8c54706390d77..96c3c5535273d 100644 --- a/netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/DNSTypes.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ 'DNS_QUERY_RESPONSE_CODES', 'DNS_AUTHORITATIVE_ANSWER_CODES', 'DNS_CLASS_CODES', diff --git a/netwerk/dns/mdns/libmdns/fallback/DataReader.jsm b/netwerk/dns/mdns/libmdns/fallback/DataReader.jsm index a20c1dc3204da..e13835783542d 100644 --- a/netwerk/dns/mdns/libmdns/fallback/DataReader.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/DataReader.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = ['DataReader']; +var EXPORTED_SYMBOLS = ['DataReader']; class DataReader { // `data` is `Uint8Array` diff --git a/netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm b/netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm index af20d65f5d56f..9be472559d86b 100644 --- a/netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/DataWriter.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = ['DataWriter']; +var EXPORTED_SYMBOLS = ['DataWriter']; class DataWriter { constructor(data, maxBytes = 512) { diff --git a/netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm b/netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm index 48530bfce78a2..2a3402e082437 100644 --- a/netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm +++ b/netwerk/dns/mdns/libmdns/fallback/MulticastDNS.jsm @@ -6,7 +6,7 @@ 'use strict'; -this.EXPORTED_SYMBOLS = ['MulticastDNS']; +var EXPORTED_SYMBOLS = ['MulticastDNS']; ChromeUtils.import('resource://gre/modules/Services.jsm'); ChromeUtils.import('resource://gre/modules/Timer.jsm'); diff --git a/netwerk/protocol/http/UserAgentOverrides.jsm b/netwerk/protocol/http/UserAgentOverrides.jsm index 3afbcbb546b6d..cf7d0017d7915 100644 --- a/netwerk/protocol/http/UserAgentOverrides.jsm +++ b/netwerk/protocol/http/UserAgentOverrides.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "UserAgentOverrides" ]; +var EXPORTED_SYMBOLS = [ "UserAgentOverrides" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -30,7 +30,7 @@ var gOverrideFunctions = [ ]; var gBuiltUAs = new Map; -this.UserAgentOverrides = { +var UserAgentOverrides = { init: function uao_init() { if (gInitialized) return; diff --git a/netwerk/protocol/http/UserAgentUpdates.jsm b/netwerk/protocol/http/UserAgentUpdates.jsm index 34c7b0fd6dfc9..6e7db9c1939ab 100644 --- a/netwerk/protocol/http/UserAgentUpdates.jsm +++ b/netwerk/protocol/http/UserAgentUpdates.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["UserAgentUpdates"]; +var EXPORTED_SYMBOLS = ["UserAgentUpdates"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -85,7 +85,7 @@ function readChannel(url) { }); } -this.UserAgentUpdates = { +var UserAgentUpdates = { init: function(callback) { if (gInitialized) { return; diff --git a/netwerk/test/httpserver/httpd.js b/netwerk/test/httpserver/httpd.js index 445f396150aaf..407344a98eeaf 100644 --- a/netwerk/test/httpserver/httpd.js +++ b/netwerk/test/httpserver/httpd.js @@ -10,7 +10,7 @@ * httpd.js. */ -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "HTTP_400", "HTTP_401", "HTTP_402", @@ -74,7 +74,7 @@ function NS_ASSERT(cond, msg) } /** Constructs an HTTP error object. */ -this.HttpError = function HttpError(code, description) +function HttpError(code, description) { this.code = code; this.description = description; @@ -90,30 +90,30 @@ HttpError.prototype = /** * Errors thrown to trigger specific HTTP server responses. */ -this.HTTP_400 = new HttpError(400, "Bad Request"); -this.HTTP_401 = new HttpError(401, "Unauthorized"); -this.HTTP_402 = new HttpError(402, "Payment Required"); -this.HTTP_403 = new HttpError(403, "Forbidden"); -this.HTTP_404 = new HttpError(404, "Not Found"); -this.HTTP_405 = new HttpError(405, "Method Not Allowed"); -this.HTTP_406 = new HttpError(406, "Not Acceptable"); -this.HTTP_407 = new HttpError(407, "Proxy Authentication Required"); -this.HTTP_408 = new HttpError(408, "Request Timeout"); -this.HTTP_409 = new HttpError(409, "Conflict"); -this.HTTP_410 = new HttpError(410, "Gone"); -this.HTTP_411 = new HttpError(411, "Length Required"); -this.HTTP_412 = new HttpError(412, "Precondition Failed"); -this.HTTP_413 = new HttpError(413, "Request Entity Too Large"); -this.HTTP_414 = new HttpError(414, "Request-URI Too Long"); -this.HTTP_415 = new HttpError(415, "Unsupported Media Type"); -this.HTTP_417 = new HttpError(417, "Expectation Failed"); - -this.HTTP_500 = new HttpError(500, "Internal Server Error"); -this.HTTP_501 = new HttpError(501, "Not Implemented"); -this.HTTP_502 = new HttpError(502, "Bad Gateway"); -this.HTTP_503 = new HttpError(503, "Service Unavailable"); -this.HTTP_504 = new HttpError(504, "Gateway Timeout"); -this.HTTP_505 = new HttpError(505, "HTTP Version Not Supported"); +var HTTP_400 = new HttpError(400, "Bad Request"); +var HTTP_401 = new HttpError(401, "Unauthorized"); +var HTTP_402 = new HttpError(402, "Payment Required"); +var HTTP_403 = new HttpError(403, "Forbidden"); +var HTTP_404 = new HttpError(404, "Not Found"); +var HTTP_405 = new HttpError(405, "Method Not Allowed"); +var HTTP_406 = new HttpError(406, "Not Acceptable"); +var HTTP_407 = new HttpError(407, "Proxy Authentication Required"); +var HTTP_408 = new HttpError(408, "Request Timeout"); +var HTTP_409 = new HttpError(409, "Conflict"); +var HTTP_410 = new HttpError(410, "Gone"); +var HTTP_411 = new HttpError(411, "Length Required"); +var HTTP_412 = new HttpError(412, "Precondition Failed"); +var HTTP_413 = new HttpError(413, "Request Entity Too Large"); +var HTTP_414 = new HttpError(414, "Request-URI Too Long"); +var HTTP_415 = new HttpError(415, "Unsupported Media Type"); +var HTTP_417 = new HttpError(417, "Expectation Failed"); + +var HTTP_500 = new HttpError(500, "Internal Server Error"); +var HTTP_501 = new HttpError(501, "Not Implemented"); +var HTTP_502 = new HttpError(502, "Bad Gateway"); +var HTTP_503 = new HttpError(503, "Service Unavailable"); +var HTTP_504 = new HttpError(504, "Gateway Timeout"); +var HTTP_505 = new HttpError(505, "HTTP Version Not Supported"); /** Creates a hash with fields corresponding to the values in arr. */ function array2obj(arr) @@ -853,7 +853,7 @@ nsHttpServer.prototype = } }; -this.HttpServer = nsHttpServer; +var HttpServer = nsHttpServer; // // RFC 2396 section 3.2.2: @@ -5321,7 +5321,7 @@ Request.prototype = // XPCOM trappings -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsHttpServer]); +var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsHttpServer]); /** * Creates a new HTTP server listening for loopback traffic on the given port, diff --git a/security/manager/ssl/X509.jsm b/security/manager/ssl/X509.jsm index 60b37a5900de2..111c56758d5b0 100644 --- a/security/manager/ssl/X509.jsm +++ b/security/manager/ssl/X509.jsm @@ -629,5 +629,5 @@ class SubjectPublicKeyInfo extends DecodedDER { } } -this.X509 = { Certificate }; -this.EXPORTED_SYMBOLS = ["X509"]; +var X509 = { Certificate }; +var EXPORTED_SYMBOLS = ["X509"]; diff --git a/services/common/async.js b/services/common/async.js index 8123b8721160b..87b26974c97da 100644 --- a/services/common/async.js +++ b/services/common/async.js @@ -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 = ["Async"]; +var EXPORTED_SYMBOLS = ["Async"]; // Constants for makeSyncCallback, waitForSyncCallback. const CB_READY = {}; @@ -17,7 +17,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); /* * Helpers for various async operations. */ -this.Async = { +var Async = { /** * Execute an arbitrary number of asynchronous functions one after the diff --git a/services/common/blocklist-clients.js b/services/common/blocklist-clients.js index 04e88284a1174..8d494f7f30d06 100644 --- a/services/common/blocklist-clients.js +++ b/services/common/blocklist-clients.js @@ -4,11 +4,11 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AddonBlocklistClient", - "GfxBlocklistClient", - "OneCRLBlocklistClient", - "PinningBlocklistClient", - "PluginBlocklistClient"]; +var EXPORTED_SYMBOLS = ["AddonBlocklistClient", + "GfxBlocklistClient", + "OneCRLBlocklistClient", + "PinningBlocklistClient", + "PluginBlocklistClient"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -436,7 +436,7 @@ async function updateJSONBlocklist(filename, records) { } } -this.OneCRLBlocklistClient = new BlocklistClient( +var OneCRLBlocklistClient = new BlocklistClient( Services.prefs.getCharPref(PREF_BLOCKLIST_ONECRL_COLLECTION), PREF_BLOCKLIST_ONECRL_CHECKED_SECONDS, updateCertBlocklist, @@ -444,28 +444,28 @@ this.OneCRLBlocklistClient = new BlocklistClient( "onecrl.content-signature.mozilla.org" ); -this.AddonBlocklistClient = new BlocklistClient( +var AddonBlocklistClient = new BlocklistClient( Services.prefs.getCharPref(PREF_BLOCKLIST_ADDONS_COLLECTION), PREF_BLOCKLIST_ADDONS_CHECKED_SECONDS, (records) => updateJSONBlocklist(this.AddonBlocklistClient.filename, records), Services.prefs.getCharPref(PREF_BLOCKLIST_BUCKET) ); -this.GfxBlocklistClient = new BlocklistClient( +var GfxBlocklistClient = new BlocklistClient( Services.prefs.getCharPref(PREF_BLOCKLIST_GFX_COLLECTION), PREF_BLOCKLIST_GFX_CHECKED_SECONDS, (records) => updateJSONBlocklist(this.GfxBlocklistClient.filename, records), Services.prefs.getCharPref(PREF_BLOCKLIST_BUCKET) ); -this.PluginBlocklistClient = new BlocklistClient( +var PluginBlocklistClient = new BlocklistClient( Services.prefs.getCharPref(PREF_BLOCKLIST_PLUGINS_COLLECTION), PREF_BLOCKLIST_PLUGINS_CHECKED_SECONDS, (records) => updateJSONBlocklist(this.PluginBlocklistClient.filename, records), Services.prefs.getCharPref(PREF_BLOCKLIST_BUCKET) ); -this.PinningPreloadClient = new BlocklistClient( +var PinningPreloadClient = new BlocklistClient( Services.prefs.getCharPref(PREF_BLOCKLIST_PINNING_COLLECTION), PREF_BLOCKLIST_PINNING_CHECKED_SECONDS, updatePinningList, diff --git a/services/common/blocklist-updater.js b/services/common/blocklist-updater.js index 7620c4b3c30de..7cf0624cc2e1e 100644 --- a/services/common/blocklist-updater.js +++ b/services/common/blocklist-updater.js @@ -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 = ["checkVersions", "addTestBlocklistClient"]; +var EXPORTED_SYMBOLS = ["checkVersions", "addTestBlocklistClient"]; const CC = Components.Constructor; @@ -36,7 +36,7 @@ XPCOMUtils.defineLazyGetter(this, "gBlocklistClients", function() { }); // Add a blocklist client for testing purposes. Do not use for any other purpose -this.addTestBlocklistClient = (name, client) => { gBlocklistClients[name] = client; }; +var addTestBlocklistClient = (name, client) => { gBlocklistClients[name] = client; }; async function pollChanges(url, lastEtag) { @@ -91,7 +91,7 @@ async function pollChanges(url, lastEtag) { // This is called by the ping mechanism. // returns a promise that rejects if something goes wrong -this.checkVersions = async function() { +var checkVersions = async function() { // Check if the server backoff time is elapsed. if (Services.prefs.prefHasUserValue(PREF_SETTINGS_SERVER_BACKOFF)) { const backoffReleaseTime = Services.prefs.getCharPref(PREF_SETTINGS_SERVER_BACKOFF); diff --git a/services/common/hawkclient.js b/services/common/hawkclient.js index 2d4f4c72f7eef..59d545173398f 100644 --- a/services/common/hawkclient.js +++ b/services/common/hawkclient.js @@ -24,7 +24,7 @@ * multiple HAWK services should instantiate one HawkClient per service. */ -this.EXPORTED_SYMBOLS = ["HawkClient"]; +var EXPORTED_SYMBOLS = ["HawkClient"]; ChromeUtils.import("resource://services-crypto/utils.js"); ChromeUtils.import("resource://services-common/hawkrequest.js"); @@ -88,7 +88,7 @@ XPCOMUtils.defineLazyGetter(this, "logPII", function() { * @param host * The url of the host */ -this.HawkClient = function(host) { +var HawkClient = function(host) { this.host = host; // Clock offset in milliseconds between our client's clock and the date diff --git a/services/common/hawkrequest.js b/services/common/hawkrequest.js index 6739870799484..b867f9629c4f1 100644 --- a/services/common/hawkrequest.js +++ b/services/common/hawkrequest.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "HAWKAuthenticatedRESTRequest", "deriveHawkCredentials" ]; @@ -50,7 +50,7 @@ const Prefs = new Preferences("services.common.rest."); * milliseconds will be -120000. */ -this.HAWKAuthenticatedRESTRequest = +var HAWKAuthenticatedRESTRequest = function HawkAuthenticatedRESTRequest(uri, credentials, extra = {}) { RESTRequest.call(this, uri); @@ -122,7 +122,7 @@ HAWKAuthenticatedRESTRequest.prototype = { * extra: size - 64 extra bytes (if size > 64) * } */ -this.deriveHawkCredentials = function deriveHawkCredentials(tokenHex, +function deriveHawkCredentials(tokenHex, context, size = 96, hexKey = false) { @@ -139,20 +139,20 @@ this.deriveHawkCredentials = function deriveHawkCredentials(tokenHex, } return result; -}; +} // With hawk request, we send the user's accepted-languages with each request. // To keep the number of times we read this pref at a minimum, maintain the // preference in a stateful object that notices and updates itself when the // pref is changed. -this.Intl = function Intl() { +function Intl() { // We won't actually query the pref until the first time we need it this._accepted = ""; this._everRead = false; this._log = Log.repository.getLogger("Services.Common.RESTRequest"); this._log.level = Log.Level[Prefs.get("log.logger.rest.request")]; this.init(); -}; +} this.Intl.prototype = { init() { diff --git a/services/common/kinto-http-client.js b/services/common/kinto-http-client.js index 4ffe73f2626a0..4df3bc2b590b7 100644 --- a/services/common/kinto-http-client.js +++ b/services/common/kinto-http-client.js @@ -20,7 +20,7 @@ const global = this; -this.EXPORTED_SYMBOLS = ["KintoHttpClient"]; +var EXPORTED_SYMBOLS = ["KintoHttpClient"]; /* * Version 4.5.3 - 5179c56 diff --git a/services/common/kinto-offline-client.js b/services/common/kinto-offline-client.js index 02199e8d6239a..f863b13bb2e90 100644 --- a/services/common/kinto-offline-client.js +++ b/services/common/kinto-offline-client.js @@ -30,7 +30,7 @@ // more details. const global = this; -this.EXPORTED_SYMBOLS = ["Kinto"]; +var EXPORTED_SYMBOLS = ["Kinto"]; /* * Version 11.0.0 - 1dbc5fb diff --git a/services/common/kinto-storage-adapter.js b/services/common/kinto-storage-adapter.js index 08fc95bbf47ab..f42552555e5a9 100644 --- a/services/common/kinto-storage-adapter.js +++ b/services/common/kinto-storage-adapter.js @@ -486,4 +486,4 @@ function transactionProxy(collection, preloaded) { } this.FirefoxAdapter = FirefoxAdapter; -this.EXPORTED_SYMBOLS = ["FirefoxAdapter"]; +var EXPORTED_SYMBOLS = ["FirefoxAdapter"]; diff --git a/services/common/logmanager.js b/services/common/logmanager.js index 1982727274b28..6c6d34e867d33 100644 --- a/services/common/logmanager.js +++ b/services/common/logmanager.js @@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(this, "CommonUtils", ChromeUtils.import("resource://gre/modules/Preferences.jsm"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "LogManager", ]; diff --git a/services/common/modules-testing/logging.js b/services/common/modules-testing/logging.js index a81623acb3874..7546710fd5f87 100644 --- a/services/common/modules-testing/logging.js +++ b/services/common/modules-testing/logging.js @@ -4,14 +4,14 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "getTestLogger", "initTestLogging", ]; ChromeUtils.import("resource://gre/modules/Log.jsm"); -this.initTestLogging = function initTestLogging(level) { +function initTestLogging(level) { function LogStats() { this.errorsLogged = 0; } @@ -48,9 +48,9 @@ this.initTestLogging = function initTestLogging(level) { Log.repository.getLogger("Sqlite").level = Log.Level.Info; return logStats; -}; +} -this.getTestLogger = function getTestLogger(component) { +function getTestLogger(component) { return Log.repository.getLogger("Testing"); -}; +} diff --git a/services/common/observers.js b/services/common/observers.js index cc5962cdee1bc..eb570c12540db 100644 --- a/services/common/observers.js +++ b/services/common/observers.js @@ -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 = ["Observers"]; +var EXPORTED_SYMBOLS = ["Observers"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -13,7 +13,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); * * @version 0.2 */ -this.Observers = { +var Observers = { /** * Register the given callback as an observer of the given topic. * diff --git a/services/common/rest.js b/services/common/rest.js index ce3489abb990f..6291336aa457a 100644 --- a/services/common/rest.js +++ b/services/common/rest.js @@ -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 = [ +var EXPORTED_SYMBOLS = [ "RESTRequest", "RESTResponse", "TokenAuthenticatedRESTRequest", @@ -75,7 +75,7 @@ const Prefs = new Preferences("services.common."); * }); * request.get(); */ -this.RESTRequest = function RESTRequest(uri) { +function RESTRequest(uri) { this.status = this.NOT_SENT; // If we don't have an nsIURI object yet, make one. This will throw if @@ -89,7 +89,7 @@ this.RESTRequest = function RESTRequest(uri) { this._log = Log.repository.getLogger(this._logName); this._log.level = Log.Level[Prefs.get("log.logger.rest.request")]; -}; +} RESTRequest.prototype = { _logName: "Services.Common.RESTRequest", @@ -642,11 +642,11 @@ RESTRequest.prototype = { * Response object for a RESTRequest. This will be created automatically by * the RESTRequest. */ -this.RESTResponse = function RESTResponse() { +function RESTResponse() { this._log = Log.repository.getLogger(this._logName); this._log.level = Log.Level[Prefs.get("log.logger.rest.response")]; -}; +} RESTResponse.prototype = { _logName: "Services.Common.RESTResponse", @@ -743,12 +743,11 @@ RESTResponse.prototype = { * nonce, and ext. See CrytoUtils.computeHTTPMACSHA1 for information on * the purpose of these values. */ -this.TokenAuthenticatedRESTRequest = - function TokenAuthenticatedRESTRequest(uri, authToken, extra) { +function TokenAuthenticatedRESTRequest(uri, authToken, extra) { RESTRequest.call(this, uri); this.authToken = authToken; this.extra = extra || {}; -}; +} TokenAuthenticatedRESTRequest.prototype = { __proto__: RESTRequest.prototype, diff --git a/services/common/tokenserverclient.js b/services/common/tokenserverclient.js index bf2a93d0999e2..80538dd112cab 100644 --- a/services/common/tokenserverclient.js +++ b/services/common/tokenserverclient.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TokenServerClient", "TokenServerClientError", "TokenServerClientNetworkError", @@ -26,13 +26,13 @@ const PREF_LOG_LEVEL = "services.common.log.logger.tokenserverclient"; * @param message * (string) Error message. */ -this.TokenServerClientError = function TokenServerClientError(message) { +function TokenServerClientError(message) { this.name = "TokenServerClientError"; this.message = message || "Client error."; // Without explicitly setting .stack, all stacks from these errors will point // to the "new Error()" call a few lines down, which isn't helpful. this.stack = Error().stack; -}; +} TokenServerClientError.prototype = new Error(); TokenServerClientError.prototype.constructor = TokenServerClientError; TokenServerClientError.prototype._toStringFields = function() { @@ -53,12 +53,11 @@ TokenServerClientError.prototype.toJSON = function() { * @param error * The underlying error thrown by the network layer. */ -this.TokenServerClientNetworkError = - function TokenServerClientNetworkError(error) { +function TokenServerClientNetworkError(error) { this.name = "TokenServerClientNetworkError"; this.error = error; this.stack = Error().stack; -}; +} TokenServerClientNetworkError.prototype = new TokenServerClientError(); TokenServerClientNetworkError.prototype.constructor = TokenServerClientNetworkError; @@ -96,14 +95,13 @@ TokenServerClientNetworkError.prototype._toStringFields = function() { * @param message * (string) Error message. */ -this.TokenServerClientServerError = - function TokenServerClientServerError(message, cause = "general") { +function TokenServerClientServerError(message, cause = "general") { this.now = new Date().toISOString(); // may be useful to diagnose time-skew issues. this.name = "TokenServerClientServerError"; this.message = message || "Server error."; this.cause = cause; this.stack = Error().stack; -}; +} TokenServerClientServerError.prototype = new TokenServerClientError(); TokenServerClientServerError.prototype.constructor = TokenServerClientServerError; @@ -145,10 +143,10 @@ TokenServerClientServerError.prototype._toStringFields = function() { * might be helpful if callers had a richer API that communicated who was * at fault (e.g. differentiating a 503 from a 401). */ -this.TokenServerClient = function TokenServerClient() { +function TokenServerClient() { this._log = Log.repository.getLogger("Services.Common.TokenServerClient"); this._log.manageLevelFromPref(PREF_LOG_LEVEL); -}; +} TokenServerClient.prototype = { /** * Logger instance. diff --git a/services/common/uptake-telemetry.js b/services/common/uptake-telemetry.js index e407c3dfd8592..6c283078cbc26 100644 --- a/services/common/uptake-telemetry.js +++ b/services/common/uptake-telemetry.js @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["UptakeTelemetry"]; +var EXPORTED_SYMBOLS = ["UptakeTelemetry"]; const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {}); diff --git a/services/common/utils.js b/services/common/utils.js index aecc8723fa776..333d977929eb2 100644 --- a/services/common/utils.js +++ b/services/common/utils.js @@ -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 = ["CommonUtils"]; +var EXPORTED_SYMBOLS = ["CommonUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); -this.CommonUtils = { +var CommonUtils = { /* * Set manipulation methods. These should be lifted into toolkit, or added to * `Set` itself. diff --git a/services/crypto/modules/WeaveCrypto.js b/services/crypto/modules/WeaveCrypto.js index d37097045cae5..07e30a6eee2e9 100644 --- a/services/crypto/modules/WeaveCrypto.js +++ b/services/crypto/modules/WeaveCrypto.js @@ -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 = ["WeaveCrypto"]; +var EXPORTED_SYMBOLS = ["WeaveCrypto"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -21,9 +21,9 @@ const KEY_DERIVATION_HASHING_ALGO = "SHA-1"; const KEY_DERIVATION_ITERATIONS = 4096; // PKCS#5 recommends at least 1000. const DERIVED_KEY_ALGO = CRYPT_ALGO; -this.WeaveCrypto = function WeaveCrypto() { +function WeaveCrypto() { this.init(); -}; +} WeaveCrypto.prototype = { prefBranch: null, diff --git a/services/crypto/modules/jwcrypto.jsm b/services/crypto/modules/jwcrypto.jsm index 5312fc9b1b4b3..974d52b417299 100644 --- a/services/crypto/modules/jwcrypto.jsm +++ b/services/crypto/modules/jwcrypto.jsm @@ -16,7 +16,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "@mozilla.org/identity/crypto-service;1", "nsIIdentityCryptoService"); -this.EXPORTED_SYMBOLS = ["jwcrypto"]; +var EXPORTED_SYMBOLS = ["jwcrypto"]; const PREF_LOG_LEVEL = "services.crypto.jwcrypto.log.level"; @@ -187,5 +187,5 @@ jwcryptoClass.prototype = { }; -this.jwcrypto = new jwcryptoClass(); +var jwcrypto = new jwcryptoClass(); this.jwcrypto.ALGORITHMS = ALGORITHMS; diff --git a/services/crypto/modules/utils.js b/services/crypto/modules/utils.js index f26f7f50165d1..09947c3e1cd70 100644 --- a/services/crypto/modules/utils.js +++ b/services/crypto/modules/utils.js @@ -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 = ["CryptoUtils"]; +var EXPORTED_SYMBOLS = ["CryptoUtils"]; ChromeUtils.import("resource://services-common/observers.js"); ChromeUtils.import("resource://services-common/utils.js"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -this.CryptoUtils = { +var CryptoUtils = { xor: function xor(a, b) { let bytes = []; diff --git a/services/fxaccounts/Credentials.jsm b/services/fxaccounts/Credentials.jsm index 0fdf66fa817c6..f4260825e3423 100644 --- a/services/fxaccounts/Credentials.jsm +++ b/services/fxaccounts/Credentials.jsm @@ -11,7 +11,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Credentials"]; +var EXPORTED_SYMBOLS = ["Credentials"]; ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -42,7 +42,7 @@ var log = Log.repository.getLogger("Identity.FxAccounts"); log.level = LOG_LEVEL; log.addAppender(new Log.ConsoleAppender(new Log.BasicFormatter())); -this.Credentials = Object.freeze({ +var Credentials = Object.freeze({ /** * Make constants accessible to tests */ diff --git a/services/fxaccounts/FxAccounts.jsm b/services/fxaccounts/FxAccounts.jsm index a50cde6f4de5b..d7a4228e004a6 100644 --- a/services/fxaccounts/FxAccounts.jsm +++ b/services/fxaccounts/FxAccounts.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["fxAccounts", "FxAccounts"]; +var EXPORTED_SYMBOLS = ["fxAccounts", "FxAccounts"]; Cu.importGlobalProperties(["URL"]); @@ -325,7 +325,7 @@ function urlsafeBase64Encode(key) { /** * The public API's constructor. */ -this.FxAccounts = function(mockInternal) { +var FxAccounts = function(mockInternal) { let external = {}; let internal; diff --git a/services/fxaccounts/FxAccountsClient.jsm b/services/fxaccounts/FxAccountsClient.jsm index 19cf73df6b637..50d370cbc59fe 100644 --- a/services/fxaccounts/FxAccountsClient.jsm +++ b/services/fxaccounts/FxAccountsClient.jsm @@ -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 = ["FxAccountsClient"]; +var EXPORTED_SYMBOLS = ["FxAccountsClient"]; ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -18,7 +18,7 @@ const HOST_PREF = "identity.fxaccounts.auth.uri"; const SIGNIN = "/account/login"; const SIGNUP = "/account/create"; -this.FxAccountsClient = function(host = Services.prefs.getCharPref(HOST_PREF)) { +var FxAccountsClient = function(host = Services.prefs.getCharPref(HOST_PREF)) { this.host = host; // The FxA auth server expects requests to certain endpoints to be authorized diff --git a/services/fxaccounts/FxAccountsCommon.js b/services/fxaccounts/FxAccountsCommon.js index 8b0e94a775481..83ed1c2d442b2 100644 --- a/services/fxaccounts/FxAccountsCommon.js +++ b/services/fxaccounts/FxAccountsCommon.js @@ -245,7 +245,7 @@ for (let id in exports) { } // Allow this file to be imported via Components.utils.import(). -this.EXPORTED_SYMBOLS = Object.keys(exports); +var EXPORTED_SYMBOLS = Object.keys(exports); // Set these up now that everything has been loaded into |this|. exports.SERVER_ERRNO_TO_ERROR[exports.ERRNO_ACCOUNT_ALREADY_EXISTS] = exports.ERROR_ACCOUNT_ALREADY_EXISTS; diff --git a/services/fxaccounts/FxAccountsConfig.jsm b/services/fxaccounts/FxAccountsConfig.jsm index d0387aec084ca..3d44e0ba113ff 100644 --- a/services/fxaccounts/FxAccountsConfig.jsm +++ b/services/fxaccounts/FxAccountsConfig.jsm @@ -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/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["FxAccountsConfig"]; +var EXPORTED_SYMBOLS = ["FxAccountsConfig"]; ChromeUtils.import("resource://services-common/rest.js"); ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js"); @@ -32,7 +32,7 @@ const CONFIG_PREFS = [ "identity.sync.tokenserver.uri", ]; -this.FxAccountsConfig = { +var FxAccountsConfig = { async promiseSignUpURI(entrypoint) { return this._buildURL("signup", {entrypoint}); }, diff --git a/services/fxaccounts/FxAccountsOAuthGrantClient.jsm b/services/fxaccounts/FxAccountsOAuthGrantClient.jsm index 49cf5bd0796ea..69da557d1ce87 100644 --- a/services/fxaccounts/FxAccountsOAuthGrantClient.jsm +++ b/services/fxaccounts/FxAccountsOAuthGrantClient.jsm @@ -8,7 +8,7 @@ * IDs support this privilage. */ -this.EXPORTED_SYMBOLS = ["FxAccountsOAuthGrantClient", "FxAccountsOAuthGrantClientError"]; +var EXPORTED_SYMBOLS = ["FxAccountsOAuthGrantClient", "FxAccountsOAuthGrantClientError"]; ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js"); @@ -35,7 +35,7 @@ const ALLOW_HTTP_PREF = "identity.fxaccounts.allowHttp"; * Optional authorization endpoint for the OAuth server * @constructor */ -this.FxAccountsOAuthGrantClient = function(options) { +var FxAccountsOAuthGrantClient = function(options) { this._validateOptions(options); this.parameters = options; @@ -213,7 +213,7 @@ this.FxAccountsOAuthGrantClient.prototype = { * Error message * @constructor */ -this.FxAccountsOAuthGrantClientError = function(details) { +var FxAccountsOAuthGrantClientError = function(details) { details = details || {}; this.name = "FxAccountsOAuthGrantClientError"; diff --git a/services/fxaccounts/FxAccountsProfile.jsm b/services/fxaccounts/FxAccountsProfile.jsm index 04bf8981fbe29..3016ec949fc01 100644 --- a/services/fxaccounts/FxAccountsProfile.jsm +++ b/services/fxaccounts/FxAccountsProfile.jsm @@ -12,7 +12,7 @@ * the user's profile in open browser tabs, and cacheing/invalidating profile data. */ -this.EXPORTED_SYMBOLS = ["FxAccountsProfile"]; +var EXPORTED_SYMBOLS = ["FxAccountsProfile"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -22,7 +22,7 @@ ChromeUtils.import("resource://gre/modules/FxAccounts.jsm"); ChromeUtils.defineModuleGetter(this, "FxAccountsProfileClient", "resource://gre/modules/FxAccountsProfileClient.jsm"); -this.FxAccountsProfile = function(options = {}) { +var FxAccountsProfile = function(options = {}) { this._currentFetchPromise = null; this._cachedAt = 0; // when we saved the cached version. this._isNotifying = false; // are we sending a notification? diff --git a/services/fxaccounts/FxAccountsProfileClient.jsm b/services/fxaccounts/FxAccountsProfileClient.jsm index 91a8ea8a2417f..929865ec5e815 100644 --- a/services/fxaccounts/FxAccountsProfileClient.jsm +++ b/services/fxaccounts/FxAccountsProfileClient.jsm @@ -7,7 +7,7 @@ */ "use strict;"; -this.EXPORTED_SYMBOLS = ["FxAccountsProfileClient", "FxAccountsProfileClientError"]; +var EXPORTED_SYMBOLS = ["FxAccountsProfileClient", "FxAccountsProfileClientError"]; ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js"); @@ -27,7 +27,7 @@ Cu.importGlobalProperties(["URL"]); * The bearer token to access the profile server * @constructor */ -this.FxAccountsProfileClient = function(options) { +var FxAccountsProfileClient = function(options) { if (!options || !options.serverURL) { throw new Error("Missing 'serverURL' configuration option"); } @@ -226,7 +226,7 @@ this.FxAccountsProfileClient.prototype = { * Error message * @constructor */ -this.FxAccountsProfileClientError = function(details) { +var FxAccountsProfileClientError = function(details) { details = details || {}; this.name = "FxAccountsProfileClientError"; diff --git a/services/fxaccounts/FxAccountsStorage.jsm b/services/fxaccounts/FxAccountsStorage.jsm index cc511c183f1a6..4c750a3fc2cbb 100644 --- a/services/fxaccounts/FxAccountsStorage.jsm +++ b/services/fxaccounts/FxAccountsStorage.jsm @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "FxAccountsStorageManagerCanStoreField", "FxAccountsStorageManager", ]; @@ -23,7 +23,7 @@ function FxAccountsStorageManagerCanStoreField(fieldName) { } // The storage manager object. -this.FxAccountsStorageManager = function(options = {}) { +var FxAccountsStorageManager = function(options = {}) { this.options = { filename: options.filename || DEFAULT_STORAGE_FILENAME, baseDir: options.baseDir || OS.Constants.Path.profileDir, diff --git a/services/fxaccounts/FxAccountsWebChannel.jsm b/services/fxaccounts/FxAccountsWebChannel.jsm index af7a99e189058..a790d06b66c48 100644 --- a/services/fxaccounts/FxAccountsWebChannel.jsm +++ b/services/fxaccounts/FxAccountsWebChannel.jsm @@ -10,7 +10,7 @@ * about account state changes. */ -this.EXPORTED_SYMBOLS = ["EnsureFxAccountsWebChannel"]; +var EXPORTED_SYMBOLS = ["EnsureFxAccountsWebChannel"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/FxAccountsCommon.js"); @@ -521,7 +521,7 @@ var singleton; // (eg, it uses the observer service to tell interested parties of interesting // things) and allowing multiple channels would cause such notifications to be // sent multiple times. -this.EnsureFxAccountsWebChannel = () => { +var EnsureFxAccountsWebChannel = () => { let contentUri = Services.urlFormatter.formatURLPref("identity.fxaccounts.remote.root"); if (singleton && singleton._contentUri !== contentUri) { singleton.tearDown(); diff --git a/services/sync/modules-testing/fakeservices.js b/services/sync/modules-testing/fakeservices.js index 0a663fbaae458..3f4248ceb5a8b 100644 --- a/services/sync/modules-testing/fakeservices.js +++ b/services/sync/modules-testing/fakeservices.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "FakeCryptoService", "FakeFilesystemService", "FakeGUIDService", @@ -15,7 +15,7 @@ ChromeUtils.import("resource://services-sync/main.js"); ChromeUtils.import("resource://services-sync/record.js"); ChromeUtils.import("resource://services-sync/util.js"); -this.FakeFilesystemService = function FakeFilesystemService(contents) { +function FakeFilesystemService(contents) { this.fakeContents = contents; let self = this; @@ -58,17 +58,17 @@ this.FakeFilesystemService = function FakeFilesystemService(contents) { delete self.fakeContents["weave/" + filePath + ".json"]; return Promise.resolve(); }; -}; +} -this.fakeSHA256HMAC = function fakeSHA256HMAC(message) { +function fakeSHA256HMAC(message) { message = message.substr(0, 64); while (message.length < 64) { message += " "; } return message; -}; +} -this.FakeGUIDService = function FakeGUIDService() { +function FakeGUIDService() { let latestGUID = 0; Utils.makeGUID = function makeGUID() { @@ -76,13 +76,13 @@ this.FakeGUIDService = function FakeGUIDService() { let nextGUID = "fake-guid-" + String(latestGUID++).padStart(2, "0"); return nextGUID.slice(nextGUID.length - 12, nextGUID.length); }; -}; +} /* * Mock implementation of WeaveCrypto. It does not encrypt or * decrypt, merely returning the input verbatim. */ -this.FakeCryptoService = function FakeCryptoService() { +function FakeCryptoService() { this.counter = 0; delete Weave.Crypto; // get rid of the getter first @@ -91,7 +91,7 @@ this.FakeCryptoService = function FakeCryptoService() { CryptoWrapper.prototype.ciphertextHMAC = function ciphertextHMAC(keyBundle) { return fakeSHA256HMAC(this.ciphertext); }; -}; +} FakeCryptoService.prototype = { async encrypt(clearText, symmetricKey, iv) { diff --git a/services/sync/modules-testing/fxa_utils.js b/services/sync/modules-testing/fxa_utils.js index 8456d1c7ebef5..1a9a974fe3693 100644 --- a/services/sync/modules-testing/fxa_utils.js +++ b/services/sync/modules-testing/fxa_utils.js @@ -1,6 +1,6 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "initializeIdentityWithTokenServerResponse", ]; @@ -13,7 +13,7 @@ ChromeUtils.import("resource://testing-common/services/sync/utils.js"); // Create a new browserid_identity object and initialize it with a // mocked TokenServerClient which always receives the specified response. -this.initializeIdentityWithTokenServerResponse = function(response) { +var initializeIdentityWithTokenServerResponse = function(response) { // First create a mock "request" object that well' hack into the token server. // A log for it let requestLog = Log.repository.getLogger("testing.mock-rest"); diff --git a/services/sync/modules-testing/rotaryengine.js b/services/sync/modules-testing/rotaryengine.js index 76239216c13df..cec87a8f23d4e 100644 --- a/services/sync/modules-testing/rotaryengine.js +++ b/services/sync/modules-testing/rotaryengine.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "RotaryEngine", "RotaryRecord", "RotaryStore", @@ -22,18 +22,18 @@ ChromeUtils.import("resource://services-sync/util.js"); * Complete with record, store, and tracker implementations. */ -this.RotaryRecord = function RotaryRecord(collection, id) { +function RotaryRecord(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} RotaryRecord.prototype = { __proto__: CryptoWrapper.prototype }; Utils.deferGetSet(RotaryRecord, "cleartext", ["denomination"]); -this.RotaryStore = function RotaryStore(name, engine) { +function RotaryStore(name, engine) { Store.call(this, name, engine); this.items = {}; -}; +} RotaryStore.prototype = { __proto__: Store.prototype, @@ -86,21 +86,21 @@ RotaryStore.prototype = { } }; -this.RotaryTracker = function RotaryTracker(name, engine) { +function RotaryTracker(name, engine) { Tracker.call(this, name, engine); -}; +} RotaryTracker.prototype = { __proto__: Tracker.prototype, persistChangedIDs: false, }; -this.RotaryEngine = function RotaryEngine(service) { +function RotaryEngine(service) { SyncEngine.call(this, "Rotary", service); // Ensure that the engine starts with a clean slate. this.toFetch = new SerializableSet(); this.previousFailed = new SerializableSet(); -}; +} RotaryEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: RotaryStore, diff --git a/services/sync/modules-testing/utils.js b/services/sync/modules-testing/utils.js index 11ee09f6eca39..843b7a9e7eb60 100644 --- a/services/sync/modules-testing/utils.js +++ b/services/sync/modules-testing/utils.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "encryptPayload", "makeIdentityConfig", "makeFxAccountsInternalMock", @@ -77,7 +77,7 @@ MockFxaStorageManager.prototype = { * we can account for the timer in delayedAutoconnect) and then two event * loop ticks (to account for the CommonUtils.nextTick() in autoConnect). */ -this.waitForZeroTimer = function waitForZeroTimer(callback) { +function waitForZeroTimer(callback) { let ticks = 2; function wait() { if (ticks) { @@ -88,15 +88,15 @@ this.waitForZeroTimer = function waitForZeroTimer(callback) { callback(); } CommonUtils.namedTimer(wait, 150, {}, "timer"); -}; +} -this.promiseZeroTimer = function() { +var promiseZeroTimer = function() { return new Promise(resolve => { waitForZeroTimer(resolve); }); }; -this.promiseNamedTimer = function(wait, thisObj, name) { +var promiseNamedTimer = function(wait, thisObj, name) { return new Promise(resolve => { CommonUtils.namedTimer(resolve, wait, thisObj, name); }); @@ -106,7 +106,7 @@ this.promiseNamedTimer = function(wait, thisObj, name) { // providers. |overrides| can specify overrides for any default values. // |server| is optional, but if specified, will be used to form the cluster // URL for the FxA identity. -this.makeIdentityConfig = function(overrides) { +var makeIdentityConfig = function(overrides) { // first setup the defaults. let result = { // Username used in both fxaccount and sync identity configs. @@ -148,7 +148,7 @@ this.makeIdentityConfig = function(overrides) { return result; }; -this.makeFxAccountsInternalMock = function(config) { +var makeFxAccountsInternalMock = function(config) { return { newAccountState(credentials) { // We only expect this to be called with null indicating the (mock) @@ -169,9 +169,9 @@ this.makeFxAccountsInternalMock = function(config) { // Configure an instance of an FxAccount identity provider with the specified // config (or the default config if not specified). -this.configureFxAccountIdentity = function(authService, - config = makeIdentityConfig(), - fxaInternal = makeFxAccountsInternalMock(config)) { +var configureFxAccountIdentity = function(authService, + config = makeIdentityConfig(), + fxaInternal = makeFxAccountsInternalMock(config)) { // until we get better test infrastructure for bid_identity, we set the // signedin user's "email" to the username, simply as many tests rely on this. config.fxaccount.user.email = config.username; @@ -204,7 +204,7 @@ this.configureFxAccountIdentity = function(authService, authService._account = config.fxaccount.user.email; }; -this.configureIdentity = async function(identityOverrides, server) { +var configureIdentity = async function(identityOverrides, server) { let config = makeIdentityConfig(identityOverrides, server); let ns = {}; ChromeUtils.import("resource://services-sync/service.js", ns); @@ -238,7 +238,7 @@ function syncTestLogging(level = "Trace") { return logStats; } -this.SyncTestingInfrastructure = async function(server, username) { +var SyncTestingInfrastructure = async function(server, username) { let ns = {}; ChromeUtils.import("resource://services-sync/service.js", ns); @@ -255,7 +255,7 @@ this.SyncTestingInfrastructure = async function(server, username) { /** * Turn WBO cleartext into fake "encrypted" payload as it goes over the wire. */ -this.encryptPayload = function encryptPayload(cleartext) { +function encryptPayload(cleartext) { if (typeof cleartext == "object") { cleartext = JSON.stringify(cleartext); } @@ -265,9 +265,9 @@ this.encryptPayload = function encryptPayload(cleartext) { IV: "irrelevant", hmac: fakeSHA256HMAC(cleartext, CryptoUtils.makeHMACKey("")), }; -}; +} -this.sumHistogram = function(name, options = {}) { +var sumHistogram = function(name, options = {}) { let histogram = options.key ? Services.telemetry.getKeyedHistogramById(name) : Services.telemetry.getHistogramById(name); let snapshot = histogram.snapshot(options.key); @@ -279,7 +279,7 @@ this.sumHistogram = function(name, options = {}) { return sum; }; -this.getLoginTelemetryScalar = function() { +var getLoginTelemetryScalar = function() { let dataset = Services.telemetry.DATASET_RELEASE_CHANNEL_OPTOUT; let snapshot = Services.telemetry.snapshotKeyedScalars(dataset, true); return snapshot.parent ? snapshot.parent["services.sync.sync_login_state_transitions"] : {}; diff --git a/services/sync/modules/SyncedTabs.jsm b/services/sync/modules/SyncedTabs.jsm index 5314ea20a12b9..4933912b84125 100644 --- a/services/sync/modules/SyncedTabs.jsm +++ b/services/sync/modules/SyncedTabs.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SyncedTabs"]; +var EXPORTED_SYMBOLS = ["SyncedTabs"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -220,7 +220,7 @@ Services.obs.addObserver(SyncedTabsInternal, "weave:service:start-over"); Services.prefs.addObserver("services.sync.engine.tabs", SyncedTabsInternal); // The public interface. -this.SyncedTabs = { +var SyncedTabs = { // A mock-point for tests. _internal: SyncedTabsInternal, diff --git a/services/sync/modules/UIState.jsm b/services/sync/modules/UIState.jsm index fa4e4fd12acb7..fe8b379c691eb 100644 --- a/services/sync/modules/UIState.jsm +++ b/services/sync/modules/UIState.jsm @@ -14,7 +14,7 @@ * @property {boolean} [syncing] Whether or not we are currently syncing. */ -this.EXPORTED_SYMBOLS = ["UIState"]; +var EXPORTED_SYMBOLS = ["UIState"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -241,7 +241,7 @@ for (let topic of TOPICS) { Services.obs.addObserver(UIStateInternal, topic); } -this.UIState = { +var UIState = { _internal: UIStateInternal, ON_UPDATE, diff --git a/services/sync/modules/addonsreconciler.js b/services/sync/modules/addonsreconciler.js index 5d0aa6e3eb082..e163abb77f286 100644 --- a/services/sync/modules/addonsreconciler.js +++ b/services/sync/modules/addonsreconciler.js @@ -24,14 +24,14 @@ ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); const DEFAULT_STATE_FILE = "addonsreconciler"; -this.CHANGE_INSTALLED = 1; -this.CHANGE_UNINSTALLED = 2; -this.CHANGE_ENABLED = 3; -this.CHANGE_DISABLED = 4; - -this.EXPORTED_SYMBOLS = ["AddonsReconciler", "CHANGE_INSTALLED", - "CHANGE_UNINSTALLED", "CHANGE_ENABLED", - "CHANGE_DISABLED"]; +var CHANGE_INSTALLED = 1; +var CHANGE_UNINSTALLED = 2; +var CHANGE_ENABLED = 3; +var CHANGE_DISABLED = 4; + +var EXPORTED_SYMBOLS = ["AddonsReconciler", "CHANGE_INSTALLED", + "CHANGE_UNINSTALLED", "CHANGE_ENABLED", + "CHANGE_DISABLED"]; /** * Maintains state of add-ons. * @@ -111,13 +111,13 @@ this.EXPORTED_SYMBOLS = ["AddonsReconciler", "CHANGE_INSTALLED", * events will occur immediately. However, we still see disabling events and * heed them like they were normal. In the end, the state is proper. */ -this.AddonsReconciler = function AddonsReconciler(queueCaller) { +function AddonsReconciler(queueCaller) { this._log = Log.repository.getLogger("Sync.AddonsReconciler"); this._log.manageLevelFromPref("services.sync.log.logger.addonsreconciler"); this.queueCaller = queueCaller; Svc.Obs.add("xpcom-shutdown", this.stopListening, this); -}; +} AddonsReconciler.prototype = { /** Flag indicating whether we are listening to AddonManager events. */ _listening: false, diff --git a/services/sync/modules/addonutils.js b/services/sync/modules/addonutils.js index b40c40e0b6754..5878fd9efafc8 100644 --- a/services/sync/modules/addonutils.js +++ b/services/sync/modules/addonutils.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AddonUtils"]; +var EXPORTED_SYMBOLS = ["AddonUtils"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Log.jsm"); diff --git a/services/sync/modules/bookmark_repair.js b/services/sync/modules/bookmark_repair.js index a5f8b43453504..54ee11ad6f282 100644 --- a/services/sync/modules/bookmark_repair.js +++ b/services/sync/modules/bookmark_repair.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["BookmarkRepairRequestor", "BookmarkRepairResponder"]; +var EXPORTED_SYMBOLS = ["BookmarkRepairRequestor", "BookmarkRepairResponder"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/services/sync/modules/bookmark_validator.js b/services/sync/modules/bookmark_validator.js index 2efd5538b35a1..6a70a2afb5b69 100644 --- a/services/sync/modules/bookmark_validator.js +++ b/services/sync/modules/bookmark_validator.js @@ -20,7 +20,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesSyncUtils", Cu.importGlobalProperties(["URLSearchParams"]); -this.EXPORTED_SYMBOLS = ["BookmarkValidator", "BookmarkProblemData"]; +var EXPORTED_SYMBOLS = ["BookmarkValidator", "BookmarkProblemData"]; const LEFT_PANE_ROOT_ANNO = "PlacesOrganizer/OrganizerFolder"; const LEFT_PANE_QUERY_ANNO = "PlacesOrganizer/OrganizerQuery"; diff --git a/services/sync/modules/browserid_identity.js b/services/sync/modules/browserid_identity.js index 02c18ec5b1335..5d76a756a53c1 100644 --- a/services/sync/modules/browserid_identity.js +++ b/services/sync/modules/browserid_identity.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["BrowserIDManager", "AuthenticationError"]; +var EXPORTED_SYMBOLS = ["BrowserIDManager", "AuthenticationError"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -51,7 +51,7 @@ const OBSERVER_TOPICS = [ // It is recorded in the *main* ping, *not* the Sync ping. // These bad states may persist across browser restarts, and may never change // (eg, users may *never* validate) -this.telemetryHelper = { +var telemetryHelper = { // These are both the "status" values passed to maybeRecordLoginState and // the key we use for our keyed scalar. STATES: { @@ -152,7 +152,7 @@ AuthenticationError.prototype = { } }; -this.BrowserIDManager = function BrowserIDManager() { +function BrowserIDManager() { // NOTE: _fxaService and _tokenServerClient are replaced with mocks by // the test suite. this._fxaService = fxAccounts; @@ -162,7 +162,7 @@ this.BrowserIDManager = function BrowserIDManager() { this.whenReadyToAuthenticate = null; this._log = log; XPCOMUtils.defineLazyPreferenceGetter(this, "_username", "services.sync.username"); -}; +} this.BrowserIDManager.prototype = { _fxaService: null, diff --git a/services/sync/modules/collection_repair.js b/services/sync/modules/collection_repair.js index eb771c997ba48..0ad2119082c49 100644 --- a/services/sync/modules/collection_repair.js +++ b/services/sync/modules/collection_repair.js @@ -9,10 +9,10 @@ ChromeUtils.import("resource://services-sync/main.js"); ChromeUtils.defineModuleGetter(this, "BookmarkRepairRequestor", "resource://services-sync/bookmark_repair.js"); -this.EXPORTED_SYMBOLS = ["getRepairRequestor", "getAllRepairRequestors", - "CollectionRepairRequestor", - "getRepairResponder", - "CollectionRepairResponder"]; +var EXPORTED_SYMBOLS = ["getRepairRequestor", "getAllRepairRequestors", + "CollectionRepairRequestor", + "getRepairResponder", + "CollectionRepairResponder"]; // The individual requestors/responders, lazily loaded. const REQUESTORS = { diff --git a/services/sync/modules/collection_validator.js b/services/sync/modules/collection_validator.js index f48c1d8eed984..537ea12626a75 100644 --- a/services/sync/modules/collection_validator.js +++ b/services/sync/modules/collection_validator.js @@ -10,7 +10,7 @@ ChromeUtils.defineModuleGetter(this, "Async", "resource://services-common/async.js"); -this.EXPORTED_SYMBOLS = ["CollectionValidator", "CollectionProblemData"]; +var EXPORTED_SYMBOLS = ["CollectionValidator", "CollectionProblemData"]; class CollectionProblemData { constructor() { diff --git a/services/sync/modules/constants.js b/services/sync/modules/constants.js index 850d2fc1ce4c0..79ad28a8cc21f 100644 --- a/services/sync/modules/constants.js +++ b/services/sync/modules/constants.js @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Process each item in the "constants hash" to add to "global" and give a name -this.EXPORTED_SYMBOLS = []; +var EXPORTED_SYMBOLS = []; for (let [key, val] of Object.entries({ // Don't manually modify this line, as it is automatically replaced on merge day diff --git a/services/sync/modules/doctor.js b/services/sync/modules/doctor.js index 3031295749049..69f879723ef13 100644 --- a/services/sync/modules/doctor.js +++ b/services/sync/modules/doctor.js @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Doctor"]; +var EXPORTED_SYMBOLS = ["Doctor"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -27,9 +27,9 @@ ChromeUtils.defineModuleGetter(this, "getAllRepairRequestors", const log = Log.repository.getLogger("Sync.Doctor"); -this.REPAIR_ADVANCE_PERIOD = 86400; // 1 day +var REPAIR_ADVANCE_PERIOD = 86400; // 1 day -this.Doctor = { +var Doctor = { anyClientsRepairing(service, collection, ignoreFlowID = null) { if (!service || !service.clientsEngine) { log.info("Missing clients engine, assuming we're in test code"); diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index bed005736234c..20c7b68e889f3 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -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 = [ +var EXPORTED_SYMBOLS = [ "EngineManager", "SyncEngine", "Tracker", @@ -43,7 +43,7 @@ function ensureDirectory(path) { * want to sync. * */ -this.Tracker = function Tracker(name, engine) { +function Tracker(name, engine) { if (!engine) { throw new Error("Tracker must be associated with an Engine instance."); } @@ -64,7 +64,7 @@ this.Tracker = function Tracker(name, engine) { this.ignoreAll = false; this.asyncObserver = Async.asyncObserver(this, this._log); -}; +} Tracker.prototype = { /* @@ -274,7 +274,7 @@ Tracker.prototype = { * and/or applyIncoming function on top of the basic APIs. */ -this.Store = function Store(name, engine) { +function Store(name, engine) { if (!engine) { throw new Error("Store must be associated with an Engine instance."); } @@ -288,7 +288,7 @@ this.Store = function Store(name, engine) { XPCOMUtils.defineLazyGetter(this, "_timer", function() { return Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); }); -}; +} Store.prototype = { /** @@ -462,7 +462,7 @@ Store.prototype = { } }; -this.EngineManager = function EngineManager(service) { +function EngineManager(service) { this.service = service; this._engines = {}; @@ -474,7 +474,7 @@ this.EngineManager = function EngineManager(service) { // define the default level for all engine logs here (although each engine // allows its level to be controlled via a specific, non-default pref) Log.repository.getLogger(`Sync.Engine`).manageLevelFromPref("services.sync.log.logger.engine"); -}; +} EngineManager.prototype = { get(name) { // Return an array of engines if we have an array of names @@ -629,7 +629,7 @@ EngineManager.prototype = { }, }; -this.SyncEngine = function SyncEngine(name, service) { +function SyncEngine(name, service) { if (!service) { throw new Error("SyncEngine must be associated with a Service instance."); } @@ -701,7 +701,7 @@ this.SyncEngine = function SyncEngine(name, service) { // Additionally, we use this as the set of items to upload for bookmark // repair reponse, which has similar constraints. this._needWeakUpload = new Map(); -}; +} // Enumeration to define approaches to handling bad records. // Attached to the constructor to allow use as a kind of static enumeration. diff --git a/services/sync/modules/engines/addons.js b/services/sync/modules/engines/addons.js index ec6a7d170e0df..725aa6351575f 100644 --- a/services/sync/modules/engines/addons.js +++ b/services/sync/modules/engines/addons.js @@ -52,7 +52,7 @@ ChromeUtils.defineModuleGetter(this, "AddonManager", ChromeUtils.defineModuleGetter(this, "AddonRepository", "resource://gre/modules/addons/AddonRepository.jsm"); -this.EXPORTED_SYMBOLS = ["AddonsEngine", "AddonValidator"]; +var EXPORTED_SYMBOLS = ["AddonsEngine", "AddonValidator"]; // 7 days in milliseconds. const PRUNE_ADDON_CHANGES_THRESHOLD = 60 * 60 * 24 * 7 * 1000; @@ -109,11 +109,11 @@ Utils.deferGetSet(AddonRecord, "cleartext", ["addonID", * The engine instance overrides a handful of functions on the base class. The * rationale for each is documented by that function. */ -this.AddonsEngine = function AddonsEngine(service) { +function AddonsEngine(service) { SyncEngine.call(this, "Addons", service); this._reconciler = new AddonsReconciler(this._tracker.asyncObserver); -}; +} AddonsEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: AddonsStore, diff --git a/services/sync/modules/engines/bookmarks.js b/services/sync/modules/engines/bookmarks.js index ddb68b34d379d..8813450ea9744 100644 --- a/services/sync/modules/engines/bookmarks.js +++ b/services/sync/modules/engines/bookmarks.js @@ -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/. */ -this.EXPORTED_SYMBOLS = ["BookmarksEngine", "PlacesItem", "Bookmark", - "BookmarkFolder", "BookmarkQuery", - "Livemark", "BookmarkSeparator", - "BufferedBookmarksEngine"]; +var EXPORTED_SYMBOLS = ["BookmarksEngine", "PlacesItem", "Bookmark", + "BookmarkFolder", "BookmarkQuery", + "Livemark", "BookmarkSeparator", + "BufferedBookmarksEngine"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -87,10 +87,10 @@ function getTypeObject(type) { return null; } -this.PlacesItem = function PlacesItem(collection, id, type) { +function PlacesItem(collection, id, type) { CryptoWrapper.call(this, collection, id); this.type = type || "item"; -}; +} PlacesItem.prototype = { async decrypt(keyBundle) { // Do the normal CryptoWrapper decrypt, but change types before returning @@ -145,9 +145,9 @@ Utils.deferGetSet(PlacesItem, "cleartext", ["hasDupe", "parentid", "parentName", "type", "dateAdded"]); -this.Bookmark = function Bookmark(collection, id, type) { +function Bookmark(collection, id, type) { PlacesItem.call(this, collection, id, type || "bookmark"); -}; +} Bookmark.prototype = { __proto__: PlacesItem.prototype, _logName: "Sync.Record.Bookmark", @@ -179,9 +179,9 @@ Utils.deferGetSet(Bookmark, ["title", "bmkUri", "description", "loadInSidebar", "tags", "keyword"]); -this.BookmarkQuery = function BookmarkQuery(collection, id) { +function BookmarkQuery(collection, id) { Bookmark.call(this, collection, id, "query"); -}; +} BookmarkQuery.prototype = { __proto__: Bookmark.prototype, _logName: "Sync.Record.BookmarkQuery", @@ -204,9 +204,9 @@ Utils.deferGetSet(BookmarkQuery, "cleartext", ["folderName", "queryId"]); -this.BookmarkFolder = function BookmarkFolder(collection, id, type) { +function BookmarkFolder(collection, id, type) { PlacesItem.call(this, collection, id, type || "folder"); -}; +} BookmarkFolder.prototype = { __proto__: PlacesItem.prototype, _logName: "Sync.Record.Folder", @@ -229,9 +229,9 @@ BookmarkFolder.prototype = { Utils.deferGetSet(BookmarkFolder, "cleartext", ["description", "title", "children"]); -this.Livemark = function Livemark(collection, id) { +function Livemark(collection, id) { BookmarkFolder.call(this, collection, id, "livemark"); -}; +} Livemark.prototype = { __proto__: BookmarkFolder.prototype, _logName: "Sync.Record.Livemark", @@ -254,9 +254,9 @@ Livemark.prototype = { Utils.deferGetSet(Livemark, "cleartext", ["siteUri", "feedUri"]); -this.BookmarkSeparator = function BookmarkSeparator(collection, id) { +function BookmarkSeparator(collection, id) { PlacesItem.call(this, collection, id, "separator"); -}; +} BookmarkSeparator.prototype = { __proto__: PlacesItem.prototype, _logName: "Sync.Record.Separator", @@ -379,9 +379,9 @@ BaseBookmarksEngine.prototype = { * the default implementation for reconciling changes. Handles child ordering * and deletions at the end of a sync. */ -this.BookmarksEngine = function BookmarksEngine(service) { +function BookmarksEngine(service) { BaseBookmarksEngine.apply(this, arguments); -}; +} BookmarksEngine.prototype = { __proto__: BaseBookmarksEngine.prototype, @@ -681,9 +681,9 @@ BookmarksEngine.prototype = { * buffer handles reconciliation, so we stub out `_reconcile`, and wait to pull * changes until we're ready to upload. */ -this.BufferedBookmarksEngine = function BufferedBookmarksEngine() { +function BufferedBookmarksEngine() { BaseBookmarksEngine.apply(this, arguments); -}; +} BufferedBookmarksEngine.prototype = { __proto__: BaseBookmarksEngine.prototype, diff --git a/services/sync/modules/engines/clients.js b/services/sync/modules/engines/clients.js index 8c668bc45be9d..c067167b26108 100644 --- a/services/sync/modules/engines/clients.js +++ b/services/sync/modules/engines/clients.js @@ -20,7 +20,7 @@ * commands.json, update it, and write it back out. */ -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "ClientEngine", "ClientsRec" ]; @@ -65,9 +65,9 @@ function hasDupeCommand(commands, action) { Utils.deepEquals(other.args, action.args)); } -this.ClientsRec = function ClientsRec(collection, id) { +function ClientsRec(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} ClientsRec.prototype = { __proto__: CryptoWrapper.prototype, _logName: "Sync.Record.Clients", @@ -82,7 +82,7 @@ Utils.deferGetSet(ClientsRec, "fxaDeviceId"]); -this.ClientEngine = function ClientEngine(service) { +function ClientEngine(service) { SyncEngine.call(this, "Clients", service); // Reset the last sync timestamp on every startup so that we fetch all clients @@ -90,7 +90,7 @@ this.ClientEngine = function ClientEngine(service) { this.fxAccounts = fxAccounts; this.addClientCommandQueue = Promise.resolve(); Utils.defineLazyIDProperty(this, "localID", "services.sync.client.GUID"); -}; +} ClientEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: ClientStore, diff --git a/services/sync/modules/engines/extension-storage.js b/services/sync/modules/engines/extension-storage.js index b1e26746a1544..0e33126256219 100644 --- a/services/sync/modules/engines/extension-storage.js +++ b/services/sync/modules/engines/extension-storage.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ExtensionStorageEngine"]; +var EXPORTED_SYMBOLS = ["ExtensionStorageEngine"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://services-sync/constants.js"); @@ -21,9 +21,9 @@ ChromeUtils.defineModuleGetter(this, "extensionStorageSync", * for syncing that we do not need to integrate in the Firefox Sync * framework, so this is something of a stub. */ -this.ExtensionStorageEngine = function ExtensionStorageEngine(service) { +function ExtensionStorageEngine(service) { SyncEngine.call(this, "Extension-Storage", service); -}; +} ExtensionStorageEngine.prototype = { __proto__: SyncEngine.prototype, _trackerObj: ExtensionStorageTracker, diff --git a/services/sync/modules/engines/forms.js b/services/sync/modules/engines/forms.js index 80e92fe2d3fb9..a35090b48c193 100644 --- a/services/sync/modules/engines/forms.js +++ b/services/sync/modules/engines/forms.js @@ -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 = ["FormEngine", "FormRec", "FormValidator"]; +var EXPORTED_SYMBOLS = ["FormEngine", "FormRec", "FormValidator"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://services-sync/engines.js"); @@ -17,9 +17,9 @@ ChromeUtils.defineModuleGetter(this, "FormHistory", const FORMS_TTL = 3 * 365 * 24 * 60 * 60; // Three years in seconds. -this.FormRec = function FormRec(collection, id) { +function FormRec(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} FormRec.prototype = { __proto__: CryptoWrapper.prototype, _logName: "Sync.Record.Form", @@ -96,9 +96,9 @@ var FormWrapper = { }; -this.FormEngine = function FormEngine(service) { +function FormEngine(service) { SyncEngine.call(this, "Forms", service); -}; +} FormEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: FormStore, diff --git a/services/sync/modules/engines/history.js b/services/sync/modules/engines/history.js index 6055cef265ce7..cd3010d245852 100644 --- a/services/sync/modules/engines/history.js +++ b/services/sync/modules/engines/history.js @@ -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 = ["HistoryEngine", "HistoryRec"]; +var EXPORTED_SYMBOLS = ["HistoryEngine", "HistoryRec"]; const HISTORY_TTL = 5184000; // 60 days in milliseconds const THIRTY_DAYS_IN_MS = 2592000000; // 30 days in milliseconds @@ -21,9 +21,9 @@ ChromeUtils.defineModuleGetter(this, "PlacesUtils", ChromeUtils.defineModuleGetter(this, "PlacesSyncUtils", "resource://gre/modules/PlacesSyncUtils.jsm"); -this.HistoryRec = function HistoryRec(collection, id) { +function HistoryRec(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} HistoryRec.prototype = { __proto__: CryptoWrapper.prototype, _logName: "Sync.Record.History", @@ -33,9 +33,9 @@ HistoryRec.prototype = { Utils.deferGetSet(HistoryRec, "cleartext", ["histUri", "title", "visits"]); -this.HistoryEngine = function HistoryEngine(service) { +function HistoryEngine(service) { SyncEngine.call(this, "History", service); -}; +} HistoryEngine.prototype = { __proto__: SyncEngine.prototype, _recordObj: HistoryRec, diff --git a/services/sync/modules/engines/passwords.js b/services/sync/modules/engines/passwords.js index a15ad6ca57259..1af6f674bf57f 100644 --- a/services/sync/modules/engines/passwords.js +++ b/services/sync/modules/engines/passwords.js @@ -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 = ["PasswordEngine", "LoginRec", "PasswordValidator"]; +var EXPORTED_SYMBOLS = ["PasswordEngine", "LoginRec", "PasswordValidator"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://services-sync/record.js"); @@ -43,9 +43,9 @@ function isSyncableChange(oldLogin, newLogin) { return false; } -this.LoginRec = function LoginRec(collection, id) { +function LoginRec(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} LoginRec.prototype = { __proto__: CryptoWrapper.prototype, _logName: "Sync.Record.Login", @@ -66,9 +66,9 @@ Utils.deferGetSet(LoginRec, "cleartext", [ ]); -this.PasswordEngine = function PasswordEngine(service) { +function PasswordEngine(service) { SyncEngine.call(this, "Passwords", service); -}; +} PasswordEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: PasswordStore, diff --git a/services/sync/modules/engines/prefs.js b/services/sync/modules/engines/prefs.js index f3983c24a167f..d8c8076142121 100644 --- a/services/sync/modules/engines/prefs.js +++ b/services/sync/modules/engines/prefs.js @@ -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 = ["PrefsEngine", "PrefRec"]; +var EXPORTED_SYMBOLS = ["PrefsEngine", "PrefRec"]; const PREF_SYNC_PREFS_PREFIX = "services.sync.prefs.sync."; @@ -21,9 +21,9 @@ ChromeUtils.defineModuleGetter(this, "LightweightThemeManager", XPCOMUtils.defineLazyGetter(this, "PREFS_GUID", () => CommonUtils.encodeBase64URL(Services.appinfo.ID)); -this.PrefRec = function PrefRec(collection, id) { +function PrefRec(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} PrefRec.prototype = { __proto__: CryptoWrapper.prototype, _logName: "Sync.Record.Pref", @@ -32,9 +32,9 @@ PrefRec.prototype = { Utils.deferGetSet(PrefRec, "cleartext", ["value"]); -this.PrefsEngine = function PrefsEngine(service) { +function PrefsEngine(service) { SyncEngine.call(this, "Prefs", service); -}; +} PrefsEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: PrefStore, diff --git a/services/sync/modules/engines/tabs.js b/services/sync/modules/engines/tabs.js index d18ef69853ce5..a6fe6d37f60f5 100644 --- a/services/sync/modules/engines/tabs.js +++ b/services/sync/modules/engines/tabs.js @@ -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 = ["TabEngine", "TabSetRecord"]; +var EXPORTED_SYMBOLS = ["TabEngine", "TabSetRecord"]; const TABS_TTL = 1814400; // 21 days. const TAB_ENTRIES_LIMIT = 5; // How many URLs to include in tab history. @@ -20,9 +20,9 @@ ChromeUtils.defineModuleGetter(this, "PrivateBrowsingUtils", ChromeUtils.defineModuleGetter(this, "SessionStore", "resource:///modules/sessionstore/SessionStore.jsm"); -this.TabSetRecord = function TabSetRecord(collection, id) { +function TabSetRecord(collection, id) { CryptoWrapper.call(this, collection, id); -}; +} TabSetRecord.prototype = { __proto__: CryptoWrapper.prototype, _logName: "Sync.Record.Tabs", @@ -32,9 +32,9 @@ TabSetRecord.prototype = { Utils.deferGetSet(TabSetRecord, "cleartext", ["clientName", "tabs"]); -this.TabEngine = function TabEngine(service) { +function TabEngine(service) { SyncEngine.call(this, "Tabs", service); -}; +} TabEngine.prototype = { __proto__: SyncEngine.prototype, _storeObj: TabStore, diff --git a/services/sync/modules/keys.js b/services/sync/modules/keys.js index 230b7c3a1bed5..25f70ebe2a450 100644 --- a/services/sync/modules/keys.js +++ b/services/sync/modules/keys.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "BulkKeyBundle", ]; @@ -121,13 +121,13 @@ KeyBundle.prototype = { * * This is just a KeyBundle with a collection attached. */ -this.BulkKeyBundle = function BulkKeyBundle(collection) { +function BulkKeyBundle(collection) { let log = Log.repository.getLogger("Sync.BulkKeyBundle"); log.info("BulkKeyBundle being created for " + collection); KeyBundle.call(this); this._collection = collection; -}; +} BulkKeyBundle.fromHexKey = function(hexKey) { let key = CommonUtils.hexToBytes(hexKey); let bundle = new BulkKeyBundle(); diff --git a/services/sync/modules/main.js b/services/sync/modules/main.js index 27fbf48fe0056..e1c2915ee593b 100644 --- a/services/sync/modules/main.js +++ b/services/sync/modules/main.js @@ -2,11 +2,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/. */ -this.EXPORTED_SYMBOLS = ["Weave"]; +var EXPORTED_SYMBOLS = ["Weave"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -this.Weave = {}; +var Weave = {}; ChromeUtils.import("resource://services-sync/constants.js", Weave); var lazies = { "service.js": ["Service"], diff --git a/services/sync/modules/policies.js b/services/sync/modules/policies.js index edf0c942df00d..aa98b76a6433e 100644 --- a/services/sync/modules/policies.js +++ b/services/sync/modules/policies.js @@ -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 = [ +var EXPORTED_SYMBOLS = [ "ErrorHandler", "SyncScheduler", ]; @@ -34,10 +34,10 @@ function getThrottledIntervalPreference(prefName) { return Math.max(Svc.Prefs.get(prefName), 60) * 1000; } -this.SyncScheduler = function SyncScheduler(service) { +function SyncScheduler(service) { this.service = service; this.init(); -}; +} SyncScheduler.prototype = { _log: Log.repository.getLogger("Sync.SyncScheduler"), @@ -656,10 +656,10 @@ SyncScheduler.prototype = { }; -this.ErrorHandler = function ErrorHandler(service) { +function ErrorHandler(service) { this.service = service; this.init(); -}; +} ErrorHandler.prototype = { MINIMUM_ALERT_INTERVAL_MSEC: 604800000, // One week. diff --git a/services/sync/modules/record.js b/services/sync/modules/record.js index 4ce4a3db403a2..78c19dd4b6257 100644 --- a/services/sync/modules/record.js +++ b/services/sync/modules/record.js @@ -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 = [ +var EXPORTED_SYMBOLS = [ "WBORecord", "RecordManager", "CryptoWrapper", @@ -22,12 +22,12 @@ ChromeUtils.import("resource://services-sync/util.js"); ChromeUtils.import("resource://services-common/async.js"); ChromeUtils.import("resource://services-common/utils.js"); -this.WBORecord = function WBORecord(collection, id) { +function WBORecord(collection, id) { this.data = {}; this.payload = {}; this.collection = collection; // Optional. this.id = id; // Optional. -}; +} WBORecord.prototype = { _logName: "Sync.Record.WBO", @@ -103,12 +103,12 @@ WBORecord.prototype = { Utils.deferGetSet(WBORecord, "data", ["id", "modified", "sortindex", "payload"]); -this.CryptoWrapper = function CryptoWrapper(collection, id) { +function CryptoWrapper(collection, id) { this.cleartext = {}; WBORecord.call(this, collection, id); this.ciphertext = null; this.id = id; -}; +} CryptoWrapper.prototype = { __proto__: WBORecord.prototype, _logName: "Sync.Record.CryptoWrapper", @@ -216,12 +216,12 @@ Utils.deferGetSet(CryptoWrapper, "cleartext", "deleted"); /** * An interface and caching layer for records. */ -this.RecordManager = function RecordManager(service) { +function RecordManager(service) { this.service = service; this._log = Log.repository.getLogger(this._logName); this._records = {}; -}; +} RecordManager.prototype = { _recordType: CryptoWrapper, _logName: "Sync.RecordManager", @@ -284,13 +284,13 @@ RecordManager.prototype = { * You can update this thing simply by giving it /info/collections. It'll * use the last modified time to bring itself up to date. */ -this.CollectionKeyManager = function CollectionKeyManager(lastModified, default_, collections) { +function CollectionKeyManager(lastModified, default_, collections) { this.lastModified = lastModified || 0; this._default = default_ || null; this._collections = collections || {}; this._log = Log.repository.getLogger("Sync.CollectionKeyManager"); -}; +} // TODO: persist this locally as an Identity. Bug 610913. // Note that the last modified time needs to be preserved. @@ -577,7 +577,7 @@ CollectionKeyManager.prototype = { } }; -this.Collection = function Collection(uri, recordObj, service) { +function Collection(uri, recordObj, service) { if (!service) { throw new Error("Collection constructor requires a service."); } @@ -603,7 +603,7 @@ this.Collection = function Collection(uri, recordObj, service) { // Used for batch download operations -- note that this is explicitly an // opaque value and not (necessarily) a number. this._offset = null; -}; +} Collection.prototype = { __proto__: Resource.prototype, _logName: "Sync.Collection", diff --git a/services/sync/modules/resource.js b/services/sync/modules/resource.js index 5df7026f52f52..bdf979395a78e 100644 --- a/services/sync/modules/resource.js +++ b/services/sync/modules/resource.js @@ -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 = ["Resource"]; +var EXPORTED_SYMBOLS = ["Resource"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Log.jsm"); @@ -27,12 +27,12 @@ Cu.importGlobalProperties(["fetch"]); * post(data, callback) * delete(callback) */ -this.Resource = function Resource(uri) { +function Resource(uri) { this._log = Log.repository.getLogger(this._logName); this._log.manageLevelFromPref("services.sync.log.logger.network.resources"); this.uri = uri; this._headers = {}; -}; +} // (static) Caches the latest server timestamp (X-Weave-Timestamp header). Resource.serverTime = null; diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 6d418abe562ee..146a7344456e8 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -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 = ["Service"]; +var EXPORTED_SYMBOLS = ["Service"]; // How long before refreshing the cluster const CLUSTER_BACKOFF = 5 * 60 * 1000; // 5 minutes @@ -1410,7 +1410,7 @@ Sync11Service.prototype = { }, }; -this.Service = new Sync11Service(); +var Service = new Sync11Service(); this.Service.promiseInitialized = new Promise(resolve => { this.Service.onStartup().then(resolve); }); diff --git a/services/sync/modules/stages/declined.js b/services/sync/modules/stages/declined.js index 0d34dee81805c..0bd2e2ad05185 100644 --- a/services/sync/modules/stages/declined.js +++ b/services/sync/modules/stages/declined.js @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["DeclinedEngines"]; +var EXPORTED_SYMBOLS = ["DeclinedEngines"]; ChromeUtils.import("resource://services-sync/constants.js"); ChromeUtils.import("resource://gre/modules/Log.jsm"); @@ -19,7 +19,7 @@ ChromeUtils.import("resource://gre/modules/Preferences.jsm"); -this.DeclinedEngines = function(service) { +var DeclinedEngines = function(service) { this._log = Log.repository.getLogger("Sync.Declined"); this._log.manageLevelFromPref("services.sync.log.logger.declined"); diff --git a/services/sync/modules/stages/enginesync.js b/services/sync/modules/stages/enginesync.js index 12927be3f8a96..ac40634218a2c 100644 --- a/services/sync/modules/stages/enginesync.js +++ b/services/sync/modules/stages/enginesync.js @@ -6,7 +6,7 @@ * This file contains code for synchronizing engines. */ -this.EXPORTED_SYMBOLS = ["EngineSynchronizer"]; +var EXPORTED_SYMBOLS = ["EngineSynchronizer"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Log.jsm"); @@ -21,12 +21,12 @@ ChromeUtils.defineModuleGetter(this, "Doctor", * * This was originally split out of service.js. The API needs lots of love. */ -this.EngineSynchronizer = function EngineSynchronizer(service) { +function EngineSynchronizer(service) { this._log = Log.repository.getLogger("Sync.Synchronizer"); this._log.manageLevelFromPref("services.sync.log.logger.synchronizer"); this.service = service; -}; +} EngineSynchronizer.prototype = { async sync(engineNamesToSync, why) { diff --git a/services/sync/modules/status.js b/services/sync/modules/status.js index c9a3e58cd55f3..f481fc898a178 100644 --- a/services/sync/modules/status.js +++ b/services/sync/modules/status.js @@ -2,14 +2,14 @@ * 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 = ["Status"]; +var EXPORTED_SYMBOLS = ["Status"]; ChromeUtils.import("resource://services-sync/constants.js"); ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.import("resource://services-sync/browserid_identity.js"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.Status = { +var Status = { _log: Log.repository.getLogger("Sync.Status"), __authManager: null, ready: false, diff --git a/services/sync/modules/telemetry.js b/services/sync/modules/telemetry.js index f368f0132302f..dfb86993b08b7 100644 --- a/services/sync/modules/telemetry.js +++ b/services/sync/modules/telemetry.js @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SyncTelemetry"]; +var EXPORTED_SYMBOLS = ["SyncTelemetry"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -748,4 +748,4 @@ class SyncTelemetryImpl { } /* global SyncTelemetry */ -this.SyncTelemetry = new SyncTelemetryImpl(ENGINES); +var SyncTelemetry = new SyncTelemetryImpl(ENGINES); diff --git a/services/sync/modules/util.js b/services/sync/modules/util.js index 0a1b594449ce9..d7c0ba02655fd 100644 --- a/services/sync/modules/util.js +++ b/services/sync/modules/util.js @@ -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 = ["Utils", "Svc", "SerializableSet"]; +var EXPORTED_SYMBOLS = ["Utils", "Svc", "SerializableSet"]; ChromeUtils.import("resource://services-common/observers.js"); ChromeUtils.import("resource://services-common/utils.js"); @@ -53,7 +53,7 @@ class HMACMismatch extends Error { /* * Utility functions */ -this.Utils = { +var Utils = { // Aliases from CryptoUtils. generateRandomBytes: CryptoUtils.generateRandomBytes, computeHTTPMACSHA1: CryptoUtils.computeHTTPMACSHA1, @@ -778,7 +778,7 @@ XPCOMUtils.defineLazyGetter(Utils, "utf8Encoder", () => /* * Commonly-used services */ -this.Svc = {}; +var Svc = {}; Svc.Prefs = new Preferences(PREFS_BRANCH); Svc.Obs = Observers; diff --git a/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm b/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm index f41f981397528..b6263bb7825e9 100644 --- a/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm +++ b/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Authentication", ]; diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm index b782e6aaced2a..024d6be03eec8 100644 --- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm +++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm @@ -11,7 +11,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "BrowserTestUtils", ]; @@ -67,7 +67,7 @@ var gSynthesizeCompositionChangeCount = 0; const kAboutPageRegistrationContentScript = "chrome://mochikit/content/tests/BrowserTestUtils/content-about-page-utils.js"; -this.BrowserTestUtils = { +var BrowserTestUtils = { /** * Loads a page in a new tab, executes a Task and closes the tab. * diff --git a/testing/mochitest/BrowserTestUtils/ContentTask.jsm b/testing/mochitest/BrowserTestUtils/ContentTask.jsm index 058c54d590ef0..004cfcd4bc6c8 100644 --- a/testing/mochitest/BrowserTestUtils/ContentTask.jsm +++ b/testing/mochitest/BrowserTestUtils/ContentTask.jsm @@ -6,7 +6,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "ContentTask" ]; @@ -33,7 +33,7 @@ var gMessageID = 1; /** * This object provides the public module functions. */ -this.ContentTask = { +var ContentTask = { /** * _testScope saves the current testScope from * browser-test.js. This is used to implement SimpleTest functions diff --git a/testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm b/testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm index ab09c27bdbb10..a361f59b86722 100644 --- a/testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm +++ b/testing/mochitest/BrowserTestUtils/ContentTaskUtils.jsm @@ -12,13 +12,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "ContentTaskUtils", ]; ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.ContentTaskUtils = { +var ContentTaskUtils = { /** * Will poll a condition function until it returns true. * diff --git a/testing/mochitest/ShutdownLeaksCollector.jsm b/testing/mochitest/ShutdownLeaksCollector.jsm index ee8a522efd5b0..2f92d46f094b3 100644 --- a/testing/mochitest/ShutdownLeaksCollector.jsm +++ b/testing/mochitest/ShutdownLeaksCollector.jsm @@ -5,7 +5,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.EXPORTED_SYMBOLS = ["ContentCollector"]; +var EXPORTED_SYMBOLS = ["ContentCollector"]; // This listens for the message "browser-test:collect-request". When it gets it, // it runs some GCs and CCs, then prints out a message indicating the collections diff --git a/testing/mochitest/tests/Harness_sanity/ImportTesting.jsm b/testing/mochitest/tests/Harness_sanity/ImportTesting.jsm index 899e6bccb706b..5d74ffe98d1d8 100644 --- a/testing/mochitest/tests/Harness_sanity/ImportTesting.jsm +++ b/testing/mochitest/tests/Harness_sanity/ImportTesting.jsm @@ -1,4 +1,4 @@ -this.EXPORTED_SYMBOLS = ["ImportTesting"]; +var EXPORTED_SYMBOLS = ["ImportTesting"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/testing/modules/AppData.jsm b/testing/modules/AppData.jsm index f6d5078d04ec5..ed0979ddd0cb6 100644 --- a/testing/modules/AppData.jsm +++ b/testing/modules/AppData.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "makeFakeAppDir", ]; @@ -28,7 +28,7 @@ var gFakeAppDirectoryProvider; * This returns a promise that will be resolved once the new directory * is created and installed. */ -this.makeFakeAppDir = function() { +var makeFakeAppDir = function() { let dirMode = OS.Constants.libc.S_IRWXU; let baseFile = Services.dirsvc.get("ProfD", Ci.nsIFile); let appD = baseFile.clone(); diff --git a/testing/modules/AppInfo.jsm b/testing/modules/AppInfo.jsm index 6bcf4a33090f3..c455bc2d48686 100644 --- a/testing/modules/AppInfo.jsm +++ b/testing/modules/AppInfo.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "newAppInfo", "getAppInfo", "updateAppInfo", @@ -33,7 +33,7 @@ let origRuntime = Cc["@mozilla.org/xre/app-info;1"] * crashReporter: nsICrashReporter interface is implemented if true * extraProps: extra properties added to XULAppInfo */ -this.newAppInfo = function(options = {}) { +var newAppInfo = function(options = {}) { let ID = ("ID" in options) ? options.ID : "xpcshell@tests.mozilla.org"; let name = ("name" in options) ? options.name : "xpcshell"; let version = ("version" in options) ? options.version : "1"; @@ -100,7 +100,7 @@ var currentAppInfo = newAppInfo(); /** * Obtain a reference to the current object used to define XULAppInfo. */ -this.getAppInfo = function() { return currentAppInfo; }; +var getAppInfo = function() { return currentAppInfo; }; /** * Update the current application info. @@ -110,7 +110,7 @@ this.getAppInfo = function() { return currentAppInfo; }; * To change the current XULAppInfo, simply call this function. If there was * a previously registered app info object, it will be unloaded and replaced. */ -this.updateAppInfo = function(options) { +var updateAppInfo = function(options) { currentAppInfo = newAppInfo(options); let id = Components.ID("{fbfae60b-64a4-44ef-a911-08ceb70b9f31}"); diff --git a/testing/modules/Assert.jsm b/testing/modules/Assert.jsm index 7efa70abb92db..ec2f57c4425f7 100644 --- a/testing/modules/Assert.jsm +++ b/testing/modules/Assert.jsm @@ -12,7 +12,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Assert" ]; diff --git a/testing/modules/CoverageUtils.jsm b/testing/modules/CoverageUtils.jsm index 6b4f5f0f080e6..d8837c4aad3d2 100644 --- a/testing/modules/CoverageUtils.jsm +++ b/testing/modules/CoverageUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "CoverageCollector", ]; @@ -16,7 +16,7 @@ addDebuggerToGlobal(Cu.getGlobalForObject(this)); /** * Records coverage for each test by way of the js debugger. */ -this.CoverageCollector = function(prefix) { +var CoverageCollector = function(prefix) { this._prefix = prefix; this._dbg = new Debugger(); this._dbg.collectCoverageInfo = true; diff --git a/testing/modules/FileTestUtils.jsm b/testing/modules/FileTestUtils.jsm index 439a4e74d1fd1..8d7dd3d2ba818 100644 --- a/testing/modules/FileTestUtils.jsm +++ b/testing/modules/FileTestUtils.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "FileTestUtils", ]; @@ -22,7 +22,7 @@ ChromeUtils.import("resource://testing-common/Assert.jsm", this); let gFileCounter = 1; let gPathsToRemove = []; -this.FileTestUtils = { +var FileTestUtils = { /** * Returns a reference to a temporary file that is guaranteed not to exist and * to have never been created before. If a file or a directory with this name diff --git a/testing/modules/MockRegistrar.jsm b/testing/modules/MockRegistrar.jsm index 72da6a7fc35be..5fa1211accaa5 100644 --- a/testing/modules/MockRegistrar.jsm +++ b/testing/modules/MockRegistrar.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "MockRegistrar", ]; @@ -14,7 +14,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Log.jsm"); var logger = Log.repository.getLogger("MockRegistrar"); -this.MockRegistrar = Object.freeze({ +var MockRegistrar = Object.freeze({ _registeredComponents: new Map(), _originalCIDs: new Map(), get registrar() { diff --git a/testing/modules/MockRegistry.jsm b/testing/modules/MockRegistry.jsm index 847dcd635b899..6dfc25b74b809 100644 --- a/testing/modules/MockRegistry.jsm +++ b/testing/modules/MockRegistry.jsm @@ -1,7 +1,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["MockRegistry"]; +var EXPORTED_SYMBOLS = ["MockRegistry"]; ChromeUtils.import("resource://testing-common/MockRegistrar.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/testing/modules/StructuredLog.jsm b/testing/modules/StructuredLog.jsm index bdaeaa8cf4a0f..6b0b5d6a6e438 100644 --- a/testing/modules/StructuredLog.jsm +++ b/testing/modules/StructuredLog.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "StructuredLogger", "StructuredFormatter" ]; @@ -23,7 +23,7 @@ this.EXPORTED_SYMBOLS = [ * These will each be called with the complete object to log as an * argument. */ -this.StructuredLogger = function(name, dumpFun = dump, mutators = []) { +var StructuredLogger = function(name, dumpFun = dump, mutators = []) { this.name = name; this._dumpFun = dumpFun; this._mutatorFuns = mutators; @@ -214,7 +214,7 @@ StructuredLogger.prototype = { * StructuredFormatter: Formatter class turning structured messages * into human-readable messages. */ -this.StructuredFormatter = function() { +var StructuredFormatter = function() { this.testStartTimes = {}; }; diff --git a/testing/modules/TestUtils.jsm b/testing/modules/TestUtils.jsm index 8488441cf6b80..9243382b81815 100644 --- a/testing/modules/TestUtils.jsm +++ b/testing/modules/TestUtils.jsm @@ -18,7 +18,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TestUtils", ]; @@ -26,7 +26,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.TestUtils = { +var TestUtils = { executeSoon(callbackFn) { Services.tm.dispatchToMainThread(callbackFn); }, diff --git a/testing/modules/ajv-4.1.1.js b/testing/modules/ajv-4.1.1.js index 6f38b90a1672f..9702c410c0f3c 100644 --- a/testing/modules/ajv-4.1.1.js +++ b/testing/modules/ajv-4.1.1.js @@ -1,7 +1,7 @@ "use strict"; const global = this; -this.EXPORTED_SYMBOLS = ["Ajv"]; +var EXPORTED_SYMBOLS = ["Ajv"]; /* * ajv 4.1.1: Another JSON Schema Validator diff --git a/testing/specialpowers/content/MockColorPicker.jsm b/testing/specialpowers/content/MockColorPicker.jsm index 132f62b5c7a50..de62ba87a869f 100644 --- a/testing/specialpowers/content/MockColorPicker.jsm +++ b/testing/specialpowers/content/MockColorPicker.jsm @@ -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 = ["MockColorPicker"]; +var EXPORTED_SYMBOLS = ["MockColorPicker"]; const Cm = Components.manager; @@ -32,7 +32,7 @@ var newFactory = function(window) { }; }; -this.MockColorPicker = { +var MockColorPicker = { init(window) { this.reset(); this.factory = newFactory(window); diff --git a/testing/specialpowers/content/MockFilePicker.jsm b/testing/specialpowers/content/MockFilePicker.jsm index 6570242a4c084..3c7a9c26495f9 100644 --- a/testing/specialpowers/content/MockFilePicker.jsm +++ b/testing/specialpowers/content/MockFilePicker.jsm @@ -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 = ["MockFilePicker"]; +var EXPORTED_SYMBOLS = ["MockFilePicker"]; const Cm = Components.manager; @@ -33,7 +33,7 @@ var newFactory = function(window) { }; }; -this.MockFilePicker = { +var MockFilePicker = { returnOK: Ci.nsIFilePicker.returnOK, returnCancel: Ci.nsIFilePicker.returnCancel, returnReplace: Ci.nsIFilePicker.returnReplace, diff --git a/testing/specialpowers/content/MockPermissionPrompt.jsm b/testing/specialpowers/content/MockPermissionPrompt.jsm index f07f1bbb255a4..f44befc131d08 100644 --- a/testing/specialpowers/content/MockPermissionPrompt.jsm +++ b/testing/specialpowers/content/MockPermissionPrompt.jsm @@ -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 = ["MockPermissionPrompt"]; +var EXPORTED_SYMBOLS = ["MockPermissionPrompt"]; const Cm = Components.manager; @@ -27,7 +27,7 @@ var newFactory = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory]) }; -this.MockPermissionPrompt = { +var MockPermissionPrompt = { init() { this.reset(); if (!registrar.isCIDRegistered(newClassID)) { diff --git a/testing/specialpowers/content/SpecialPowersObserver.jsm b/testing/specialpowers/content/SpecialPowersObserver.jsm index 6357a79613540..fb73a530c4452 100644 --- a/testing/specialpowers/content/SpecialPowersObserver.jsm +++ b/testing/specialpowers/content/SpecialPowersObserver.jsm @@ -26,11 +26,11 @@ const CHILD_LOGGER_SCRIPT = "chrome://specialpowers/content/MozillaLogger.js"; Services.scriptloader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserverAPI.js"); /* XPCOM gunk */ -this.SpecialPowersObserver = function SpecialPowersObserver() { +function SpecialPowersObserver() { this._isFrameScriptLoaded = false; this._messageManager = Cc["@mozilla.org/globalmessagemanager;1"]. getService(Ci.nsIMessageBroadcaster); -}; +} SpecialPowersObserver.prototype = new SpecialPowersObserverAPI(); @@ -291,8 +291,7 @@ SpecialPowersObserver.prototype.receiveMessage = function(aMessage) { return undefined; }; -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SpecialPowersObserver]); -this.SpecialPowersObserverFactory = Object.freeze({ +var SpecialPowersObserverFactory = Object.freeze({ createInstance(outer, id) { if (outer) { throw Components.results.NS_ERROR_NO_AGGREGATION; } return new SpecialPowersObserver(); diff --git a/toolkit/components/addoncompat/CompatWarning.jsm b/toolkit/components/addoncompat/CompatWarning.jsm index 083513a4901a1..71e924a524383 100644 --- a/toolkit/components/addoncompat/CompatWarning.jsm +++ b/toolkit/components/addoncompat/CompatWarning.jsm @@ -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 = ["CompatWarning"]; +var EXPORTED_SYMBOLS = ["CompatWarning"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/components/addoncompat/Prefetcher.jsm b/toolkit/components/addoncompat/Prefetcher.jsm index 8ef5be03ef73b..7aaddac1b2ef0 100644 --- a/toolkit/components/addoncompat/Prefetcher.jsm +++ b/toolkit/components/addoncompat/Prefetcher.jsm @@ -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 = ["Prefetcher"]; +var EXPORTED_SYMBOLS = ["Prefetcher"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/components/addoncompat/RemoteAddonsChild.jsm b/toolkit/components/addoncompat/RemoteAddonsChild.jsm index 89f479fb3855b..2aef52a3b77cc 100644 --- a/toolkit/components/addoncompat/RemoteAddonsChild.jsm +++ b/toolkit/components/addoncompat/RemoteAddonsChild.jsm @@ -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 = ["RemoteAddonsChild"]; +var EXPORTED_SYMBOLS = ["RemoteAddonsChild"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/components/addoncompat/RemoteAddonsParent.jsm b/toolkit/components/addoncompat/RemoteAddonsParent.jsm index 9342e6de13aa5..5dd3242a574ca 100644 --- a/toolkit/components/addoncompat/RemoteAddonsParent.jsm +++ b/toolkit/components/addoncompat/RemoteAddonsParent.jsm @@ -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 = ["RemoteAddonsParent"]; +var EXPORTED_SYMBOLS = ["RemoteAddonsParent"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/RemoteWebProgress.jsm"); diff --git a/toolkit/components/asyncshutdown/AsyncShutdown.jsm b/toolkit/components/asyncshutdown/AsyncShutdown.jsm index 3e026616a204c..e1e7b5dc45d76 100644 --- a/toolkit/components/asyncshutdown/AsyncShutdown.jsm +++ b/toolkit/components/asyncshutdown/AsyncShutdown.jsm @@ -340,14 +340,14 @@ function getOrigin(topFrame, filename = null, lineNumber = null, stack = null) { } } -this.EXPORTED_SYMBOLS = ["AsyncShutdown"]; +var EXPORTED_SYMBOLS = ["AsyncShutdown"]; /** * {string} topic -> phase */ var gPhases = new Map(); -this.AsyncShutdown = { +var AsyncShutdown = { /** * Access function getPhase. For testing purposes only. */ diff --git a/toolkit/components/cloudstorage/CloudStorage.jsm b/toolkit/components/cloudstorage/CloudStorage.jsm index bb6e753075658..ce081444f0d59 100644 --- a/toolkit/components/cloudstorage/CloudStorage.jsm +++ b/toolkit/components/cloudstorage/CloudStorage.jsm @@ -13,7 +13,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["CloudStorage"]; +var EXPORTED_SYMBOLS = ["CloudStorage"]; Cu.importGlobalProperties(["fetch"]); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); @@ -101,7 +101,7 @@ const CLOUD_PROVIDERS_URI = "resource://cloudstorage/providers.json"; * The external API exported by this module. */ -this.CloudStorage = { +var CloudStorage = { /** * Init method to initialize providers metadata */ diff --git a/toolkit/components/contentprefs/ContentPrefServiceChild.jsm b/toolkit/components/contentprefs/ContentPrefServiceChild.jsm index cd58e9f17919a..cc4deace42dcb 100644 --- a/toolkit/components/contentprefs/ContentPrefServiceChild.jsm +++ b/toolkit/components/contentprefs/ContentPrefServiceChild.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ContentPrefServiceChild" ]; +var EXPORTED_SYMBOLS = [ "ContentPrefServiceChild" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/components/contentprefs/ContentPrefServiceParent.jsm b/toolkit/components/contentprefs/ContentPrefServiceParent.jsm index f4c024a10adb4..c222c9d6500c7 100644 --- a/toolkit/components/contentprefs/ContentPrefServiceParent.jsm +++ b/toolkit/components/contentprefs/ContentPrefServiceParent.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ContentPrefServiceParent" ]; +var EXPORTED_SYMBOLS = [ "ContentPrefServiceParent" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/components/contentprefs/ContentPrefUtils.jsm b/toolkit/components/contentprefs/ContentPrefUtils.jsm index 36f6f9b3b3ba2..0030d440f6d2f 100644 --- a/toolkit/components/contentprefs/ContentPrefUtils.jsm +++ b/toolkit/components/contentprefs/ContentPrefUtils.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "ContentPref", "cbHandleResult", "cbHandleError", diff --git a/toolkit/components/contextualidentity/ContextualIdentityService.jsm b/toolkit/components/contextualidentity/ContextualIdentityService.jsm index b49f3f10277f1..7ed227e56c87e 100644 --- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm +++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm @@ -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 = ["ContextualIdentityService"]; +var EXPORTED_SYMBOLS = ["ContextualIdentityService"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -489,4 +489,4 @@ _ContextualIdentityService.prototype = { }; let path = OS.Path.join(OS.Constants.Path.profileDir, "containers.json"); -this.ContextualIdentityService = new _ContextualIdentityService(path); +var ContextualIdentityService = new _ContextualIdentityService(path); diff --git a/toolkit/components/crashes/CrashManager.jsm b/toolkit/components/crashes/CrashManager.jsm index 7a4783975c362..ed725f936e550 100644 --- a/toolkit/components/crashes/CrashManager.jsm +++ b/toolkit/components/crashes/CrashManager.jsm @@ -15,7 +15,7 @@ ChromeUtils.import("resource://gre/modules/TelemetryController.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm", this); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "CrashManager", ]; @@ -112,7 +112,7 @@ function parseAndRemoveField(obj, field) { * telemetryStoreSizeKey (string) * Telemetry histogram to report store size under. */ -this.CrashManager = function(options) { +var CrashManager = function(options) { for (let k of ["pendingDumpsDir", "submittedDumpsDir", "eventsDirs", "storeDir"]) { if (!(k in options)) { diff --git a/toolkit/components/crashes/CrashManagerTest.jsm b/toolkit/components/crashes/CrashManagerTest.jsm index 5f1760514d3a7..61945284b98a3 100644 --- a/toolkit/components/crashes/CrashManagerTest.jsm +++ b/toolkit/components/crashes/CrashManagerTest.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "configureLogging", "getManager", "sleep", @@ -23,7 +23,7 @@ ChromeUtils.import("resource://gre/modules/Timer.jsm", this); var loggingConfigured = false; -this.configureLogging = function() { +var configureLogging = function() { if (loggingConfigured) { return; } @@ -36,7 +36,7 @@ this.configureLogging = function() { loggingConfigured = true; }; -this.sleep = function(wait) { +var sleep = function(wait) { return new Promise(resolve => { setTimeout(() => { @@ -46,7 +46,7 @@ this.sleep = function(wait) { }); }; -this.TestingCrashManager = function(options) { +var TestingCrashManager = function(options) { CrashManager.call(this, options); }; @@ -141,7 +141,7 @@ this.TestingCrashManager.prototype = { var DUMMY_DIR_COUNT = 0; -this.getManager = function() { +var getManager = function() { return (async function() { const dirMode = OS.Constants.libc.S_IRWXU; let baseFile = OS.Constants.Path.profileDir; diff --git a/toolkit/components/crashmonitor/CrashMonitor.jsm b/toolkit/components/crashmonitor/CrashMonitor.jsm index b0eb6e2c903f0..46e5a14e259cd 100644 --- a/toolkit/components/crashmonitor/CrashMonitor.jsm +++ b/toolkit/components/crashmonitor/CrashMonitor.jsm @@ -31,7 +31,7 @@ * does not necessarily tell us that the checkpoint wasn't reached. */ -this.EXPORTED_SYMBOLS = [ "CrashMonitor" ]; +var EXPORTED_SYMBOLS = [ "CrashMonitor" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/osfile.jsm"); @@ -126,7 +126,7 @@ var CrashMonitorInternal = { } }; -this.CrashMonitor = { +var CrashMonitor = { /** * Notifications received during previous session. diff --git a/toolkit/components/ctypes/ctypes.jsm b/toolkit/components/ctypes/ctypes.jsm index f22d0118405ff..4615663527f8a 100644 --- a/toolkit/components/ctypes/ctypes.jsm +++ b/toolkit/components/ctypes/ctypes.jsm @@ -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 = [ "ctypes" ]; +var EXPORTED_SYMBOLS = [ "ctypes" ]; /* * This is the js module for ctypes. Import it like so: diff --git a/toolkit/components/extensions/Extension.jsm b/toolkit/components/extensions/Extension.jsm index 95a83f3e76daa..1f1807a51e422 100644 --- a/toolkit/components/extensions/Extension.jsm +++ b/toolkit/components/extensions/Extension.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["Extension", "ExtensionData", "Langpack"]; +var EXPORTED_SYMBOLS = ["Extension", "ExtensionData", "Langpack"]; /* exported Extension, ExtensionData */ /* globals Extension ExtensionData */ diff --git a/toolkit/components/extensions/ExtensionChild.jsm b/toolkit/components/extensions/ExtensionChild.jsm index f39d965c14138..c5d24c355c93a 100644 --- a/toolkit/components/extensions/ExtensionChild.jsm +++ b/toolkit/components/extensions/ExtensionChild.jsm @@ -7,7 +7,7 @@ /* exported ExtensionChild */ -this.EXPORTED_SYMBOLS = ["ExtensionChild"]; +var EXPORTED_SYMBOLS = ["ExtensionChild"]; /* * This file handles addon logic that is independent of the chrome process. diff --git a/toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm b/toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm index 01ad501ede809..77a40e2545836 100644 --- a/toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm +++ b/toolkit/components/extensions/ExtensionChildDevToolsUtils.jsm @@ -11,7 +11,7 @@ * from the child process. */ -this.EXPORTED_SYMBOLS = ["ExtensionChildDevToolsUtils"]; +var EXPORTED_SYMBOLS = ["ExtensionChildDevToolsUtils"]; ChromeUtils.import("resource://gre/modules/EventEmitter.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -80,7 +80,7 @@ class ThemeChangeObserver extends EventEmitter { } } -this.ExtensionChildDevToolsUtils = { +var ExtensionChildDevToolsUtils = { /** * Creates an cached instance of the ThemeChangeObserver class and * initializes it with the current themeName. This cached instance is diff --git a/toolkit/components/extensions/ExtensionCommon.jsm b/toolkit/components/extensions/ExtensionCommon.jsm index eb051bff3f05d..e501046fba182 100644 --- a/toolkit/components/extensions/ExtensionCommon.jsm +++ b/toolkit/components/extensions/ExtensionCommon.jsm @@ -13,7 +13,7 @@ /* exported ExtensionCommon */ -this.EXPORTED_SYMBOLS = ["ExtensionCommon"]; +var EXPORTED_SYMBOLS = ["ExtensionCommon"]; Cu.importGlobalProperties(["fetch"]); diff --git a/toolkit/components/extensions/ExtensionContent.jsm b/toolkit/components/extensions/ExtensionContent.jsm index e8808277e9981..cca28a2a3a932 100644 --- a/toolkit/components/extensions/ExtensionContent.jsm +++ b/toolkit/components/extensions/ExtensionContent.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ExtensionContent"]; +var EXPORTED_SYMBOLS = ["ExtensionContent"]; /* globals ExtensionContent */ @@ -758,7 +758,7 @@ DocumentManager = { }, }; -this.ExtensionContent = { +var ExtensionContent = { BrowserExtensionContent, Script, diff --git a/toolkit/components/extensions/ExtensionPageChild.jsm b/toolkit/components/extensions/ExtensionPageChild.jsm index 0425333803cce..225d350711b98 100644 --- a/toolkit/components/extensions/ExtensionPageChild.jsm +++ b/toolkit/components/extensions/ExtensionPageChild.jsm @@ -7,7 +7,7 @@ /* exported ExtensionPageChild */ -this.EXPORTED_SYMBOLS = ["ExtensionPageChild"]; +var EXPORTED_SYMBOLS = ["ExtensionPageChild"]; /** * This file handles privileged extension page logic that runs in the diff --git a/toolkit/components/extensions/ExtensionParent.jsm b/toolkit/components/extensions/ExtensionParent.jsm index daa27a963a35b..7d0544f78fcf8 100644 --- a/toolkit/components/extensions/ExtensionParent.jsm +++ b/toolkit/components/extensions/ExtensionParent.jsm @@ -13,7 +13,7 @@ /* exported ExtensionParent */ -this.EXPORTED_SYMBOLS = ["ExtensionParent"]; +var EXPORTED_SYMBOLS = ["ExtensionParent"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/components/extensions/ExtensionPermissions.jsm b/toolkit/components/extensions/ExtensionPermissions.jsm index 4cd887668cae9..48b741dfb81c4 100644 --- a/toolkit/components/extensions/ExtensionPermissions.jsm +++ b/toolkit/components/extensions/ExtensionPermissions.jsm @@ -15,7 +15,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { XPCOMUtils.defineLazyGetter(this, "StartupCache", () => ExtensionParent.StartupCache); -this.EXPORTED_SYMBOLS = ["ExtensionPermissions"]; +var EXPORTED_SYMBOLS = ["ExtensionPermissions"]; const FILE_NAME = "extension-preferences.json"; @@ -49,7 +49,7 @@ function emptyPermissions() { return {permissions: [], origins: []}; } -this.ExtensionPermissions = { +var ExtensionPermissions = { async _saveSoon(extension) { await lazyInit(); diff --git a/toolkit/components/extensions/ExtensionPreferencesManager.jsm b/toolkit/components/extensions/ExtensionPreferencesManager.jsm index 0c8f8fdfde682..6cf672177f0d4 100644 --- a/toolkit/components/extensions/ExtensionPreferencesManager.jsm +++ b/toolkit/components/extensions/ExtensionPreferencesManager.jsm @@ -20,7 +20,7 @@ * values that correspond to the prefs to be set. */ -this.EXPORTED_SYMBOLS = ["ExtensionPreferencesManager"]; +var EXPORTED_SYMBOLS = ["ExtensionPreferencesManager"]; const {Management} = ChromeUtils.import("resource://gre/modules/Extension.jsm", {}); diff --git a/toolkit/components/extensions/ExtensionSettingsStore.jsm b/toolkit/components/extensions/ExtensionSettingsStore.jsm index 57e08b40debb0..ca567fb51fc50 100644 --- a/toolkit/components/extensions/ExtensionSettingsStore.jsm +++ b/toolkit/components/extensions/ExtensionSettingsStore.jsm @@ -40,7 +40,7 @@ * */ -this.EXPORTED_SYMBOLS = ["ExtensionSettingsStore"]; +var EXPORTED_SYMBOLS = ["ExtensionSettingsStore"]; ChromeUtils.import("resource://gre/modules/osfile.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -241,7 +241,7 @@ function alterSetting(id, type, key, action) { return returnItem; } -this.ExtensionSettingsStore = { +var ExtensionSettingsStore = { /** * Loads the JSON file for the SettingsStore into memory. * The promise this returns must be resolved before asking the SettingsStore diff --git a/toolkit/components/extensions/ExtensionStorage.jsm b/toolkit/components/extensions/ExtensionStorage.jsm index ced5da748b4a3..beb3e536146ae 100644 --- a/toolkit/components/extensions/ExtensionStorage.jsm +++ b/toolkit/components/extensions/ExtensionStorage.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ExtensionStorage"]; +var EXPORTED_SYMBOLS = ["ExtensionStorage"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -81,7 +81,7 @@ function serialize(value) { return value; } -this.ExtensionStorage = { +var ExtensionStorage = { // Map> jsonFilePromises: new Map(), diff --git a/toolkit/components/extensions/ExtensionStorageSync.jsm b/toolkit/components/extensions/ExtensionStorageSync.jsm index fa3c1788f2fb4..55166642afb36 100644 --- a/toolkit/components/extensions/ExtensionStorageSync.jsm +++ b/toolkit/components/extensions/ExtensionStorageSync.jsm @@ -10,7 +10,7 @@ /* exported extensionIdToCollectionId */ -this.EXPORTED_SYMBOLS = ["ExtensionStorageSync", "extensionStorageSync"]; +var EXPORTED_SYMBOLS = ["ExtensionStorageSync", "extensionStorageSync"]; const global = this; @@ -107,7 +107,7 @@ function throwIfNoFxA(fxAccounts, action) { // Global ExtensionStorageSync instance that extensions and Fx Sync use. // On Android, because there's no FXAccounts instance, any syncing // operations will fail. -this.extensionStorageSync = null; +var extensionStorageSync = null; /** * Utility function to enforce an order of fields when computing an HMAC. @@ -1236,4 +1236,4 @@ class ExtensionStorageSync { } } this.ExtensionStorageSync = ExtensionStorageSync; -this.extensionStorageSync = new ExtensionStorageSync(_fxaService, Services.telemetry); +extensionStorageSync = new ExtensionStorageSync(_fxaService, Services.telemetry); diff --git a/toolkit/components/extensions/ExtensionTestCommon.jsm b/toolkit/components/extensions/ExtensionTestCommon.jsm index d02b9048fa635..3cb6469c82897 100644 --- a/toolkit/components/extensions/ExtensionTestCommon.jsm +++ b/toolkit/components/extensions/ExtensionTestCommon.jsm @@ -12,7 +12,7 @@ /* exported ExtensionTestCommon, MockExtension */ -this.EXPORTED_SYMBOLS = ["ExtensionTestCommon", "MockExtension"]; +var EXPORTED_SYMBOLS = ["ExtensionTestCommon", "MockExtension"]; Cu.importGlobalProperties(["TextEncoder"]); @@ -138,7 +138,7 @@ class MockExtension { } } -this.ExtensionTestCommon = class ExtensionTestCommon { +var ExtensionTestCommon = class ExtensionTestCommon { /** * This code is designed to make it easy to test a WebExtension * without creating a bunch of files. Everything is contained in a diff --git a/toolkit/components/extensions/ExtensionUtils.jsm b/toolkit/components/extensions/ExtensionUtils.jsm index d07d46dfd76c9..b47a59d2492e9 100644 --- a/toolkit/components/extensions/ExtensionUtils.jsm +++ b/toolkit/components/extensions/ExtensionUtils.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ExtensionUtils"]; +var EXPORTED_SYMBOLS = ["ExtensionUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -676,7 +676,7 @@ async function stringToCryptoHash(text, algo = "SHA-1") { return utf8Decoder.decode(buffer); } -this.ExtensionUtils = { +var ExtensionUtils = { checkLoadURL, defineLazyGetter, flushJarCache, diff --git a/toolkit/components/extensions/ExtensionXPCShellUtils.jsm b/toolkit/components/extensions/ExtensionXPCShellUtils.jsm index 6839134afe8e8..75933eee0bf56 100644 --- a/toolkit/components/extensions/ExtensionXPCShellUtils.jsm +++ b/toolkit/components/extensions/ExtensionXPCShellUtils.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ExtensionTestUtils"]; +var EXPORTED_SYMBOLS = ["ExtensionTestUtils"]; ChromeUtils.import("resource://gre/modules/ExtensionUtils.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/components/extensions/FindContent.jsm b/toolkit/components/extensions/FindContent.jsm index 1f5e327e35dca..75b1535ac84e2 100644 --- a/toolkit/components/extensions/FindContent.jsm +++ b/toolkit/components/extensions/FindContent.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["FindContent"]; +var EXPORTED_SYMBOLS = ["FindContent"]; /* exported FindContent */ diff --git a/toolkit/components/extensions/LegacyExtensionsUtils.jsm b/toolkit/components/extensions/LegacyExtensionsUtils.jsm index ab602e0f25405..9ec89df38fdba 100644 --- a/toolkit/components/extensions/LegacyExtensionsUtils.jsm +++ b/toolkit/components/extensions/LegacyExtensionsUtils.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["LegacyExtensionsUtils"]; +var EXPORTED_SYMBOLS = ["LegacyExtensionsUtils"]; /* exported LegacyExtensionsUtils, LegacyExtensionContext */ @@ -245,7 +245,7 @@ EmbeddedExtensionManager = { }, }; -this.LegacyExtensionsUtils = { +var LegacyExtensionsUtils = { getEmbeddedExtensionFor: (addon) => { return EmbeddedExtensionManager.getEmbeddedExtensionFor(addon); }, diff --git a/toolkit/components/extensions/MessageChannel.jsm b/toolkit/components/extensions/MessageChannel.jsm index 9eae7b40d14cb..c106a150a3815 100644 --- a/toolkit/components/extensions/MessageChannel.jsm +++ b/toolkit/components/extensions/MessageChannel.jsm @@ -97,7 +97,7 @@ * */ -this.EXPORTED_SYMBOLS = ["MessageChannel"]; +var EXPORTED_SYMBOLS = ["MessageChannel"]; /* globals MessageChannel */ diff --git a/toolkit/components/extensions/NativeManifests.jsm b/toolkit/components/extensions/NativeManifests.jsm index d4715673a92db..c68d34c825093 100644 --- a/toolkit/components/extensions/NativeManifests.jsm +++ b/toolkit/components/extensions/NativeManifests.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["NativeManifests"]; +var EXPORTED_SYMBOLS = ["NativeManifests"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -30,7 +30,7 @@ const NATIVE_MANIFEST_SCHEMA = "chrome://extensions/content/schemas/native_manif const REGPATH = "Software\\Mozilla"; -this.NativeManifests = { +var NativeManifests = { _initializePromise: null, _lookup: null, diff --git a/toolkit/components/extensions/NativeMessaging.jsm b/toolkit/components/extensions/NativeMessaging.jsm index 68449dedfc75c..9cf55bd914263 100644 --- a/toolkit/components/extensions/NativeMessaging.jsm +++ b/toolkit/components/extensions/NativeMessaging.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["NativeApp"]; +var EXPORTED_SYMBOLS = ["NativeApp"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -45,7 +45,7 @@ const PREF_MAX_WRITE = "webextensions.native-messaging.max-output-message-bytes" const global = this; -this.NativeApp = class extends EventEmitter { +var NativeApp = class extends EventEmitter { /** * @param {BaseContext} context The context that initiated the native app. * @param {string} application The identifier of the native app. diff --git a/toolkit/components/extensions/ProxyScriptContext.jsm b/toolkit/components/extensions/ProxyScriptContext.jsm index fc941fd25c94e..8ebd7fa3647f5 100644 --- a/toolkit/components/extensions/ProxyScriptContext.jsm +++ b/toolkit/components/extensions/ProxyScriptContext.jsm @@ -5,7 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ProxyScriptContext"]; +var EXPORTED_SYMBOLS = ["ProxyScriptContext"]; /* exported ProxyScriptContext */ diff --git a/toolkit/components/extensions/Schemas.jsm b/toolkit/components/extensions/Schemas.jsm index 48957e2663c0d..38eb485d9a139 100644 --- a/toolkit/components/extensions/Schemas.jsm +++ b/toolkit/components/extensions/Schemas.jsm @@ -29,7 +29,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "contentPolicyService", XPCOMUtils.defineLazyGetter(this, "StartupCache", () => ExtensionParent.StartupCache); -this.EXPORTED_SYMBOLS = ["SchemaRoot", "Schemas"]; +var EXPORTED_SYMBOLS = ["SchemaRoot", "Schemas"]; const {DEBUG} = AppConstants; diff --git a/toolkit/components/extensions/test/mochitest/webrequest_test.jsm b/toolkit/components/extensions/test/mochitest/webrequest_test.jsm index bfb1483018eda..4d8273cf0c228 100644 --- a/toolkit/components/extensions/test/mochitest/webrequest_test.jsm +++ b/toolkit/components/extensions/test/mochitest/webrequest_test.jsm @@ -1,10 +1,10 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["webrequest_test"]; +var EXPORTED_SYMBOLS = ["webrequest_test"]; Components.utils.importGlobalProperties(["fetch", "XMLHttpRequest"]); -this.webrequest_test = { +var webrequest_test = { testFetch(url) { return fetch(url); }, diff --git a/toolkit/components/jsdownloads/src/DownloadCore.jsm b/toolkit/components/jsdownloads/src/DownloadCore.jsm index db3bc2ad6883a..75eeee6bd7ac8 100644 --- a/toolkit/components/jsdownloads/src/DownloadCore.jsm +++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Download", "DownloadSource", "DownloadTarget", @@ -106,7 +106,7 @@ const kProgressUpdateIntervalMs = 400; * is transient, though it can be included in a DownloadList so that it can be * managed by the user interface and persisted across sessions. */ -this.Download = function() { +var Download = function() { this._deferSucceeded = PromiseUtils.defer(); }; @@ -1192,7 +1192,7 @@ Download.fromSerializable = function(aSerializable) { /** * Represents the source of a download, for example a document or an URI. */ -this.DownloadSource = function() {}; +var DownloadSource = function() {}; this.DownloadSource.prototype = { /** @@ -1318,7 +1318,7 @@ this.DownloadSource.fromSerializable = function(aSerializable) { * Represents the target of a download, for example a file in the global * downloads directory, or a file in the system temporary directory. */ -this.DownloadTarget = function() {}; +var DownloadTarget = function() {}; this.DownloadTarget.prototype = { /** @@ -1457,7 +1457,7 @@ this.DownloadTarget.fromSerializable = function(aSerializable) { * The properties object may also contain any of the DownloadError's * because properties, which will be set accordingly in the error object. */ -this.DownloadError = function(aProperties) { +var DownloadError = function(aProperties) { const NS_ERROR_MODULE_BASE_OFFSET = 0x45; const NS_ERROR_MODULE_NETWORK = 6; const NS_ERROR_MODULE_FILES = 13; @@ -1632,7 +1632,7 @@ this.DownloadError.fromSerializable = function(aSerializable) { /** * Template for an object that actually transfers the data for the download. */ -this.DownloadSaver = function() {}; +var DownloadSaver = function() {}; this.DownloadSaver.prototype = { /** @@ -1779,7 +1779,7 @@ this.DownloadSaver.fromSerializable = function(aSerializable) { /** * Saver object that simply copies the entire source file to the target. */ -this.DownloadCopySaver = function() {}; +var DownloadCopySaver = function() {}; this.DownloadCopySaver.prototype = { __proto__: DownloadSaver.prototype, @@ -2251,7 +2251,7 @@ this.DownloadCopySaver.fromSerializable = function(aSerializable) { * * For more background on the process, see the DownloadLegacyTransfer object. */ -this.DownloadLegacySaver = function() { +var DownloadLegacySaver = function() { this.deferExecuted = PromiseUtils.defer(); this.deferCanceled = PromiseUtils.defer(); }; @@ -2607,7 +2607,7 @@ this.DownloadLegacySaver.fromSerializable = function() { * Since this DownloadSaver type requires a live document as a source, it cannot * be persisted across sessions, unless the download already succeeded. */ -this.DownloadPDFSaver = function() { +var DownloadPDFSaver = function() { }; this.DownloadPDFSaver.prototype = { diff --git a/toolkit/components/jsdownloads/src/DownloadHistory.jsm b/toolkit/components/jsdownloads/src/DownloadHistory.jsm index 47e3601cb71f7..969a427bd3bfd 100644 --- a/toolkit/components/jsdownloads/src/DownloadHistory.jsm +++ b/toolkit/components/jsdownloads/src/DownloadHistory.jsm @@ -13,7 +13,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadHistory", ]; @@ -47,7 +47,7 @@ const METADATA_STATE_DIRTY = 8; * Provides methods to retrieve downloads from previous sessions and store * downloads for future sessions. */ -this.DownloadHistory = { +var DownloadHistory = { /** * Retrieves the main DownloadHistoryList object which provides a unified view * on downloads from both previous browsing sessions and this session. @@ -408,7 +408,7 @@ DownloadSlot.prototype = { * @param place * Places query used to retrieve history downloads. */ -this.DownloadHistoryList = function(publicList, place) { +var DownloadHistoryList = function(publicList, place) { DownloadList.call(this); // While "this._slots" contains all the data in order, the other properties diff --git a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm index cdb62877237bd..be88283043a1b 100644 --- a/toolkit/components/jsdownloads/src/DownloadIntegration.jsm +++ b/toolkit/components/jsdownloads/src/DownloadIntegration.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadIntegration", ]; @@ -129,7 +129,7 @@ const kVerdictMap = { * Provides functions to integrate with the host application, handling for * example the global prompts on shutdown. */ -this.DownloadIntegration = { +var DownloadIntegration = { /** * Main DownloadStore object for loading and saving the list of persistent * downloads, or null if the download list was never requested and thus it @@ -795,7 +795,7 @@ this.DownloadIntegration = { }, }; -this.DownloadObserver = { +var DownloadObserver = { /** * Flag to determine if the observers have been added previously. */ @@ -999,7 +999,7 @@ this.DownloadObserver = { * @param aList * DownloadList object linked to this observer. */ -this.DownloadHistoryObserver = function(aList) { +var DownloadHistoryObserver = function(aList) { this._list = aList; PlacesUtils.history.addObserver(this); }; @@ -1045,7 +1045,7 @@ this.DownloadHistoryObserver.prototype = { * @param aStore * The DownloadStore object used for saving. */ -this.DownloadAutoSaveView = function(aList, aStore) { +var DownloadAutoSaveView = function(aList, aStore) { this._list = aList; this._store = aStore; this._downloadsMap = new Map(); diff --git a/toolkit/components/jsdownloads/src/DownloadList.jsm b/toolkit/components/jsdownloads/src/DownloadList.jsm index 09a3453e586d8..193a5808eaf47 100644 --- a/toolkit/components/jsdownloads/src/DownloadList.jsm +++ b/toolkit/components/jsdownloads/src/DownloadList.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadList", "DownloadCombinedList", "DownloadSummary", @@ -20,7 +20,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); * Represents a collection of Download objects that can be viewed and managed by * the user interface, and persisted across sessions. */ -this.DownloadList = function() { +var DownloadList = function() { this._downloads = []; this._views = new Set(); }; @@ -243,7 +243,7 @@ this.DownloadList.prototype = { * @param aPrivateList * Underlying DownloadList containing private downloads. */ -this.DownloadCombinedList = function(aPublicList, aPrivateList) { +var DownloadCombinedList = function(aPublicList, aPrivateList) { DownloadList.call(this); this._publicList = aPublicList; this._privateList = aPrivateList; @@ -334,7 +334,7 @@ this.DownloadCombinedList.prototype = { /** * Provides an aggregated view on the contents of a DownloadList. */ -this.DownloadSummary = function() { +var DownloadSummary = function() { this._downloads = []; this._views = new Set(); }; diff --git a/toolkit/components/jsdownloads/src/DownloadPaths.jsm b/toolkit/components/jsdownloads/src/DownloadPaths.jsm index c848aea0da6ee..14ee7638e90b9 100644 --- a/toolkit/components/jsdownloads/src/DownloadPaths.jsm +++ b/toolkit/components/jsdownloads/src/DownloadPaths.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadPaths", ]; @@ -37,7 +37,7 @@ XPCOMUtils.defineLazyGetter(this, "gConvertToSpaceRegExp", () => { /* eslint-enable no-control-regex */ }); -this.DownloadPaths = { +var DownloadPaths = { /** * Sanitizes an arbitrary string for use as the local file name of a download. * The input is often a document title or a manually edited name. The output diff --git a/toolkit/components/jsdownloads/src/DownloadStore.jsm b/toolkit/components/jsdownloads/src/DownloadStore.jsm index 6e7bd6d1c1059..92a45162b1aae 100644 --- a/toolkit/components/jsdownloads/src/DownloadStore.jsm +++ b/toolkit/components/jsdownloads/src/DownloadStore.jsm @@ -28,7 +28,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadStore", ]; @@ -56,7 +56,7 @@ XPCOMUtils.defineLazyGetter(this, "gTextEncoder", function() { * @param aPath * String containing the file path where data should be saved. */ -this.DownloadStore = function(aList, aPath) { +var DownloadStore = function(aList, aPath) { this.list = aList; this.path = aPath; }; diff --git a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm index dc978fcc2317b..54334eb1473b2 100644 --- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm +++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadUIHelper", ]; @@ -35,7 +35,7 @@ const kStringsRequiringFormatting = { /** * Provides functions to handle status and messages in the user interface. */ -this.DownloadUIHelper = { +var DownloadUIHelper = { /** * Returns an object that can be used to display prompts related to downloads. * @@ -88,7 +88,7 @@ XPCOMUtils.defineLazyGetter(DownloadUIHelper, "strings", function() { * The nsIDOMWindow to which prompts should be attached, or null to * attach prompts to the most recently active window. */ -this.DownloadPrompter = function(aParent) { +var DownloadPrompter = function(aParent) { this._prompter = Services.ww.getNewPrompter(aParent); }; diff --git a/toolkit/components/jsdownloads/src/Downloads.jsm b/toolkit/components/jsdownloads/src/Downloads.jsm index 121ca24247234..5af30572e30af 100644 --- a/toolkit/components/jsdownloads/src/Downloads.jsm +++ b/toolkit/components/jsdownloads/src/Downloads.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Downloads", ]; @@ -33,7 +33,7 @@ Integration.downloads.defineModuleGetter(this, "DownloadIntegration", * This object is exposed directly to the consumers of this JavaScript module, * and provides the only entry point to get references to back-end objects. */ -this.Downloads = { +var Downloads = { /** * Work on downloads that were not started from a private browsing window. */ diff --git a/toolkit/components/microformats/microformat-shiv.js b/toolkit/components/microformats/microformat-shiv.js index 07721539d167a..8c95055a26763 100644 --- a/toolkit/components/microformats/microformat-shiv.js +++ b/toolkit/components/microformats/microformat-shiv.js @@ -4520,4 +4520,4 @@ try { // mozilla jsm support Components.utils.importGlobalProperties(["URL"]); } catch (e) {} -this.EXPORTED_SYMBOLS = ["Microformats"]; +var EXPORTED_SYMBOLS = ["Microformats"]; diff --git a/toolkit/components/narrate/NarrateControls.jsm b/toolkit/components/narrate/NarrateControls.jsm index 3097d3957ce02..08e7749fa019b 100644 --- a/toolkit/components/narrate/NarrateControls.jsm +++ b/toolkit/components/narrate/NarrateControls.jsm @@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/AsyncPrefs.jsm"); ChromeUtils.import("resource://gre/modules/TelemetryStopwatch.jsm"); -this.EXPORTED_SYMBOLS = ["NarrateControls"]; +var EXPORTED_SYMBOLS = ["NarrateControls"]; var gStrings = Services.strings.createBundle("chrome://global/locale/narrate.properties"); diff --git a/toolkit/components/narrate/Narrator.jsm b/toolkit/components/narrate/Narrator.jsm index a189802abea59..4b4db18468c03 100644 --- a/toolkit/components/narrate/Narrator.jsm +++ b/toolkit/components/narrate/Narrator.jsm @@ -9,7 +9,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm"); -this.EXPORTED_SYMBOLS = [ "Narrator" ]; +var EXPORTED_SYMBOLS = [ "Narrator" ]; // Maximum time into paragraph when pressing "skip previous" will go // to previous paragraph and not the start of current one. diff --git a/toolkit/components/narrate/VoiceSelect.jsm b/toolkit/components/narrate/VoiceSelect.jsm index 758b242ede4e2..f58c9555ebc1f 100644 --- a/toolkit/components/narrate/VoiceSelect.jsm +++ b/toolkit/components/narrate/VoiceSelect.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["VoiceSelect"]; +var EXPORTED_SYMBOLS = ["VoiceSelect"]; function VoiceSelect(win, label) { this._winRef = Cu.getWeakReference(win); diff --git a/toolkit/components/narrate/test/NarrateTestUtils.jsm b/toolkit/components/narrate/test/NarrateTestUtils.jsm index 34336f3e0237f..973732c7356c2 100644 --- a/toolkit/components/narrate/test/NarrateTestUtils.jsm +++ b/toolkit/components/narrate/test/NarrateTestUtils.jsm @@ -8,9 +8,9 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Preferences.jsm"); ChromeUtils.import("resource://testing-common/ContentTaskUtils.jsm"); -this.EXPORTED_SYMBOLS = [ "NarrateTestUtils" ]; +var EXPORTED_SYMBOLS = [ "NarrateTestUtils" ]; -this.NarrateTestUtils = { +var NarrateTestUtils = { TOGGLE: ".narrate-toggle", POPUP: ".narrate-dropdown .dropdown-popup", VOICE_SELECT: ".narrate-voices .select-toggle", diff --git a/toolkit/components/osfile/modules/osfile_async_front.jsm b/toolkit/components/osfile/modules/osfile_async_front.jsm index 13ec6a2f18188..f52d12393ead6 100644 --- a/toolkit/components/osfile/modules/osfile_async_front.jsm +++ b/toolkit/components/osfile/modules/osfile_async_front.jsm @@ -19,7 +19,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["OS"]; +var EXPORTED_SYMBOLS = ["OS"]; var SharedAll = {}; ChromeUtils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", SharedAll); @@ -1398,7 +1398,7 @@ File.POS_END = SysAll.POS_END; File.Error = OSError; File.DirectoryIterator = DirectoryIterator; -this.OS = {}; +var OS = {}; this.OS.File = File; this.OS.Constants = SharedAll.Constants; this.OS.Shared = { diff --git a/toolkit/components/osfile/modules/osfile_native.jsm b/toolkit/components/osfile/modules/osfile_native.jsm index 6886a21ec7ea9..3487062e3d660 100644 --- a/toolkit/components/osfile/modules/osfile_native.jsm +++ b/toolkit/components/osfile/modules/osfile_native.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["read"]; +var EXPORTED_SYMBOLS = ["read"]; var SharedAll = ChromeUtils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", {}); @@ -35,7 +35,7 @@ XPCOMUtils.defineLazyServiceGetter(this, * * This implementation does not handle option |compression|. */ -this.read = function(path, options = {}) { +var read = function(path, options = {}) { // Sanity check on types of options if ("encoding" in options && typeof options.encoding != "string") { return Promise.reject(new TypeError("Invalid type for option encoding")); @@ -71,7 +71,7 @@ this.read = function(path, options = {}) { * This should not be called when |buffer| is a view with some non-zero byte offset. * Does not handle option |compression|. */ -this.writeAtomic = function(path, buffer, options = {}) { +var writeAtomic = function(path, buffer, options = {}) { // Sanity check on types of options - we check only the encoding, since // the others are checked inside Internals.writeAtomic. if ("encoding" in options && typeof options.encoding !== "string") { diff --git a/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm b/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm index dc6ebe36ac695..c6b9d4ea5b72c 100644 --- a/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm +++ b/toolkit/components/passwordmgr/InsecurePasswordUtils.jsm @@ -5,7 +5,7 @@ /* ownerGlobal doesn't exist in content privileged windows. */ /* eslint-disable mozilla/use-ownerGlobal */ -this.EXPORTED_SYMBOLS = [ "InsecurePasswordUtils" ]; +var EXPORTED_SYMBOLS = [ "InsecurePasswordUtils" ]; const STRINGS_URI = "chrome://global/locale/security/security.properties"; @@ -29,7 +29,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => { * A module that provides utility functions for form security. * */ -this.InsecurePasswordUtils = { +var InsecurePasswordUtils = { _formRootsWarned: new WeakMap(), /** diff --git a/toolkit/components/passwordmgr/LoginHelper.jsm b/toolkit/components/passwordmgr/LoginHelper.jsm index db2821f543527..b3e2a53997ab0 100644 --- a/toolkit/components/passwordmgr/LoginHelper.jsm +++ b/toolkit/components/passwordmgr/LoginHelper.jsm @@ -12,7 +12,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "LoginHelper", ]; @@ -26,7 +26,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); /** * Contains functions shared by different Login Manager components. */ -this.LoginHelper = { +var LoginHelper = { /** * Warning: these only update if a logger was created. */ diff --git a/toolkit/components/passwordmgr/LoginImport.jsm b/toolkit/components/passwordmgr/LoginImport.jsm index 116bb0f375f5f..9a24458c57bfd 100644 --- a/toolkit/components/passwordmgr/LoginImport.jsm +++ b/toolkit/components/passwordmgr/LoginImport.jsm @@ -11,7 +11,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "LoginImport", ]; @@ -37,7 +37,7 @@ ChromeUtils.defineModuleGetter(this, "NetUtil", * @param aPath * String containing the file path of the SQLite login database. */ -this.LoginImport = function(aStore, aPath) { +var LoginImport = function(aStore, aPath) { this.store = aStore; this.path = aPath; }; diff --git a/toolkit/components/passwordmgr/LoginManagerContent.jsm b/toolkit/components/passwordmgr/LoginManagerContent.jsm index 6d3cc40c082e8..23b3a092ac840 100644 --- a/toolkit/components/passwordmgr/LoginManagerContent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm @@ -4,9 +4,9 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "LoginManagerContent", - "LoginFormFactory", - "UserAutoCompleteResult" ]; +var EXPORTED_SYMBOLS = [ "LoginManagerContent", + "LoginFormFactory", + "UserAutoCompleteResult" ]; const PASSWORD_INPUT_ADDED_COALESCING_THRESHOLD_MS = 1; const AUTOCOMPLETE_AFTER_RIGHT_CLICK_THRESHOLD_MS = 400; diff --git a/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm b/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm index 517f51cb70b38..826c358c46d7d 100644 --- a/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm +++ b/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["LoginManagerContextMenu"]; +var EXPORTED_SYMBOLS = ["LoginManagerContextMenu"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm index ce191f9af2b26..e07a0e99788a8 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm @@ -20,7 +20,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => { return logger.log.bind(logger); }); -this.EXPORTED_SYMBOLS = [ "LoginManagerParent" ]; +var EXPORTED_SYMBOLS = [ "LoginManagerParent" ]; var LoginManagerParent = { /** diff --git a/toolkit/components/passwordmgr/LoginRecipes.jsm b/toolkit/components/passwordmgr/LoginRecipes.jsm index e3c818f332808..21f0ea8431da0 100644 --- a/toolkit/components/passwordmgr/LoginRecipes.jsm +++ b/toolkit/components/passwordmgr/LoginRecipes.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["LoginRecipesContent", "LoginRecipesParent"]; +var EXPORTED_SYMBOLS = ["LoginRecipesContent", "LoginRecipesParent"]; const REQUIRED_KEYS = ["hosts"]; const OPTIONAL_KEYS = [ diff --git a/toolkit/components/passwordmgr/LoginStore.jsm b/toolkit/components/passwordmgr/LoginStore.jsm index ef296159817d3..70c2d83ed403a 100644 --- a/toolkit/components/passwordmgr/LoginStore.jsm +++ b/toolkit/components/passwordmgr/LoginStore.jsm @@ -42,7 +42,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "LoginStore", ]; diff --git a/toolkit/components/passwordmgr/OSCrypto.jsm b/toolkit/components/passwordmgr/OSCrypto.jsm index 28a9e986a8d1b..5a93dc89b0d7d 100644 --- a/toolkit/components/passwordmgr/OSCrypto.jsm +++ b/toolkit/components/passwordmgr/OSCrypto.jsm @@ -11,7 +11,7 @@ ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.EXPORTED_SYMBOLS = ["OSCrypto"]; +var EXPORTED_SYMBOLS = ["OSCrypto"]; var OSCrypto = {}; diff --git a/toolkit/components/passwordmgr/test/LoginTestUtils.jsm b/toolkit/components/passwordmgr/test/LoginTestUtils.jsm index 1692274ae41ac..211fd33db84ea 100644 --- a/toolkit/components/passwordmgr/test/LoginTestUtils.jsm +++ b/toolkit/components/passwordmgr/test/LoginTestUtils.jsm @@ -7,7 +7,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "LoginTestUtils", ]; @@ -21,7 +21,7 @@ const LoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1", "nsILoginInfo", "init"); -this.LoginTestUtils = { +var LoginTestUtils = { /** * Forces the storage module to save all data, and the Login Manager service * to replace the storage module with a newly initialized instance. diff --git a/toolkit/components/payments/test/PaymentTestUtils.jsm b/toolkit/components/payments/test/PaymentTestUtils.jsm index 15fc0f6a27388..e305eb3151102 100644 --- a/toolkit/components/payments/test/PaymentTestUtils.jsm +++ b/toolkit/components/payments/test/PaymentTestUtils.jsm @@ -1,8 +1,8 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PaymentTestUtils"]; +var EXPORTED_SYMBOLS = ["PaymentTestUtils"]; -this.PaymentTestUtils = { +var PaymentTestUtils = { /** * Common content tasks functions to be used with ContentTask.spawn. */ diff --git a/toolkit/components/perf/PerfMeasurement.jsm b/toolkit/components/perf/PerfMeasurement.jsm index 29a221c6f4ca4..021fa02e8ec59 100644 --- a/toolkit/components/perf/PerfMeasurement.jsm +++ b/toolkit/components/perf/PerfMeasurement.jsm @@ -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 = [ "PerfMeasurement" ]; +var EXPORTED_SYMBOLS = [ "PerfMeasurement" ]; /* * This is the js module for jsperf. Import it like so: diff --git a/toolkit/components/perfmonitoring/PerformanceStats.jsm b/toolkit/components/perfmonitoring/PerformanceStats.jsm index e592dae2cbb6b..a477cf16f4d0a 100644 --- a/toolkit/components/perfmonitoring/PerformanceStats.jsm +++ b/toolkit/components/perfmonitoring/PerformanceStats.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PerformanceStats"]; +var EXPORTED_SYMBOLS = ["PerformanceStats"]; /** * API for querying and examining performance data. @@ -566,7 +566,7 @@ Services.obs.addObserver(function(subject, topic, value) { }, FINALIZATION_TOPIC); // Public API -this.PerformanceStats = { +var PerformanceStats = { /** * Create a monitor for observing a set of performance probes. */ diff --git a/toolkit/components/perfmonitoring/PerformanceWatcher.jsm b/toolkit/components/perfmonitoring/PerformanceWatcher.jsm index 921e5487c4fe6..93e8a79e53fbc 100644 --- a/toolkit/components/perfmonitoring/PerformanceWatcher.jsm +++ b/toolkit/components/perfmonitoring/PerformanceWatcher.jsm @@ -40,7 +40,7 @@ * of this API. */ -this.EXPORTED_SYMBOLS = ["PerformanceWatcher"]; +var EXPORTED_SYMBOLS = ["PerformanceWatcher"]; let { PerformanceStats, performanceStatsService } = ChromeUtils.import("resource://gre/modules/PerformanceStats.jsm", {}); let { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm", {}); @@ -286,7 +286,7 @@ BufferedObserver.prototype.observe = function(source, details) { } }; -this.PerformanceWatcher = { +var PerformanceWatcher = { /** * Add a listener informed whenever we receive a slow performance alert * in the application. diff --git a/toolkit/components/places/BookmarkHTMLUtils.jsm b/toolkit/components/places/BookmarkHTMLUtils.jsm index b7b9e42192117..5f56ac9f9060e 100644 --- a/toolkit/components/places/BookmarkHTMLUtils.jsm +++ b/toolkit/components/places/BookmarkHTMLUtils.jsm @@ -56,7 +56,7 @@ * both require the content (= title) before actually creating it. */ -this.EXPORTED_SYMBOLS = [ "BookmarkHTMLUtils" ]; +var EXPORTED_SYMBOLS = [ "BookmarkHTMLUtils" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -120,7 +120,7 @@ function notifyObservers(aTopic, aInitialImport) { : "html"); } -this.BookmarkHTMLUtils = Object.freeze({ +var BookmarkHTMLUtils = Object.freeze({ /** * Loads the current bookmarks hierarchy from a "bookmarks.html" file. * diff --git a/toolkit/components/places/BookmarkJSONUtils.jsm b/toolkit/components/places/BookmarkJSONUtils.jsm index 040d42eaf1084..767965d5cecd5 100644 --- a/toolkit/components/places/BookmarkJSONUtils.jsm +++ b/toolkit/components/places/BookmarkJSONUtils.jsm @@ -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 = [ "BookmarkJSONUtils" ]; +var EXPORTED_SYMBOLS = [ "BookmarkJSONUtils" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -35,7 +35,7 @@ function generateHash(aString) { return cryptoHash.finish(true).replace(/\//g, "-"); } -this.BookmarkJSONUtils = Object.freeze({ +var BookmarkJSONUtils = Object.freeze({ /** * Import bookmarks from a url. * diff --git a/toolkit/components/places/Bookmarks.jsm b/toolkit/components/places/Bookmarks.jsm index 9eb5a8ed5b291..8e7c774d9f5a0 100644 --- a/toolkit/components/places/Bookmarks.jsm +++ b/toolkit/components/places/Bookmarks.jsm @@ -57,7 +57,7 @@ * @see nsINavBookmarkObserver */ -this.EXPORTED_SYMBOLS = [ "Bookmarks" ]; +var EXPORTED_SYMBOLS = [ "Bookmarks" ]; Cu.importGlobalProperties(["URL"]); diff --git a/toolkit/components/places/ExtensionSearchHandler.jsm b/toolkit/components/places/ExtensionSearchHandler.jsm index b0c79d9db1566..613440a580f74 100644 --- a/toolkit/components/places/ExtensionSearchHandler.jsm +++ b/toolkit/components/places/ExtensionSearchHandler.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "ExtensionSearchHandler" ]; +var EXPORTED_SYMBOLS = [ "ExtensionSearchHandler" ]; // Used to keep track of all of the registered keywords, where each keyword is // mapped to a KeywordInfo instance. diff --git a/toolkit/components/places/History.jsm b/toolkit/components/places/History.jsm index 561060f59ad8c..f2523d19d76f4 100644 --- a/toolkit/components/places/History.jsm +++ b/toolkit/components/places/History.jsm @@ -66,7 +66,7 @@ * @see nsINavHistoryObserver */ -this.EXPORTED_SYMBOLS = [ "History" ]; +var EXPORTED_SYMBOLS = [ "History" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "AsyncShutdown", @@ -111,7 +111,7 @@ function notify(observers, notification, args = []) { } } -this.History = Object.freeze({ +var History = Object.freeze({ /** * Fetch the available information for one page. * diff --git a/toolkit/components/places/PlacesBackups.jsm b/toolkit/components/places/PlacesBackups.jsm index 9ea635a7b7154..e79a538192330 100644 --- a/toolkit/components/places/PlacesBackups.jsm +++ b/toolkit/components/places/PlacesBackups.jsm @@ -4,7 +4,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 = ["PlacesBackups"]; +var EXPORTED_SYMBOLS = ["PlacesBackups"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -92,7 +92,7 @@ async function getTopLevelFolderIds() { return guids; } -this.PlacesBackups = { +var PlacesBackups = { /** * Matches the backup filename: * 0: file name diff --git a/toolkit/components/places/PlacesDBUtils.jsm b/toolkit/components/places/PlacesDBUtils.jsm index 18ed775388d5b..9d417d73dc703 100644 --- a/toolkit/components/places/PlacesDBUtils.jsm +++ b/toolkit/components/places/PlacesDBUtils.jsm @@ -13,9 +13,9 @@ XPCOMUtils.defineLazyModuleGetters(this, { PlacesUtils: "resource://gre/modules/PlacesUtils.jsm", }); -this.EXPORTED_SYMBOLS = [ "PlacesDBUtils" ]; +var EXPORTED_SYMBOLS = [ "PlacesDBUtils" ]; -this.PlacesDBUtils = { +var PlacesDBUtils = { _isShuttingDown: false, shutdown() { PlacesDBUtils._isShuttingDown = true; diff --git a/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm b/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm index 80e81293ed1c2..0629f35169c3b 100644 --- a/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm +++ b/toolkit/components/places/PlacesRemoteTabsAutocompleteProvider.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PlacesRemoteTabsAutocompleteProvider"]; +var EXPORTED_SYMBOLS = ["PlacesRemoteTabsAutocompleteProvider"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -115,7 +115,7 @@ Services.prefs.addObserver(PREF_SHOW_REMOTE_ICONS, observe); observe(null, "nsPref:changed", PREF_SHOW_REMOTE_ICONS); // This public object is a static singleton. -this.PlacesRemoteTabsAutocompleteProvider = { +var PlacesRemoteTabsAutocompleteProvider = { // a promise that resolves with an array of matching remote tabs. getMatches(searchString) { // If Sync isn't configured we bail early. diff --git a/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm b/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm index c9acdd3f6363c..342363d1da59a 100644 --- a/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm +++ b/toolkit/components/places/PlacesSearchAutocompleteProvider.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "PlacesSearchAutocompleteProvider" ]; +var EXPORTED_SYMBOLS = [ "PlacesSearchAutocompleteProvider" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -197,7 +197,7 @@ SearchSuggestionControllerWrapper.prototype = { var gInitializationPromise = null; -this.PlacesSearchAutocompleteProvider = Object.freeze({ +var PlacesSearchAutocompleteProvider = Object.freeze({ /** * Starts initializing the component and returns a promise that is resolved or * rejected when initialization finished. The same promise is returned if diff --git a/toolkit/components/places/PlacesSyncUtils.jsm b/toolkit/components/places/PlacesSyncUtils.jsm index 686521039ae37..e8302d7ee3222 100644 --- a/toolkit/components/places/PlacesSyncUtils.jsm +++ b/toolkit/components/places/PlacesSyncUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PlacesSyncUtils"]; +var EXPORTED_SYMBOLS = ["PlacesSyncUtils"]; Cu.importGlobalProperties(["URL", "URLSearchParams"]); diff --git a/toolkit/components/places/PlacesTransactions.jsm b/toolkit/components/places/PlacesTransactions.jsm index 0d8ed07de54e8..696fd1ffa4625 100644 --- a/toolkit/components/places/PlacesTransactions.jsm +++ b/toolkit/components/places/PlacesTransactions.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PlacesTransactions"]; +var EXPORTED_SYMBOLS = ["PlacesTransactions"]; /** * Overview diff --git a/toolkit/components/places/PlacesUtils.jsm b/toolkit/components/places/PlacesUtils.jsm index 5ddecdfa66edc..d28b9a54fcf2d 100644 --- a/toolkit/components/places/PlacesUtils.jsm +++ b/toolkit/components/places/PlacesUtils.jsm @@ -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 = ["PlacesUtils"]; +var EXPORTED_SYMBOLS = ["PlacesUtils"]; Cu.importGlobalProperties(["URL"]); @@ -290,7 +290,7 @@ const SYNC_CHANGE_RECORD_VALIDATORS = Object.freeze({ synced: simpleValidateFunc(v => v === true || v === false), }); -this.PlacesUtils = { +var PlacesUtils = { // Place entries that are containers, e.g. bookmark folders or queries. TYPE_X_MOZ_PLACE_CONTAINER: "text/x-moz-place-container", // Place entries that are bookmark separators. diff --git a/toolkit/components/places/SyncedBookmarksMirror.jsm b/toolkit/components/places/SyncedBookmarksMirror.jsm index c95ec46398570..15b0be25925be 100644 --- a/toolkit/components/places/SyncedBookmarksMirror.jsm +++ b/toolkit/components/places/SyncedBookmarksMirror.jsm @@ -49,7 +49,7 @@ * issues. */ -this.EXPORTED_SYMBOLS = ["SyncedBookmarksMirror"]; +var EXPORTED_SYMBOLS = ["SyncedBookmarksMirror"]; Cu.importGlobalProperties(["URL"]); diff --git a/toolkit/components/places/tests/PlacesTestUtils.jsm b/toolkit/components/places/tests/PlacesTestUtils.jsm index 0df5241ac49fb..07df6b735f8d6 100644 --- a/toolkit/components/places/tests/PlacesTestUtils.jsm +++ b/toolkit/components/places/tests/PlacesTestUtils.jsm @@ -1,6 +1,6 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "PlacesTestUtils", ]; @@ -13,7 +13,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUtils", ChromeUtils.defineModuleGetter(this, "TestUtils", "resource://testing-common/TestUtils.jsm"); -this.PlacesTestUtils = Object.freeze({ +var PlacesTestUtils = Object.freeze({ /** * Asynchronously adds visits to a page. * diff --git a/toolkit/components/promiseworker/PromiseWorker.jsm b/toolkit/components/promiseworker/PromiseWorker.jsm index 2d1fe3ecce02e..91be448b03983 100644 --- a/toolkit/components/promiseworker/PromiseWorker.jsm +++ b/toolkit/components/promiseworker/PromiseWorker.jsm @@ -17,7 +17,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["BasePromiseWorker"]; +var EXPORTED_SYMBOLS = ["BasePromiseWorker"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this); @@ -103,7 +103,7 @@ const EXCEPTION_CONSTRUCTORS = { * * @constructor */ -this.BasePromiseWorker = function(url) { +var BasePromiseWorker = function(url) { if (typeof url != "string") { throw new TypeError("Expecting a string"); } diff --git a/toolkit/components/prompts/src/CommonDialog.jsm b/toolkit/components/prompts/src/CommonDialog.jsm index 600651e735c48..9b264cb6500e9 100644 --- a/toolkit/components/prompts/src/CommonDialog.jsm +++ b/toolkit/components/prompts/src/CommonDialog.jsm @@ -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 = ["CommonDialog"]; +var EXPORTED_SYMBOLS = ["CommonDialog"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -10,10 +10,10 @@ ChromeUtils.defineModuleGetter(this, "EnableDelayHelper", "resource://gre/modules/SharedPromptUtils.jsm"); -this.CommonDialog = function CommonDialog(args, ui) { +function CommonDialog(args, ui) { this.args = args; this.ui = ui; -}; +} CommonDialog.prototype = { args: null, diff --git a/toolkit/components/prompts/src/SharedPromptUtils.jsm b/toolkit/components/prompts/src/SharedPromptUtils.jsm index fbd1a760c3590..13049e76c8bef 100644 --- a/toolkit/components/prompts/src/SharedPromptUtils.jsm +++ b/toolkit/components/prompts/src/SharedPromptUtils.jsm @@ -1,8 +1,8 @@ -this.EXPORTED_SYMBOLS = [ "PromptUtils", "EnableDelayHelper" ]; +var EXPORTED_SYMBOLS = [ "PromptUtils", "EnableDelayHelper" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.PromptUtils = { +var PromptUtils = { // Fire a dialog open/close event. Used by tabbrowser to focus the // tab which is triggering a prompt. // For remote dialogs, we pass in a different DOM window and a separate @@ -56,7 +56,7 @@ this.PromptUtils = { * is to be disabled. * @param focusTarget The window used to watch focus/blur events. */ -this.EnableDelayHelper = function({enableDialog, disableDialog, focusTarget}) { +var EnableDelayHelper = function({enableDialog, disableDialog, focusTarget}) { this.enableDialog = makeSafe(enableDialog); this.disableDialog = makeSafe(disableDialog); this.focusTarget = focusTarget; diff --git a/toolkit/components/reader/.eslintrc.js b/toolkit/components/reader/.eslintrc.js index d9946531576bf..251d3f30acf4e 100644 --- a/toolkit/components/reader/.eslintrc.js +++ b/toolkit/components/reader/.eslintrc.js @@ -6,6 +6,6 @@ module.exports = { "new-parens": "error", "no-inner-declarations": "error", "no-shadow": "error", - "no-unused-vars": ["error", {"vars": "all", "args": "none"}], + "no-unused-vars": ["error", {"vars": "all", "varsIgnorePattern": "^EXPORTED_SYMBOLS$", "args": "none"}], }, } diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm index 7bca748c464ba..0d960f1c60260 100644 --- a/toolkit/components/reader/AboutReader.jsm +++ b/toolkit/components/reader/AboutReader.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "AboutReader" ]; +var EXPORTED_SYMBOLS = [ "AboutReader" ]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/ReaderMode.jsm"); diff --git a/toolkit/components/reader/ReaderMode.jsm b/toolkit/components/reader/ReaderMode.jsm index ddcd78d89a200..ba5eb546b3f94 100644 --- a/toolkit/components/reader/ReaderMode.jsm +++ b/toolkit/components/reader/ReaderMode.jsm @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["ReaderMode"]; +var EXPORTED_SYMBOLS = ["ReaderMode"]; // Constants for telemetry. const DOWNLOAD_SUCCESS = 0; @@ -50,7 +50,7 @@ XPCOMUtils.defineLazyGetter(this, "Readability", function() { const gIsFirefoxDesktop = Services.appinfo.ID == "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; -this.ReaderMode = { +var ReaderMode = { // Version of the cache schema. CACHE_VERSION: 1, diff --git a/toolkit/components/reader/ReaderWorker.jsm b/toolkit/components/reader/ReaderWorker.jsm index 100da748f94da..6b3db4a047c17 100644 --- a/toolkit/components/reader/ReaderWorker.jsm +++ b/toolkit/components/reader/ReaderWorker.jsm @@ -10,6 +10,6 @@ ChromeUtils.import("resource://gre/modules/PromiseWorker.jsm", this); -this.EXPORTED_SYMBOLS = ["ReaderWorker"]; +var EXPORTED_SYMBOLS = ["ReaderWorker"]; -this.ReaderWorker = new BasePromiseWorker("resource://gre/modules/reader/ReaderWorker.js"); +var ReaderWorker = new BasePromiseWorker("resource://gre/modules/reader/ReaderWorker.js"); diff --git a/toolkit/components/reflect/reflect.jsm b/toolkit/components/reflect/reflect.jsm index fd1729dd9e08c..aa2fbe5e58ff6 100644 --- a/toolkit/components/reflect/reflect.jsm +++ b/toolkit/components/reflect/reflect.jsm @@ -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 = [ "Reflect" ]; +var EXPORTED_SYMBOLS = [ "Reflect" ]; /* * This is the js module for Reflect. Import it like so: diff --git a/toolkit/components/resistfingerprinting/LanguagePrompt.jsm b/toolkit/components/resistfingerprinting/LanguagePrompt.jsm index c684609d7d6f7..d27402ccacf1a 100644 --- a/toolkit/components/resistfingerprinting/LanguagePrompt.jsm +++ b/toolkit/components/resistfingerprinting/LanguagePrompt.jsm @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -this.EXPORTED_SYMBOLS = ["LanguagePrompt"]; +var EXPORTED_SYMBOLS = ["LanguagePrompt"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/components/satchel/AutoCompletePopup.jsm b/toolkit/components/satchel/AutoCompletePopup.jsm index 9f2e119540a37..65921648eafb9 100644 --- a/toolkit/components/satchel/AutoCompletePopup.jsm +++ b/toolkit/components/satchel/AutoCompletePopup.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AutoCompletePopup"]; +var EXPORTED_SYMBOLS = ["AutoCompletePopup"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/components/satchel/FormHistory.jsm b/toolkit/components/satchel/FormHistory.jsm index 9f947f2a1069b..a031bc940a00d 100644 --- a/toolkit/components/satchel/FormHistory.jsm +++ b/toolkit/components/satchel/FormHistory.jsm @@ -84,7 +84,7 @@ * an error occurred. */ -this.EXPORTED_SYMBOLS = ["FormHistory"]; +var EXPORTED_SYMBOLS = ["FormHistory"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -331,7 +331,7 @@ function prepareInsertQuery(change, now) { // are in the process of being inserted into the database so that we know // not to try to insert the same ones on top. Attempts to do so will be // ignored. -this.InProgressInserts = { +var InProgressInserts = { _inProgress: new Map(), add(fieldname, value) { @@ -605,7 +605,7 @@ function expireOldEntriesVacuum(aExpireTime, aBeginningCount) { * utility functions, but is not exposed to the outside world. * @class */ -this.DB = { +var DB = { // Once we establish a database connection, we have to hold a reference // to it so that it won't get GC'd. _instance: null, diff --git a/toolkit/components/satchel/nsFormAutoCompleteResult.jsm b/toolkit/components/satchel/nsFormAutoCompleteResult.jsm index e0f9c1b5044c2..c835ddf7dec7b 100644 --- a/toolkit/components/satchel/nsFormAutoCompleteResult.jsm +++ b/toolkit/components/satchel/nsFormAutoCompleteResult.jsm @@ -2,18 +2,18 @@ * 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 = ["FormAutoCompleteResult"]; +var EXPORTED_SYMBOLS = ["FormAutoCompleteResult"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -this.FormAutoCompleteResult = function FormAutoCompleteResult(searchString, - searchResult, - defaultIndex, - errorDescription, - values, - labels, - comments, - prevResult) { +function FormAutoCompleteResult(searchString, + searchResult, + defaultIndex, + errorDescription, + values, + labels, + comments, + prevResult) { this.searchString = searchString; this._searchResult = searchResult; this._defaultIndex = defaultIndex; @@ -23,7 +23,7 @@ this.FormAutoCompleteResult = function FormAutoCompleteResult(searchString, this._comments = comments; this._formHistResult = prevResult; this.entries = prevResult ? prevResult.wrappedJSObject.entries : []; -}; +} FormAutoCompleteResult.prototype = { diff --git a/toolkit/components/search/SearchStaticData.jsm b/toolkit/components/search/SearchStaticData.jsm index cafd2ccf163d3..e66e30c57efdc 100644 --- a/toolkit/components/search/SearchStaticData.jsm +++ b/toolkit/components/search/SearchStaticData.jsm @@ -14,7 +14,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "SearchStaticData", ]; @@ -23,7 +23,7 @@ this.EXPORTED_SYMBOLS = [ const gGoogleDomainsSource = ".google.com .google.ad .google.ae .google.com.af .google.com.ag .google.com.ai .google.al .google.am .google.co.ao .google.com.ar .google.as .google.at .google.com.au .google.az .google.ba .google.com.bd .google.be .google.bf .google.bg .google.com.bh .google.bi .google.bj .google.com.bn .google.com.bo .google.com.br .google.bs .google.bt .google.co.bw .google.by .google.com.bz .google.ca .google.cd .google.cf .google.cg .google.ch .google.ci .google.co.ck .google.cl .google.cm .google.cn .google.com.co .google.co.cr .google.com.cu .google.cv .google.com.cy .google.cz .google.de .google.dj .google.dk .google.dm .google.com.do .google.dz .google.com.ec .google.ee .google.com.eg .google.es .google.com.et .google.fi .google.com.fj .google.fm .google.fr .google.ga .google.ge .google.gg .google.com.gh .google.com.gi .google.gl .google.gm .google.gp .google.gr .google.com.gt .google.gy .google.com.hk .google.hn .google.hr .google.ht .google.hu .google.co.id .google.ie .google.co.il .google.im .google.co.in .google.iq .google.is .google.it .google.je .google.com.jm .google.jo .google.co.jp .google.co.ke .google.com.kh .google.ki .google.kg .google.co.kr .google.com.kw .google.kz .google.la .google.com.lb .google.li .google.lk .google.co.ls .google.lt .google.lu .google.lv .google.com.ly .google.co.ma .google.md .google.me .google.mg .google.mk .google.ml .google.com.mm .google.mn .google.ms .google.com.mt .google.mu .google.mv .google.mw .google.com.mx .google.com.my .google.co.mz .google.com.na .google.com.nf .google.com.ng .google.com.ni .google.ne .google.nl .google.no .google.com.np .google.nr .google.nu .google.co.nz .google.com.om .google.com.pa .google.com.pe .google.com.pg .google.com.ph .google.com.pk .google.pl .google.pn .google.com.pr .google.ps .google.pt .google.com.py .google.com.qa .google.ro .google.ru .google.rw .google.com.sa .google.com.sb .google.sc .google.se .google.com.sg .google.sh .google.si .google.sk .google.com.sl .google.sn .google.so .google.sm .google.sr .google.st .google.com.sv .google.td .google.tg .google.co.th .google.com.tj .google.tk .google.tl .google.tm .google.tn .google.to .google.com.tr .google.tt .google.com.tw .google.co.tz .google.com.ua .google.co.ug .google.co.uk .google.com.uy .google.co.uz .google.com.vc .google.co.ve .google.vg .google.co.vi .google.com.vn .google.vu .google.ws .google.rs .google.co.za .google.co.zm .google.co.zw .google.cat"; const gGoogleDomains = gGoogleDomainsSource.split(" ").map(d => "www" + d); -this.SearchStaticData = { +var SearchStaticData = { /** * Returns a list of alternate domains for a given search engine domain. * diff --git a/toolkit/components/search/SearchSuggestionController.jsm b/toolkit/components/search/SearchSuggestionController.jsm index 266c93cb2f2db..2ea1829d10a78 100644 --- a/toolkit/components/search/SearchSuggestionController.jsm +++ b/toolkit/components/search/SearchSuggestionController.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SearchSuggestionController"]; +var EXPORTED_SYMBOLS = ["SearchSuggestionController"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -42,9 +42,9 @@ Services.prefs.addObserver(BROWSER_SUGGEST_PREF, function(aSubject, aTopic, aDat * returned by the search method instead if you prefer. * @constructor */ -this.SearchSuggestionController = function SearchSuggestionController(callback = null) { +function SearchSuggestionController(callback = null) { this._callback = callback; -}; +} this.SearchSuggestionController.prototype = { /** diff --git a/toolkit/components/telemetry/GCTelemetry.jsm b/toolkit/components/telemetry/GCTelemetry.jsm index 873679ff68fea..130708bd815d6 100644 --- a/toolkit/components/telemetry/GCTelemetry.jsm +++ b/toolkit/components/telemetry/GCTelemetry.jsm @@ -23,7 +23,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm", this); ChromeUtils.import("resource://gre/modules/Log.jsm"); -this.EXPORTED_SYMBOLS = ["GCTelemetry"]; +var EXPORTED_SYMBOLS = ["GCTelemetry"]; // Names of processes where we record GCs. const PROCESS_NAMES = ["main", "content"]; diff --git a/toolkit/components/telemetry/TelemetryArchive.jsm b/toolkit/components/telemetry/TelemetryArchive.jsm index 7511c7649b957..83692ff9bd7b1 100644 --- a/toolkit/components/telemetry/TelemetryArchive.jsm +++ b/toolkit/components/telemetry/TelemetryArchive.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryArchive" ]; @@ -20,7 +20,7 @@ const LOGGER_PREFIX = "TelemetryArchive::"; ChromeUtils.defineModuleGetter(this, "TelemetryStorage", "resource://gre/modules/TelemetryStorage.jsm"); -this.TelemetryArchive = { +var TelemetryArchive = { /** * Get a list of the archived pings, sorted by the creation date. * Note that scanning the archived pings on disk is delayed on startup, diff --git a/toolkit/components/telemetry/TelemetryController.jsm b/toolkit/components/telemetry/TelemetryController.jsm index c5c0be94c5315..148bd76337947 100644 --- a/toolkit/components/telemetry/TelemetryController.jsm +++ b/toolkit/components/telemetry/TelemetryController.jsm @@ -108,9 +108,9 @@ var Policy = { getCachedClientID: () => ClientID.getCachedClientID(), }; -this.EXPORTED_SYMBOLS = ["TelemetryController"]; +var EXPORTED_SYMBOLS = ["TelemetryController"]; -this.TelemetryController = Object.freeze({ +var TelemetryController = Object.freeze({ /** * Used only for testing purposes. */ diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index 60062a687d050..585ada5f9e23a 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryEnvironment", ]; @@ -64,7 +64,7 @@ function getGlobal() { return gGlobalEnvironment; } -this.TelemetryEnvironment = { +var TelemetryEnvironment = { get currentEnvironment() { return getGlobal().currentEnvironment; }, diff --git a/toolkit/components/telemetry/TelemetryHealthPing.jsm b/toolkit/components/telemetry/TelemetryHealthPing.jsm index 2987a851d5d20..6a721e3b3e0e9 100644 --- a/toolkit/components/telemetry/TelemetryHealthPing.jsm +++ b/toolkit/components/telemetry/TelemetryHealthPing.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryHealthPing", ]; @@ -42,7 +42,7 @@ var Policy = { clearSchedulerTickTimeout: (id) => clearTimeout(id) }; -this.TelemetryHealthPing = { +var TelemetryHealthPing = { Reason: Object.freeze({ IMMEDIATE: "immediate", // Ping was sent immediately after recording with no delay. DELAYED: "delayed", // Recorded data was sent after a delay. diff --git a/toolkit/components/telemetry/TelemetryLog.jsm b/toolkit/components/telemetry/TelemetryLog.jsm index 1e8c0da68ff2b..4c160e666ee73 100644 --- a/toolkit/components/telemetry/TelemetryLog.jsm +++ b/toolkit/components/telemetry/TelemetryLog.jsm @@ -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 = ["TelemetryLog"]; +var EXPORTED_SYMBOLS = ["TelemetryLog"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -10,7 +10,7 @@ const LOG_ENTRY_MAX_COUNT = 1000; var gLogEntries = []; -this.TelemetryLog = Object.freeze({ +var TelemetryLog = Object.freeze({ log(id, data) { if (gLogEntries.length >= LOG_ENTRY_MAX_COUNT) { return; diff --git a/toolkit/components/telemetry/TelemetryModules.jsm b/toolkit/components/telemetry/TelemetryModules.jsm index abc5c72ae8b09..e5bb76802fca1 100644 --- a/toolkit/components/telemetry/TelemetryModules.jsm +++ b/toolkit/components/telemetry/TelemetryModules.jsm @@ -20,7 +20,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gUpdateTimerManager", XPCOMUtils.defineLazyServiceGetter(this, "Telemetry", "@mozilla.org/base/telemetry;1", "nsITelemetry"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryModules", ]; @@ -35,7 +35,7 @@ const MAX_MODULES_NUM = 512; const MAX_NAME_LENGTH = 64; const TRUNCATION_DELIMITER = "\u2026"; -this.TelemetryModules = Object.freeze({ +var TelemetryModules = Object.freeze({ _log: Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX), start() { diff --git a/toolkit/components/telemetry/TelemetryReportingPolicy.jsm b/toolkit/components/telemetry/TelemetryReportingPolicy.jsm index 142743616088c..78ab892594f46 100644 --- a/toolkit/components/telemetry/TelemetryReportingPolicy.jsm +++ b/toolkit/components/telemetry/TelemetryReportingPolicy.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryReportingPolicy" ]; @@ -92,7 +92,7 @@ NotifyPolicyRequest.prototype = Object.freeze({ }, }); -this.TelemetryReportingPolicy = { +var TelemetryReportingPolicy = { // The current policy version number. If the version number stored in the prefs // is smaller than this, data upload will be disabled until the user is re-notified // about the policy changes. diff --git a/toolkit/components/telemetry/TelemetrySend.jsm b/toolkit/components/telemetry/TelemetrySend.jsm index 352d6356b4ec7..07ee15e9f1638 100644 --- a/toolkit/components/telemetry/TelemetrySend.jsm +++ b/toolkit/components/telemetry/TelemetrySend.jsm @@ -11,7 +11,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetrySend", ]; @@ -172,7 +172,7 @@ function gzipCompressString(string) { return observer.buffer; } -this.TelemetrySend = { +var TelemetrySend = { /** * Age in ms of a pending ping to be considered overdue. diff --git a/toolkit/components/telemetry/TelemetrySession.jsm b/toolkit/components/telemetry/TelemetrySession.jsm index d3149e2a32a2c..798ca811ba6be 100644 --- a/toolkit/components/telemetry/TelemetrySession.jsm +++ b/toolkit/components/telemetry/TelemetrySession.jsm @@ -531,9 +531,9 @@ var TelemetryScheduler = { }, }; -this.EXPORTED_SYMBOLS = ["TelemetrySession"]; +var EXPORTED_SYMBOLS = ["TelemetrySession"]; -this.TelemetrySession = Object.freeze({ +var TelemetrySession = Object.freeze({ /** * Send a ping to a test server. Used only for testing. */ diff --git a/toolkit/components/telemetry/TelemetryStopwatch.jsm b/toolkit/components/telemetry/TelemetryStopwatch.jsm index a1f4fd5913727..5c12727c2af6c 100644 --- a/toolkit/components/telemetry/TelemetryStopwatch.jsm +++ b/toolkit/components/telemetry/TelemetryStopwatch.jsm @@ -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 = ["TelemetryStopwatch"]; +var EXPORTED_SYMBOLS = ["TelemetryStopwatch"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -110,7 +110,7 @@ let Timers = { } }; -this.TelemetryStopwatch = { +var TelemetryStopwatch = { /** * Starts a timer associated with a telemetry histogram. The timer can be * directly associated with a histogram, or with a pair of a histogram and @@ -337,7 +337,7 @@ this.TelemetryStopwatch = { }, }; -this.TelemetryStopwatchImpl = { +var TelemetryStopwatchImpl = { // Suppress errors. Used when testing. _suppressErrors: false, diff --git a/toolkit/components/telemetry/TelemetryStorage.jsm b/toolkit/components/telemetry/TelemetryStorage.jsm index 92a9e98490a7b..42714cdcac52d 100644 --- a/toolkit/components/telemetry/TelemetryStorage.jsm +++ b/toolkit/components/telemetry/TelemetryStorage.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["TelemetryStorage"]; +var EXPORTED_SYMBOLS = ["TelemetryStorage"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm", this); ChromeUtils.import("resource://gre/modules/Log.jsm"); @@ -126,7 +126,7 @@ function internString(str) { return Symbol.keyFor(Symbol.for(str)); } -this.TelemetryStorage = { +var TelemetryStorage = { get pingDirectoryPath() { return OS.Path.join(OS.Constants.Path.profileDir, "saved-telemetry-pings"); }, diff --git a/toolkit/components/telemetry/TelemetryTimestamps.jsm b/toolkit/components/telemetry/TelemetryTimestamps.jsm index 36eaaf52371f1..8ac62f22edbbd 100644 --- a/toolkit/components/telemetry/TelemetryTimestamps.jsm +++ b/toolkit/components/telemetry/TelemetryTimestamps.jsm @@ -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 = ["TelemetryTimestamps"]; +var EXPORTED_SYMBOLS = ["TelemetryTimestamps"]; /** * This module's purpose is to collect timestamps for important @@ -15,7 +15,7 @@ this.EXPORTED_SYMBOLS = ["TelemetryTimestamps"]; */ var timeStamps = {}; -this.TelemetryTimestamps = { +var TelemetryTimestamps = { /** * Adds a timestamp to the list. The addition of TimeStamps that already have * a value stored is ignored. diff --git a/toolkit/components/telemetry/TelemetryUtils.jsm b/toolkit/components/telemetry/TelemetryUtils.jsm index af36250ad4361..85cc501a816d3 100644 --- a/toolkit/components/telemetry/TelemetryUtils.jsm +++ b/toolkit/components/telemetry/TelemetryUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryUtils" ]; @@ -22,7 +22,7 @@ const IS_CONTENT_PROCESS = (function() { return runtime.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT; })(); -this.TelemetryUtils = { +var TelemetryUtils = { Preferences: Object.freeze({ // General Preferences ArchiveEnabled: "toolkit.telemetry.archive.enabled", diff --git a/toolkit/components/telemetry/UITelemetry.jsm b/toolkit/components/telemetry/UITelemetry.jsm index 75afc88b132d2..8b58696492ee2 100644 --- a/toolkit/components/telemetry/UITelemetry.jsm +++ b/toolkit/components/telemetry/UITelemetry.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "UITelemetry", ]; @@ -16,7 +16,7 @@ ChromeUtils.import("resource://gre/modules/TelemetryUtils.jsm", this); * * It implements nsIUITelemetryObserver, defined in nsIAndroidBridge.idl. */ -this.UITelemetry = { +var UITelemetry = { _enabled: undefined, _activeSessions: {}, _measurements: [], diff --git a/toolkit/components/telemetry/UpdatePing.jsm b/toolkit/components/telemetry/UpdatePing.jsm index 968b81511fd1c..af263b8eec858 100644 --- a/toolkit/components/telemetry/UpdatePing.jsm +++ b/toolkit/components/telemetry/UpdatePing.jsm @@ -17,14 +17,14 @@ const LOGGER_NAME = "Toolkit.Telemetry"; const PING_TYPE = "update"; const UPDATE_DOWNLOADED_TOPIC = "update-downloaded"; -this.EXPORTED_SYMBOLS = ["UpdatePing"]; +var EXPORTED_SYMBOLS = ["UpdatePing"]; /** * This module is responsible for listening to all the relevant update * signals, gathering the needed information and assembling the "update" * ping. */ -this.UpdatePing = { +var UpdatePing = { earlyInit() { this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, "UpdatePing::"); this._enabled = Services.prefs.getBoolPref(TelemetryUtils.Preferences.UpdatePing, false); diff --git a/toolkit/components/telemetry/hybrid-content/HybridContentTelemetry.jsm b/toolkit/components/telemetry/hybrid-content/HybridContentTelemetry.jsm index 27a385bb302f7..15ad42b2fff24 100644 --- a/toolkit/components/telemetry/hybrid-content/HybridContentTelemetry.jsm +++ b/toolkit/components/telemetry/hybrid-content/HybridContentTelemetry.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["HybridContentTelemetry"]; +var EXPORTED_SYMBOLS = ["HybridContentTelemetry"]; ChromeUtils.import("resource://gre/modules/Log.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm b/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm index f59b861c54907..75a7ecf36e9ec 100644 --- a/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm +++ b/toolkit/components/telemetry/tests/unit/TelemetryArchiveTesting.jsm @@ -3,7 +3,7 @@ ChromeUtils.import("resource://testing-common/Assert.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/TelemetryController.jsm"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TelemetryArchiveTesting", ]; diff --git a/toolkit/components/thumbnails/PageThumbUtils.jsm b/toolkit/components/thumbnails/PageThumbUtils.jsm index e213257f835b9..a600b76190a85 100644 --- a/toolkit/components/thumbnails/PageThumbUtils.jsm +++ b/toolkit/components/thumbnails/PageThumbUtils.jsm @@ -7,7 +7,7 @@ * PageThumbs and backgroundPageThumbsContent. */ -this.EXPORTED_SYMBOLS = ["PageThumbUtils"]; +var EXPORTED_SYMBOLS = ["PageThumbUtils"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -16,7 +16,7 @@ ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.defineModuleGetter(this, "BrowserUtils", "resource://gre/modules/BrowserUtils.jsm"); -this.PageThumbUtils = { +var PageThumbUtils = { // The default background color for page thumbnails. THUMBNAIL_BG_COLOR: "#fff", // The namespace for thumbnail canvas elements. diff --git a/toolkit/components/thumbnails/PageThumbs.jsm b/toolkit/components/thumbnails/PageThumbs.jsm index 5ee8abfcc440d..1a9fa810f8399 100644 --- a/toolkit/components/thumbnails/PageThumbs.jsm +++ b/toolkit/components/thumbnails/PageThumbs.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"]; +var EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"]; const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version"; const LATEST_STORAGE_VERSION = 3; @@ -80,7 +80,7 @@ const TaskUtils = { * Singleton providing functionality for capturing web page thumbnails and for * accessing them if already cached. */ -this.PageThumbs = { +var PageThumbs = { _initialized: false, /** @@ -494,7 +494,7 @@ this.PageThumbs = { }, }; -this.PageThumbsStorage = { +var PageThumbsStorage = { ensurePath: function Storage_ensurePath() { // Create the directory (ignore any error if the directory diff --git a/toolkit/components/url-classifier/SafeBrowsing.jsm b/toolkit/components/url-classifier/SafeBrowsing.jsm index 9a037d00fe502..25103491f960f 100644 --- a/toolkit/components/url-classifier/SafeBrowsing.jsm +++ b/toolkit/components/url-classifier/SafeBrowsing.jsm @@ -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 = ["SafeBrowsing"]; +var EXPORTED_SYMBOLS = ["SafeBrowsing"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -50,7 +50,7 @@ const tablePreferences = [ "urlclassifier.flashInfobarTable" ]; -this.SafeBrowsing = { +var SafeBrowsing = { init() { if (this.initialized) { diff --git a/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm b/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm index fe2dcdd070bba..f0e848fcef8da 100644 --- a/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm +++ b/toolkit/components/url-classifier/tests/UrlClassifierTestUtils.jsm @@ -1,6 +1,6 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["UrlClassifierTestUtils"]; +var EXPORTED_SYMBOLS = ["UrlClassifierTestUtils"]; const TRACKING_TABLE_NAME = "mochitest-track-simple"; const TRACKING_TABLE_PREF = "urlclassifier.trackingTable"; @@ -11,7 +11,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); -this.UrlClassifierTestUtils = { +var UrlClassifierTestUtils = { addTestTrackers() { // Add some URLs to the tracking databases diff --git a/toolkit/components/viewsource/ViewSourceBrowser.jsm b/toolkit/components/viewsource/ViewSourceBrowser.jsm index ea5997031e8dd..d3e9552a70433 100644 --- a/toolkit/components/viewsource/ViewSourceBrowser.jsm +++ b/toolkit/components/viewsource/ViewSourceBrowser.jsm @@ -15,7 +15,7 @@ const BUNDLE_URL = "chrome://global/locale/viewSource.properties"; const FRAME_SCRIPT = "chrome://global/content/viewSource-content.js"; -this.EXPORTED_SYMBOLS = ["ViewSourceBrowser"]; +var EXPORTED_SYMBOLS = ["ViewSourceBrowser"]; // Keep a set of browsers we've seen before, so we can load our frame script as // needed into any new ones. @@ -30,10 +30,10 @@ var gKnownBrowsers = new WeakSet(); * created by viewSourceUtils.js to wrap the . The frame script will * be loaded by this module at construction time. */ -this.ViewSourceBrowser = function ViewSourceBrowser(aBrowser) { +function ViewSourceBrowser(aBrowser) { this._browser = aBrowser; this.init(); -}; +} ViewSourceBrowser.prototype = { /** diff --git a/toolkit/crashreporter/CrashReports.jsm b/toolkit/crashreporter/CrashReports.jsm index 555c4557c5a3a..90a3a63c77b3d 100644 --- a/toolkit/crashreporter/CrashReports.jsm +++ b/toolkit/crashreporter/CrashReports.jsm @@ -4,11 +4,11 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "CrashReports" ]; -this.CrashReports = { +var CrashReports = { pendingDir: null, reportsDir: null, submittedDir: null, diff --git a/toolkit/crashreporter/CrashSubmit.jsm b/toolkit/crashreporter/CrashSubmit.jsm index fa569c69a9eeb..27c62181bdadf 100644 --- a/toolkit/crashreporter/CrashSubmit.jsm +++ b/toolkit/crashreporter/CrashSubmit.jsm @@ -11,7 +11,7 @@ Cu.importGlobalProperties(["File", "XMLHttpRequest"]); ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "CrashSubmit" ]; @@ -387,7 +387,7 @@ Submitter.prototype = { // =================================== // External API goes here -this.CrashSubmit = { +var CrashSubmit = { /** * Submit the crash report named id.dmp from the "pending" directory. * diff --git a/toolkit/crashreporter/KeyValueParser.jsm b/toolkit/crashreporter/KeyValueParser.jsm index 24d8d9793cd38..1d5eb9cfacff4 100644 --- a/toolkit/crashreporter/KeyValueParser.jsm +++ b/toolkit/crashreporter/KeyValueParser.jsm @@ -8,14 +8,14 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "parseKeyValuePairsFromLines", "parseKeyValuePairs", "parseKeyValuePairsFromFile", "parseKeyValuePairsFromFileAsync" ]; -this.parseKeyValuePairsFromLines = function(lines) { +var parseKeyValuePairsFromLines = function(lines) { let data = {}; for (let line of lines) { if (line == "") @@ -33,13 +33,13 @@ this.parseKeyValuePairsFromLines = function(lines) { return data; }; -this.parseKeyValuePairs = function parseKeyValuePairs(text) { +function parseKeyValuePairs(text) { let lines = text.split("\n"); return parseKeyValuePairsFromLines(lines); -}; +} // some test setup still uses this sync version -this.parseKeyValuePairsFromFile = function parseKeyValuePairsFromFile(file) { +function parseKeyValuePairsFromFile(file) { let fstream = Cc["@mozilla.org/network/file-input-stream;1"]. createInstance(Ci.nsIFileInputStream); fstream.init(file, -1, 0, 0); @@ -54,9 +54,9 @@ this.parseKeyValuePairsFromFile = function parseKeyValuePairsFromFile(file) { is.close(); fstream.close(); return parseKeyValuePairs(contents); -}; +} -this.parseKeyValuePairsFromFileAsync = async function parseKeyValuePairsFromFileAsync(file) { +async function parseKeyValuePairsFromFileAsync(file) { let contents = await OS.File.read(file, { encoding: "utf-8" }); return parseKeyValuePairs(contents); -}; +} diff --git a/toolkit/crashreporter/test/CrashTestUtils.jsm b/toolkit/crashreporter/test/CrashTestUtils.jsm index 7d7cdbb6d6783..94b7e8a231ac2 100644 --- a/toolkit/crashreporter/test/CrashTestUtils.jsm +++ b/toolkit/crashreporter/test/CrashTestUtils.jsm @@ -1,9 +1,9 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -this.EXPORTED_SYMBOLS = ["CrashTestUtils"]; +var EXPORTED_SYMBOLS = ["CrashTestUtils"]; -this.CrashTestUtils = { +var CrashTestUtils = { // These will be defined using ctypes APIs below. crash: null, dumpHasStream: null, diff --git a/toolkit/forgetaboutsite/ForgetAboutSite.jsm b/toolkit/forgetaboutsite/ForgetAboutSite.jsm index 7974ca01f6ad9..d71776986109e 100644 --- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm +++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm @@ -12,7 +12,7 @@ ChromeUtils.defineModuleGetter(this, "PlacesUtils", ChromeUtils.defineModuleGetter(this, "Downloads", "resource://gre/modules/Downloads.jsm"); -this.EXPORTED_SYMBOLS = ["ForgetAboutSite"]; +var EXPORTED_SYMBOLS = ["ForgetAboutSite"]; /** * Returns true if the string passed in is part of the root domain of the @@ -38,7 +38,7 @@ function hasRootDomain(str, aDomain) { (prevChar == "." || prevChar == "/"); } -this.ForgetAboutSite = { +var ForgetAboutSite = { async removeDataFromDomain(aDomain) { PlacesUtils.history.removePagesFromHost(aDomain, true); diff --git a/toolkit/modules/AppMenuNotifications.jsm b/toolkit/modules/AppMenuNotifications.jsm index c0a0e8bfc20b9..9040514275e85 100644 --- a/toolkit/modules/AppMenuNotifications.jsm +++ b/toolkit/modules/AppMenuNotifications.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AppMenuNotifications"]; +var EXPORTED_SYMBOLS = ["AppMenuNotifications"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/modules/AsyncPrefs.jsm b/toolkit/modules/AsyncPrefs.jsm index 6f1cbbb6d6735..24a7eefbd9ffd 100644 --- a/toolkit/modules/AsyncPrefs.jsm +++ b/toolkit/modules/AsyncPrefs.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["AsyncPrefs"]; +var EXPORTED_SYMBOLS = ["AsyncPrefs"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/modules/Battery.jsm b/toolkit/modules/Battery.jsm index eff972f8a04f5..342906f313904 100644 --- a/toolkit/modules/Battery.jsm +++ b/toolkit/modules/Battery.jsm @@ -10,7 +10,7 @@ * To spoof the battery values, set `Debugging.fake = true` after exporting this with a BackstagePass, * after which you can spoof a property yb setting the relevant property of the BatteryManager object. */ -this.EXPORTED_SYMBOLS = ["GetBattery", "Battery"]; +var EXPORTED_SYMBOLS = ["GetBattery", "Battery"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this); @@ -27,7 +27,7 @@ var gFakeBattery = { }; // BackendPass-exported object for toggling spoofing -this.Debugging = { +var Debugging = { /** * If `false`, use the DOM Battery implementation. * Set it to `true` if you need to fake battery values @@ -36,7 +36,7 @@ this.Debugging = { fake: false }; -this.GetBattery = function() { +var GetBattery = function() { return new Services.appShell.hiddenDOMWindow.Promise(function(resolve, reject) { // Return fake values if spoofing is enabled, otherwise fetch the real values from the BatteryManager API if (Debugging.fake) { @@ -47,7 +47,7 @@ this.GetBattery = function() { }); }; -this.Battery = {}; +var Battery = {}; for (let k of ["charging", "chargingTime", "dischargingTime", "level"]) { let prop = k; diff --git a/toolkit/modules/BinarySearch.jsm b/toolkit/modules/BinarySearch.jsm index 129bd5f2155a5..055237370654f 100644 --- a/toolkit/modules/BinarySearch.jsm +++ b/toolkit/modules/BinarySearch.jsm @@ -4,11 +4,11 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "BinarySearch", ]; -this.BinarySearch = Object.freeze({ +var BinarySearch = Object.freeze({ /** * Returns the index of the given target in the given array or -1 if the diff --git a/toolkit/modules/BrowserUtils.jsm b/toolkit/modules/BrowserUtils.jsm index fcb9b13763f7e..80d330afb885d 100644 --- a/toolkit/modules/BrowserUtils.jsm +++ b/toolkit/modules/BrowserUtils.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "BrowserUtils" ]; +var EXPORTED_SYMBOLS = [ "BrowserUtils" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -56,7 +56,7 @@ const FLUSH_TYPES = { "display": Ci.nsIDOMWindowUtils.FLUSH_DISPLAY, }; -this.BrowserUtils = { +var BrowserUtils = { /** * Prints arguments separated by a space and appends a new line. diff --git a/toolkit/modules/CanonicalJSON.jsm b/toolkit/modules/CanonicalJSON.jsm index b6d6c239dd9c3..77503d1a2a31d 100644 --- a/toolkit/modules/CanonicalJSON.jsm +++ b/toolkit/modules/CanonicalJSON.jsm @@ -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 = ["CanonicalJSON"]; +var EXPORTED_SYMBOLS = ["CanonicalJSON"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "jsesc", "resource://gre/modules/third_party/jsesc/jsesc.js"); -this.CanonicalJSON = { +var CanonicalJSON = { /** * Return the canonical JSON form of the passed source, sorting all the object * keys recursively. Note that this method will cause an infinite loop if diff --git a/toolkit/modules/CertUtils.jsm b/toolkit/modules/CertUtils.jsm index c1fd914a76d3e..205a1490a79e2 100644 --- a/toolkit/modules/CertUtils.jsm +++ b/toolkit/modules/CertUtils.jsm @@ -2,7 +2,7 @@ /* 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/. */ -this.EXPORTED_SYMBOLS = [ "BadCertHandler", "checkCert", "readCertPrefs", "validateCert" ]; +var EXPORTED_SYMBOLS = [ "BadCertHandler", "checkCert", "readCertPrefs", "validateCert" ]; const Ce = Components.Exception; @@ -26,8 +26,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); * @return An array of JS objects with names / values corresponding to the * expected certificate's attribute names / values. */ -this.readCertPrefs = - function readCertPrefs(aPrefBranch) { +function readCertPrefs(aPrefBranch) { if (Services.prefs.getBranch(aPrefBranch).getChildList("").length == 0) return null; @@ -48,7 +47,7 @@ this.readCertPrefs = } return certs; -}; +} /** * Verifies that an nsIX509Cert matches the expected certificate attribute @@ -66,8 +65,7 @@ this.readCertPrefs = * aCertificate wasn't specified and aCerts is not null or an empty * array. */ -this.validateCert = - function validateCert(aCertificate, aCerts) { +function validateCert(aCertificate, aCerts) { // If there are no certificate requirements then just exit if (!aCerts || aCerts.length == 0) return; @@ -109,7 +107,7 @@ this.validateCert = Cu.reportError(certCheckErr); throw new Ce(certCheckErr, Cr.NS_ERROR_ILLEGAL_VALUE); } -}; +} /** * Checks if the connection must be HTTPS and if so, only allows built-in @@ -134,8 +132,7 @@ this.validateCert = * from the aCerts param is different than the expected value. * NS_ERROR_ABORT if the certificate issuer is not built-in. */ -this.checkCert = - function checkCert(aChannel, aAllowNonBuiltInCerts, aCerts) { +function checkCert(aChannel, aAllowNonBuiltInCerts, aCerts) { if (!aChannel.originalURI.schemeIs("https")) { // Require https if there are certificate values to verify if (aCerts) { @@ -164,7 +161,7 @@ this.checkCert = if (!issuerCert.isBuiltInRoot) throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); -}; +} /** * This class implements nsIBadCertListener. Its job is to prevent "bad cert" @@ -175,10 +172,9 @@ this.checkCert = * When true certificates that aren't builtin are allowed. When false * or not specified the certificate must be a builtin certificate. */ -this.BadCertHandler = - function BadCertHandler(aAllowNonBuiltInCerts) { +function BadCertHandler(aAllowNonBuiltInCerts) { this.allowNonBuiltInCerts = aAllowNonBuiltInCerts; -}; +} BadCertHandler.prototype = { // nsIChannelEventSink diff --git a/toolkit/modules/CharsetMenu.jsm b/toolkit/modules/CharsetMenu.jsm index ed2cc6c881093..edf836592a7fa 100644 --- a/toolkit/modules/CharsetMenu.jsm +++ b/toolkit/modules/CharsetMenu.jsm @@ -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 = [ "CharsetMenu" ]; +var EXPORTED_SYMBOLS = [ "CharsetMenu" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/modules/ClientID.jsm b/toolkit/modules/ClientID.jsm index 7b4e0d7061ada..9a9aefb238441 100644 --- a/toolkit/modules/ClientID.jsm +++ b/toolkit/modules/ClientID.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ClientID"]; +var EXPORTED_SYMBOLS = ["ClientID"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -40,7 +40,7 @@ function isValidClientID(id) { return UUID_REGEX.test(id); } -this.ClientID = Object.freeze({ +var ClientID = Object.freeze({ /** * This returns a promise resolving to the the stable client ID we use for * data reporting (FHR & Telemetry). diff --git a/toolkit/modules/Color.jsm b/toolkit/modules/Color.jsm index 00a9bd9534dc5..488cb5934d88e 100644 --- a/toolkit/modules/Color.jsm +++ b/toolkit/modules/Color.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Color"]; +var EXPORTED_SYMBOLS = ["Color"]; /** * Color class, which describes a color. diff --git a/toolkit/modules/Console.jsm b/toolkit/modules/Console.jsm index 2649053f7f9e0..ee287a9a6410d 100644 --- a/toolkit/modules/Console.jsm +++ b/toolkit/modules/Console.jsm @@ -20,7 +20,7 @@ * implementation isn't always required (or even well defined) */ -this.EXPORTED_SYMBOLS = [ "console", "ConsoleAPI" ]; +var EXPORTED_SYMBOLS = [ "console", "ConsoleAPI" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -725,5 +725,4 @@ ConsoleAPI.prototype = { }, }; -this.console = new ConsoleAPI(); -this.ConsoleAPI = ConsoleAPI; +var console = new ConsoleAPI(); diff --git a/toolkit/modules/DateTimePickerHelper.jsm b/toolkit/modules/DateTimePickerHelper.jsm index a3e40fe1b4ba1..b59dca4605751 100644 --- a/toolkit/modules/DateTimePickerHelper.jsm +++ b/toolkit/modules/DateTimePickerHelper.jsm @@ -11,7 +11,7 @@ function debug(aStr) { } } -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DateTimePickerHelper" ]; @@ -24,7 +24,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); * DateTimePickerHelper listens for picker's events and notifies the content * side (input box) about them. */ -this.DateTimePickerHelper = { +var DateTimePickerHelper = { picker: null, weakBrowser: null, diff --git a/toolkit/modules/DeferredTask.jsm b/toolkit/modules/DeferredTask.jsm index 54f8cece37734..8096c9bc8b7db 100644 --- a/toolkit/modules/DeferredTask.jsm +++ b/toolkit/modules/DeferredTask.jsm @@ -6,7 +6,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DeferredTask", ]; @@ -112,7 +112,7 @@ const Timer = Components.Constructor("@mozilla.org/timer;1", "nsITimer", * aDelayMs have elapsed. If omitted, waits indefinitely for an idle * callback. */ -this.DeferredTask = function(aTaskFn, aDelayMs, aIdleTimeoutMs) { +var DeferredTask = function(aTaskFn, aDelayMs, aIdleTimeoutMs) { this._taskFn = aTaskFn; this._delayMs = aDelayMs; this._timeoutMs = aIdleTimeoutMs; diff --git a/toolkit/modules/Deprecated.jsm b/toolkit/modules/Deprecated.jsm index 14dedac710864..95886b1f1ad45 100644 --- a/toolkit/modules/Deprecated.jsm +++ b/toolkit/modules/Deprecated.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "Deprecated" ]; +var EXPORTED_SYMBOLS = [ "Deprecated" ]; const PREF_DEPRECATION_WARNINGS = "devtools.errorconsole.deprecation_warnings"; @@ -41,7 +41,7 @@ function stringifyCallstack(aStack) { return msg; } -this.Deprecated = { +var Deprecated = { /** * Log a deprecation warning. * diff --git a/toolkit/modules/E10SUtils.jsm b/toolkit/modules/E10SUtils.jsm index 352013ae4f17c..613e3eb1336c3 100644 --- a/toolkit/modules/E10SUtils.jsm +++ b/toolkit/modules/E10SUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["E10SUtils"]; +var EXPORTED_SYMBOLS = ["E10SUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -78,7 +78,7 @@ function validatedWebRemoteType(aPreferredRemoteType, aTargetUri, aCurrentUri) { return WEB_REMOTE_TYPE; } -this.E10SUtils = { +var E10SUtils = { DEFAULT_REMOTE_TYPE, NOT_REMOTE, WEB_REMOTE_TYPE, diff --git a/toolkit/modules/EventEmitter.jsm b/toolkit/modules/EventEmitter.jsm index 8dc1e6fee22c9..88a9952df0410 100644 --- a/toolkit/modules/EventEmitter.jsm +++ b/toolkit/modules/EventEmitter.jsm @@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "console", "resource://gre/modules/Console.jsm"); -this.EXPORTED_SYMBOLS = ["EventEmitter"]; +var EXPORTED_SYMBOLS = ["EventEmitter"]; let EventEmitter = this.EventEmitter = function() {}; diff --git a/toolkit/modules/FileUtils.jsm b/toolkit/modules/FileUtils.jsm index b5907a945ba8e..15b3923f89206 100644 --- a/toolkit/modules/FileUtils.jsm +++ b/toolkit/modules/FileUtils.jsm @@ -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 = [ "FileUtils" ]; +var EXPORTED_SYMBOLS = [ "FileUtils" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -11,7 +11,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gDirService", "@mozilla.org/file/directory_service;1", "nsIProperties"); -this.FileUtils = { +var FileUtils = { MODE_RDONLY: 0x01, MODE_WRONLY: 0x02, MODE_RDWR: 0x04, diff --git a/toolkit/modules/Finder.jsm b/toolkit/modules/Finder.jsm index 2d9a6745761f7..ae617d92a7069 100644 --- a/toolkit/modules/Finder.jsm +++ b/toolkit/modules/Finder.jsm @@ -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 = ["Finder", "GetClipboardSearchString"]; +var EXPORTED_SYMBOLS = ["Finder", "GetClipboardSearchString"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Geometry.jsm"); @@ -627,5 +627,3 @@ function GetClipboardSearchString(aLoadContext) { return searchString; } -this.Finder = Finder; -this.GetClipboardSearchString = GetClipboardSearchString; diff --git a/toolkit/modules/FinderHighlighter.jsm b/toolkit/modules/FinderHighlighter.jsm index bb91a9bbb61fc..495623cb4d15f 100644 --- a/toolkit/modules/FinderHighlighter.jsm +++ b/toolkit/modules/FinderHighlighter.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FinderHighlighter"]; +var EXPORTED_SYMBOLS = ["FinderHighlighter"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/modules/FinderIterator.jsm b/toolkit/modules/FinderIterator.jsm index 6e255fff24b79..53f723d821189 100644 --- a/toolkit/modules/FinderIterator.jsm +++ b/toolkit/modules/FinderIterator.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FinderIterator"]; +var EXPORTED_SYMBOLS = ["FinderIterator"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); @@ -21,7 +21,7 @@ const kTimeoutPref = "findbar.iteratorTimeout"; * FinderIterator singleton. See the documentation for the `start()` method to * learn more. */ -this.FinderIterator = { +var FinderIterator = { _currentParams: null, _listeners: new Map(), _catchingUp: new Set(), diff --git a/toolkit/modules/FormLikeFactory.jsm b/toolkit/modules/FormLikeFactory.jsm index 9da868cbaefc9..17771b31ac522 100644 --- a/toolkit/modules/FormLikeFactory.jsm +++ b/toolkit/modules/FormLikeFactory.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormLikeFactory"]; +var EXPORTED_SYMBOLS = ["FormLikeFactory"]; /** * A factory to generate FormLike objects that represent a set of related fields diff --git a/toolkit/modules/GMPInstallManager.jsm b/toolkit/modules/GMPInstallManager.jsm index 00bd517ad936d..9e63b233f9f06 100644 --- a/toolkit/modules/GMPInstallManager.jsm +++ b/toolkit/modules/GMPInstallManager.jsm @@ -4,8 +4,6 @@ "use strict"; -this.EXPORTED_SYMBOLS = []; - const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} = Components; // 1 day default @@ -27,8 +25,8 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm"); ChromeUtils.import("resource://gre/modules/GMPUtils.jsm"); ChromeUtils.import("resource://gre/modules/addons/ProductAddonChecker.jsm"); -this.EXPORTED_SYMBOLS = ["GMPInstallManager", "GMPExtractor", "GMPDownloader", - "GMPAddon"]; +var EXPORTED_SYMBOLS = ["GMPInstallManager", "GMPExtractor", "GMPDownloader", + "GMPAddon"]; // Shared code for suppressing bad cert dialogs XPCOMUtils.defineLazyGetter(this, "gCertUtils", function() { diff --git a/toolkit/modules/GMPUtils.jsm b/toolkit/modules/GMPUtils.jsm index bf88867737f13..83f9d44f6d857 100644 --- a/toolkit/modules/GMPUtils.jsm +++ b/toolkit/modules/GMPUtils.jsm @@ -7,11 +7,11 @@ const {classes: Cc, interfaces: Ci, results: Cr, utils: Cu, manager: Cm} = Components; -this.EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS", - "GMPPrefs", - "GMPUtils", - "OPEN_H264_ID", - "WIDEVINE_ID" ]; +var EXPORTED_SYMBOLS = [ "GMP_PLUGIN_IDS", + "GMPPrefs", + "GMPUtils", + "OPEN_H264_ID", + "WIDEVINE_ID" ]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); @@ -31,7 +31,7 @@ var GMPPluginHiddenReason = { EME_DISABLED: 2, }; -this.GMPUtils = { +var GMPUtils = { /** * Checks whether or not a given plugin is hidden. Hidden plugins are neither * downloaded nor displayed in the addons manager. @@ -113,7 +113,7 @@ this.GMPUtils = { /** * Manages preferences for GMP addons */ -this.GMPPrefs = { +var GMPPrefs = { KEY_EME_ENABLED: "media.eme.enabled", KEY_PLUGIN_ENABLED: "media.{0}.enabled", KEY_PLUGIN_LAST_UPDATE: "media.{0}.lastUpdate", diff --git a/toolkit/modules/Geometry.jsm b/toolkit/modules/Geometry.jsm index a0125d772a8cb..4a80d2961d528 100644 --- a/toolkit/modules/Geometry.jsm +++ b/toolkit/modules/Geometry.jsm @@ -2,16 +2,16 @@ * 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 = ["Point", "Rect"]; +var EXPORTED_SYMBOLS = ["Point", "Rect"]; /** * Simple Point class. * * Any method that takes an x and y may also take a point. */ -this.Point = function Point(x, y) { +function Point(x, y) { this.set(x, y); -}; +} Point.prototype = { clone: function clone() { @@ -83,12 +83,12 @@ Point.prototype = { * non-positive widths and heights in that case. */ -this.Rect = function Rect(x, y, w, h) { +function Rect(x, y, w, h) { this.left = x; this.top = y; this.right = x + w; this.bottom = y + h; -}; +} Rect.fromRect = function fromRect(r) { return new Rect(r.left, r.top, r.right - r.left, r.bottom - r.top); diff --git a/toolkit/modules/HiddenFrame.jsm b/toolkit/modules/HiddenFrame.jsm index 2e0b0b23104cd..2e19f3189440e 100644 --- a/toolkit/modules/HiddenFrame.jsm +++ b/toolkit/modules/HiddenFrame.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["HiddenFrame"]; +var EXPORTED_SYMBOLS = ["HiddenFrame"]; ChromeUtils.import("resource://gre/modules/PromiseUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/modules/InlineSpellChecker.jsm b/toolkit/modules/InlineSpellChecker.jsm index cde19ad0d61be..083410eacfc37 100644 --- a/toolkit/modules/InlineSpellChecker.jsm +++ b/toolkit/modules/InlineSpellChecker.jsm @@ -2,18 +2,18 @@ * 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 = [ "InlineSpellChecker", - "SpellCheckHelper" ]; +var EXPORTED_SYMBOLS = [ "InlineSpellChecker", + "SpellCheckHelper" ]; var gLanguageBundle; var gRegionBundle; const MAX_UNDO_STACK_DEPTH = 1; ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.InlineSpellChecker = function InlineSpellChecker(aEditor) { +function InlineSpellChecker(aEditor) { this.init(aEditor); this.mAddedWordStack = []; // We init this here to preserve it between init/uninit calls -}; +} InlineSpellChecker.prototype = { // Call this function to initialize for a given editor diff --git a/toolkit/modules/InlineSpellCheckerContent.jsm b/toolkit/modules/InlineSpellCheckerContent.jsm index dca6ca1f3309e..5184f1ec7dcb8 100644 --- a/toolkit/modules/InlineSpellCheckerContent.jsm +++ b/toolkit/modules/InlineSpellCheckerContent.jsm @@ -8,7 +8,7 @@ var { InlineSpellChecker, SpellCheckHelper } = ChromeUtils.import("resource://gre/modules/InlineSpellChecker.jsm", {}); -this.EXPORTED_SYMBOLS = [ "InlineSpellCheckerContent" ]; +var EXPORTED_SYMBOLS = [ "InlineSpellCheckerContent" ]; var InlineSpellCheckerContent = { _spellChecker: null, diff --git a/toolkit/modules/Integration.jsm b/toolkit/modules/Integration.jsm index 3ad01c8a34cad..a03f675705731 100644 --- a/toolkit/modules/Integration.jsm +++ b/toolkit/modules/Integration.jsm @@ -106,7 +106,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Integration", ]; @@ -124,7 +124,7 @@ const gIntegrationPoints = new Map(); * Integration.downloads.register(...); * Integration["addon-provided-integration"].register(...); */ -this.Integration = new Proxy({}, { +var Integration = new Proxy({}, { get(target, name) { let integrationPoint = gIntegrationPoints.get(name); if (!integrationPoint) { @@ -138,7 +138,7 @@ this.Integration = new Proxy({}, { /** * Individual integration point for which overrides can be registered. */ -this.IntegrationPoint = function() { +var IntegrationPoint = function() { this._overrideFns = new Set(); this._combined = { QueryInterface() { diff --git a/toolkit/modules/JSONFile.jsm b/toolkit/modules/JSONFile.jsm index a40982293eb75..609b21f19853e 100644 --- a/toolkit/modules/JSONFile.jsm +++ b/toolkit/modules/JSONFile.jsm @@ -28,7 +28,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "JSONFile", ]; diff --git a/toolkit/modules/LightweightThemeConsumer.jsm b/toolkit/modules/LightweightThemeConsumer.jsm index e2e9f97aa3afb..b6a9a0d2d75a7 100644 --- a/toolkit/modules/LightweightThemeConsumer.jsm +++ b/toolkit/modules/LightweightThemeConsumer.jsm @@ -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 = ["LightweightThemeConsumer"]; +var EXPORTED_SYMBOLS = ["LightweightThemeConsumer"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -15,8 +15,7 @@ ChromeUtils.import("resource:///modules/ThemeVariableMap.jsm"); ChromeUtils.defineModuleGetter(this, "LightweightThemeImageOptimizer", "resource://gre/modules/addons/LightweightThemeImageOptimizer.jsm"); -this.LightweightThemeConsumer = - function LightweightThemeConsumer(aDocument) { +function LightweightThemeConsumer(aDocument) { this._doc = aDocument; this._win = aDocument.defaultView; @@ -26,7 +25,7 @@ this.LightweightThemeConsumer = ChromeUtils.import("resource://gre/modules/LightweightThemeManager.jsm", temp); this._update(temp.LightweightThemeManager.currentThemeForDisplay); this._win.addEventListener("unload", this, { once: true }); -}; +} LightweightThemeConsumer.prototype = { _lastData: null, diff --git a/toolkit/modules/Log.jsm b/toolkit/modules/Log.jsm index 368279115813f..663abd41cdbd4 100644 --- a/toolkit/modules/Log.jsm +++ b/toolkit/modules/Log.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Log"]; +var EXPORTED_SYMBOLS = ["Log"]; const ONE_BYTE = 1; const ONE_KILOBYTE = 1024 * ONE_BYTE; @@ -31,7 +31,7 @@ function dumpError(text) { Cu.reportError(text); } -this.Log = { +var Log = { Level: { Fatal: 70, Error: 60, diff --git a/toolkit/modules/Memory.jsm b/toolkit/modules/Memory.jsm index 675bb9670e31b..96dbfd69bb287 100644 --- a/toolkit/modules/Memory.jsm +++ b/toolkit/modules/Memory.jsm @@ -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 = ["Memory"]; +var EXPORTED_SYMBOLS = ["Memory"]; // How long we should wait for the Promise to resolve. const TIMEOUT_INTERVAL = 2000; @@ -10,7 +10,7 @@ const TIMEOUT_INTERVAL = 2000; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.Memory = { +var Memory = { /** * This function returns a Promise that resolves with an Object that * describes basic memory usage for each content process and the parent diff --git a/toolkit/modules/NLP.jsm b/toolkit/modules/NLP.jsm index 8f93535b1c1c8..254bcd8151cd1 100644 --- a/toolkit/modules/NLP.jsm +++ b/toolkit/modules/NLP.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["NLP"]; +var EXPORTED_SYMBOLS = ["NLP"]; /** * NLP, which stands for Natural Language Processing, is a module that provides @@ -13,7 +13,7 @@ this.EXPORTED_SYMBOLS = ["NLP"]; * At least, that's the goal. Eventually. Right now, the find toolbar only really * needs the Levenshtein distance algorithm. */ -this.NLP = { +var NLP = { /** * Calculate the Levenshtein distance between two words. * The implementation of this method was heavily inspired by diff --git a/toolkit/modules/NewTabUtils.jsm b/toolkit/modules/NewTabUtils.jsm index b9d12d378c14d..888723b394427 100644 --- a/toolkit/modules/NewTabUtils.jsm +++ b/toolkit/modules/NewTabUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["NewTabUtils"]; +var EXPORTED_SYMBOLS = ["NewTabUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -2101,7 +2101,7 @@ var ExpirationFilter = { /** * Singleton that provides the public API of this JSM. */ -this.NewTabUtils = { +var NewTabUtils = { _initialized: false, /** diff --git a/toolkit/modules/ObjectUtils.jsm b/toolkit/modules/ObjectUtils.jsm index 965b22e2f539f..6ed008e50bf6c 100644 --- a/toolkit/modules/ObjectUtils.jsm +++ b/toolkit/modules/ObjectUtils.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "ObjectUtils" ]; @@ -18,7 +18,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this); var pSlice = Array.prototype.slice; -this.ObjectUtils = { +var ObjectUtils = { /** * This tests objects & values for deep equality. * diff --git a/toolkit/modules/PageMenu.jsm b/toolkit/modules/PageMenu.jsm index c7e1596049000..c36c86c8c810e 100644 --- a/toolkit/modules/PageMenu.jsm +++ b/toolkit/modules/PageMenu.jsm @@ -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/. */ -this.EXPORTED_SYMBOLS = ["PageMenuParent", "PageMenuChild"]; +var EXPORTED_SYMBOLS = ["PageMenuParent", "PageMenuChild"]; -this.PageMenu = function PageMenu() { -}; +function PageMenu() { +} PageMenu.prototype = { PAGEMENU_ATTR: "pagemenu", @@ -240,8 +240,8 @@ PageMenu.prototype = { }; // This object is expected to be used from a parent process. -this.PageMenuParent = function PageMenuParent() { -}; +function PageMenuParent() { +} PageMenuParent.prototype = { __proto__: PageMenu.prototype, @@ -276,8 +276,8 @@ PageMenuParent.prototype = { }; // This object is expected to be used from a child process. -this.PageMenuChild = function PageMenuChild() { -}; +function PageMenuChild() { +} PageMenuChild.prototype = { __proto__: PageMenu.prototype, diff --git a/toolkit/modules/PageMetadata.jsm b/toolkit/modules/PageMetadata.jsm index 7bbdfe3ea5ee9..4268e3ad8024b 100644 --- a/toolkit/modules/PageMetadata.jsm +++ b/toolkit/modules/PageMetadata.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PageMetadata"]; +var EXPORTED_SYMBOLS = ["PageMetadata"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -27,7 +27,7 @@ const DISCOVER_IMAGES_MAX = 5; * Extract metadata and microformats from a HTML document. * @type {Object} */ -this.PageMetadata = { +var PageMetadata = { /** * Get all metadata from an HTML document. This includes: * - URL diff --git a/toolkit/modules/PermissionsUtils.jsm b/toolkit/modules/PermissionsUtils.jsm index 201d8b57c3525..227e1d8e4f6a6 100644 --- a/toolkit/modules/PermissionsUtils.jsm +++ b/toolkit/modules/PermissionsUtils.jsm @@ -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 = ["PermissionsUtils"]; +var EXPORTED_SYMBOLS = ["PermissionsUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/BrowserUtils.jsm"); @@ -52,7 +52,7 @@ function importPrefBranch(aPrefBranch, aPermission, aAction) { } -this.PermissionsUtils = { +var PermissionsUtils = { /** * Import permissions from perferences to the Permissions Manager. After being * imported, all processed permissions will be set to an empty string. diff --git a/toolkit/modules/PopupNotifications.jsm b/toolkit/modules/PopupNotifications.jsm index 5e020ac6603e9..91178b5165d2c 100644 --- a/toolkit/modules/PopupNotifications.jsm +++ b/toolkit/modules/PopupNotifications.jsm @@ -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 = ["PopupNotifications"]; +var EXPORTED_SYMBOLS = ["PopupNotifications"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); @@ -209,7 +209,7 @@ Notification.prototype = { * and when the "anchorVisibilityChange" method is called. * } */ -this.PopupNotifications = function PopupNotifications(tabbrowser, panel, +function PopupNotifications(tabbrowser, panel, iconBox, options = {}) { if (!(tabbrowser instanceof Ci.nsIDOMXULElement)) throw "Invalid tabbrowser"; @@ -277,7 +277,7 @@ this.PopupNotifications = function PopupNotifications(tabbrowser, panel, this.window.addEventListener("activate", this, true); if (this.tabbrowser.tabContainer) this.tabbrowser.tabContainer.addEventListener("TabSelect", this, true); -}; +} PopupNotifications.prototype = { diff --git a/toolkit/modules/Preferences.jsm b/toolkit/modules/Preferences.jsm index a7bbb0732ab16..0c1d681ff4c2a 100644 --- a/toolkit/modules/Preferences.jsm +++ b/toolkit/modules/Preferences.jsm @@ -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 = ["Preferences"]; +var EXPORTED_SYMBOLS = ["Preferences"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -14,19 +14,18 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); const MAX_INT = 0x7FFFFFFF; // Math.pow(2, 31) - 1 const MIN_INT = -0x80000000; -this.Preferences = - function Preferences(args) { - this._cachedPrefBranch = null; - if (isObject(args)) { - if (args.branch) - this._branchStr = args.branch; - if (args.defaultBranch) - this._defaultBranch = args.defaultBranch; - if (args.privacyContext) - this._privacyContext = args.privacyContext; - } else if (args) - this._branchStr = args; - }; +function Preferences(args) { + this._cachedPrefBranch = null; + if (isObject(args)) { + if (args.branch) + this._branchStr = args.branch; + if (args.defaultBranch) + this._defaultBranch = args.defaultBranch; + if (args.privacyContext) + this._privacyContext = args.privacyContext; + } else if (args) + this._branchStr = args; +} /** * Get the value of a pref, if any; otherwise return the default value. diff --git a/toolkit/modules/PrivateBrowsingUtils.jsm b/toolkit/modules/PrivateBrowsingUtils.jsm index a3c58ed82de68..46ccdd1caf31e 100644 --- a/toolkit/modules/PrivateBrowsingUtils.jsm +++ b/toolkit/modules/PrivateBrowsingUtils.jsm @@ -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 = ["PrivateBrowsingUtils"]; +var EXPORTED_SYMBOLS = ["PrivateBrowsingUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -12,7 +12,7 @@ const kAutoStartPref = "browser.privatebrowsing.autostart"; // line for the current session. var gTemporaryAutoStartMode = false; -this.PrivateBrowsingUtils = { +var PrivateBrowsingUtils = { // Rather than passing content windows to this function, please use // isBrowserPrivate since it works with e10s. isWindowPrivate: function pbu_isWindowPrivate(aWindow) { diff --git a/toolkit/modules/ProfileAge.jsm b/toolkit/modules/ProfileAge.jsm index 3118d3012c96a..2203299aa9b17 100644 --- a/toolkit/modules/ProfileAge.jsm +++ b/toolkit/modules/ProfileAge.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ProfileAge"]; +var EXPORTED_SYMBOLS = ["ProfileAge"]; ChromeUtils.import("resource://gre/modules/osfile.jsm"); ChromeUtils.import("resource://gre/modules/Log.jsm"); @@ -15,7 +15,7 @@ ChromeUtils.import("resource://services-common/utils.js"); * This is separate from the provider to simplify testing and enable extraction * to a shared location in the future. */ -this.ProfileAge = function(profile, log) { +var ProfileAge = function(profile, log) { this.profilePath = profile || OS.Constants.Path.profileDir; if (!this.profilePath) { throw new Error("No profile directory."); diff --git a/toolkit/modules/PromiseMessage.jsm b/toolkit/modules/PromiseMessage.jsm index f232d074b3873..56b1f6d141874 100644 --- a/toolkit/modules/PromiseMessage.jsm +++ b/toolkit/modules/PromiseMessage.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PromiseMessage"]; +var EXPORTED_SYMBOLS = ["PromiseMessage"]; var msgId = 0; diff --git a/toolkit/modules/PromiseUtils.jsm b/toolkit/modules/PromiseUtils.jsm index 4578da124c52e..5d962d0599841 100644 --- a/toolkit/modules/PromiseUtils.jsm +++ b/toolkit/modules/PromiseUtils.jsm @@ -4,12 +4,12 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PromiseUtils"]; +var EXPORTED_SYMBOLS = ["PromiseUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); -this.PromiseUtils = { +var PromiseUtils = { /* * Creates a new pending Promise and provide methods to resolve and reject this Promise. * diff --git a/toolkit/modules/PropertyListUtils.jsm b/toolkit/modules/PropertyListUtils.jsm index 1f7d8a4b9e6d4..9810f8a8efba5 100644 --- a/toolkit/modules/PropertyListUtils.jsm +++ b/toolkit/modules/PropertyListUtils.jsm @@ -55,7 +55,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PropertyListUtils"]; +var EXPORTED_SYMBOLS = ["PropertyListUtils"]; Cu.importGlobalProperties(["File", "FileReader"]); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -65,7 +65,7 @@ ChromeUtils.defineModuleGetter(this, "ctypes", ChromeUtils.defineModuleGetter(this, "Services", "resource://gre/modules/Services.jsm"); -this.PropertyListUtils = Object.freeze({ +var PropertyListUtils = Object.freeze({ /** * Asynchronously reads a file as a property list. * diff --git a/toolkit/modules/RemoteFinder.jsm b/toolkit/modules/RemoteFinder.jsm index 76e42bceb28e0..b6c5902f96cf0 100644 --- a/toolkit/modules/RemoteFinder.jsm +++ b/toolkit/modules/RemoteFinder.jsm @@ -4,7 +4,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 = ["RemoteFinder", "RemoteFinderListener"]; +var EXPORTED_SYMBOLS = ["RemoteFinder", "RemoteFinderListener"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Geometry.jsm"); diff --git a/toolkit/modules/RemotePageManager.jsm b/toolkit/modules/RemotePageManager.jsm index 75f9e02e2fe5b..8f824caab1f0b 100644 --- a/toolkit/modules/RemotePageManager.jsm +++ b/toolkit/modules/RemotePageManager.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["RemotePages", "RemotePageManager", "PageListener"]; +var EXPORTED_SYMBOLS = ["RemotePages", "RemotePageManager", "PageListener"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -59,7 +59,7 @@ MessageListener.prototype = { * object for every page loaded. Message listeners added to this object receive * messages from all loaded pages from the requested urls. */ -this.RemotePages = function(urls) { +var RemotePages = function(urls) { this.urls = Array.isArray(urls) ? urls : [urls]; this.messagePorts = new Set(); this.listener = new MessageListener(); @@ -533,7 +533,7 @@ if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) RemotePageManagerInternal.init(); // The public API for the above object -this.RemotePageManager = { +var RemotePageManager = { addRemotePageListener: RemotePageManagerInternal.addRemotePageListener.bind(RemotePageManagerInternal), removeRemotePageListener: RemotePageManagerInternal.removeRemotePageListener.bind(RemotePageManagerInternal), }; diff --git a/toolkit/modules/RemoteSecurityUI.jsm b/toolkit/modules/RemoteSecurityUI.jsm index 69e1bf19cb759..15a00f6d36e42 100644 --- a/toolkit/modules/RemoteSecurityUI.jsm +++ b/toolkit/modules/RemoteSecurityUI.jsm @@ -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 = ["RemoteSecurityUI"]; +var EXPORTED_SYMBOLS = ["RemoteSecurityUI"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/modules/RemoteWebProgress.jsm b/toolkit/modules/RemoteWebProgress.jsm index 89bae095f1bfa..089f3f9abe871 100644 --- a/toolkit/modules/RemoteWebProgress.jsm +++ b/toolkit/modules/RemoteWebProgress.jsm @@ -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 = ["RemoteWebProgressManager"]; +var EXPORTED_SYMBOLS = ["RemoteWebProgressManager"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/modules/ResetProfile.jsm b/toolkit/modules/ResetProfile.jsm index c341cb0217dbf..8b84492f3691d 100644 --- a/toolkit/modules/ResetProfile.jsm +++ b/toolkit/modules/ResetProfile.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ResetProfile"]; +var EXPORTED_SYMBOLS = ["ResetProfile"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); @@ -12,7 +12,7 @@ ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); const MOZ_APP_NAME = AppConstants.MOZ_APP_NAME; const MOZ_BUILD_APP = AppConstants.MOZ_BUILD_APP; -this.ResetProfile = { +var ResetProfile = { /** * Check if reset is supported for the currently running profile. * diff --git a/toolkit/modules/ResponsivenessMonitor.jsm b/toolkit/modules/ResponsivenessMonitor.jsm index d2d0dc42f3bec..87546ec0695d5 100644 --- a/toolkit/modules/ResponsivenessMonitor.jsm +++ b/toolkit/modules/ResponsivenessMonitor.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ResponsivenessMonitor"]; +var EXPORTED_SYMBOLS = ["ResponsivenessMonitor"]; function ResponsivenessMonitor(intervalMS = 100) { this._intervalMS = intervalMS; diff --git a/toolkit/modules/SelectContentHelper.jsm b/toolkit/modules/SelectContentHelper.jsm index 7695fce4240bc..3f2a98393b602 100644 --- a/toolkit/modules/SelectContentHelper.jsm +++ b/toolkit/modules/SelectContentHelper.jsm @@ -28,11 +28,11 @@ const SUPPORTED_PROPERTIES = [ // via SelectContentHelper.open. var gOpen = false; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "SelectContentHelper" ]; -this.SelectContentHelper = function(aElement, aOptions, aGlobal) { +var SelectContentHelper = function(aElement, aOptions, aGlobal) { this.element = aElement; this.initialSelection = aElement[aElement.selectedIndex] || null; this.global = aGlobal; diff --git a/toolkit/modules/SelectParentHelper.jsm b/toolkit/modules/SelectParentHelper.jsm index 3b18e44bc3c72..21ccaddf8797f 100644 --- a/toolkit/modules/SelectParentHelper.jsm +++ b/toolkit/modules/SelectParentHelper.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "SelectParentHelper" ]; @@ -26,7 +26,7 @@ var currentZoom = 1; var closedWithEnter = false; var customStylingEnabled = Services.prefs.getBoolPref("dom.forms.select.customstyling"); -this.SelectParentHelper = { +var SelectParentHelper = { /** * `populate` takes the `menulist` element and a list of `items` and generates * a popup list of options. diff --git a/toolkit/modules/ServiceRequest.jsm b/toolkit/modules/ServiceRequest.jsm index 05a8a7a138326..a0a2aaade6a5a 100644 --- a/toolkit/modules/ServiceRequest.jsm +++ b/toolkit/modules/ServiceRequest.jsm @@ -12,7 +12,7 @@ ChromeUtils.import("resource://gre/modules/Log.jsm"); Cu.importGlobalProperties(["XMLHttpRequest"]); -this.EXPORTED_SYMBOLS = [ "ServiceRequest" ]; +var EXPORTED_SYMBOLS = [ "ServiceRequest" ]; const logger = Log.repository.getLogger("ServiceRequest"); logger.level = Log.Level.Debug; diff --git a/toolkit/modules/Services.jsm b/toolkit/modules/Services.jsm index e5bc0ab21580c..0688114a5cf30 100644 --- a/toolkit/modules/Services.jsm +++ b/toolkit/modules/Services.jsm @@ -4,12 +4,12 @@ /* eslint mozilla/use-services:off */ -this.EXPORTED_SYMBOLS = ["Services"]; +var EXPORTED_SYMBOLS = ["Services"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); -this.Services = {}; +var Services = {}; /** * WARNING: If you add a getter that isn't in the initTable, please update the diff --git a/toolkit/modules/ShortcutUtils.jsm b/toolkit/modules/ShortcutUtils.jsm index 204cb8362f4e1..c73d683a13a8e 100644 --- a/toolkit/modules/ShortcutUtils.jsm +++ b/toolkit/modules/ShortcutUtils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ShortcutUtils"]; +var EXPORTED_SYMBOLS = ["ShortcutUtils"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -111,4 +111,3 @@ var ShortcutUtils = { Object.freeze(ShortcutUtils); -this.ShortcutUtils = ShortcutUtils; diff --git a/toolkit/modules/Sqlite.jsm b/toolkit/modules/Sqlite.jsm index 46a0dfd8ae20a..1df69ed94523b 100644 --- a/toolkit/modules/Sqlite.jsm +++ b/toolkit/modules/Sqlite.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Sqlite", ]; @@ -1455,7 +1455,7 @@ OpenedConnection.prototype = Object.freeze({ }, }); -this.Sqlite = { +var Sqlite = { openConnection, cloneStorageConnection, wrapStorageConnection, diff --git a/toolkit/modules/Task.jsm b/toolkit/modules/Task.jsm index 9a4e52d0682b4..17b3d90847a35 100644 --- a/toolkit/modules/Task.jsm +++ b/toolkit/modules/Task.jsm @@ -8,7 +8,7 @@ /* eslint-disable mozilla/no-task */ -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "Task" ]; @@ -136,7 +136,7 @@ function isGenerator(aValue) { /** * This object provides the public module functions. */ -this.Task = { +var Task = { /** * Creates and starts a new task. * diff --git a/toolkit/modules/Timer.jsm b/toolkit/modules/Timer.jsm index 9169dd25f31e0..b0e2104be5f6a 100644 --- a/toolkit/modules/Timer.jsm +++ b/toolkit/modules/Timer.jsm @@ -8,8 +8,8 @@ * JS module implementation of setTimeout and clearTimeout. */ -this.EXPORTED_SYMBOLS = ["setTimeout", "setTimeoutWithTarget", "clearTimeout", - "setInterval", "setIntervalWithTarget", "clearInterval"]; +var EXPORTED_SYMBOLS = ["setTimeout", "setTimeoutWithTarget", "clearTimeout", + "setInterval", "setIntervalWithTarget", "clearInterval"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -54,33 +54,33 @@ function _setTimeoutOrIsInterval(aCallback, aMilliseconds, aIsInterval, return id; } -this.setTimeout = function setTimeout(aCallback, aMilliseconds, ...aArgs) { +function setTimeout(aCallback, aMilliseconds, ...aArgs) { return _setTimeoutOrIsInterval( aCallback, aMilliseconds, false, null, aArgs); -}; +} -this.setTimeoutWithTarget = function setTimeoutWithTarget(aCallback, +function setTimeoutWithTarget(aCallback, aMilliseconds, aTarget, ...aArgs) { return _setTimeoutOrIsInterval( aCallback, aMilliseconds, false, aTarget, aArgs); -}; +} -this.setInterval = function setInterval(aCallback, aMilliseconds, ...aArgs) { +function setInterval(aCallback, aMilliseconds, ...aArgs) { return _setTimeoutOrIsInterval( aCallback, aMilliseconds, true, null, aArgs); -}; +} -this.setIntervalWithTarget = function setIntervalWithTarget(aCallback, +function setIntervalWithTarget(aCallback, aMilliseconds, aTarget, ...aArgs) { return _setTimeoutOrIsInterval( aCallback, aMilliseconds, true, aTarget, aArgs); -}; +} -this.clearInterval = this.clearTimeout = function clearTimeout(aId) { +var clearInterval = this.clearTimeout = function clearTimeout(aId) { if (gTimerTable.has(aId)) { gTimerTable.get(aId).cancel(); gTimerTable.delete(aId); diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index 7d6373dabea56..44d491dd17dda 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -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 = [ +var EXPORTED_SYMBOLS = [ "Troubleshoot", ]; @@ -128,7 +128,7 @@ function getPrefList(filter) { }, {}); } -this.Troubleshoot = { +var Troubleshoot = { /** * Captures a snapshot of data that may help troubleshooters troubleshoot diff --git a/toolkit/modules/UpdateUtils.jsm b/toolkit/modules/UpdateUtils.jsm index 59cbb5b95306d..4efe6f8145dfb 100644 --- a/toolkit/modules/UpdateUtils.jsm +++ b/toolkit/modules/UpdateUtils.jsm @@ -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 = ["UpdateUtils"]; +var EXPORTED_SYMBOLS = ["UpdateUtils"]; ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -19,7 +19,7 @@ const PREF_APP_DISTRIBUTION_VERSION = "distribution.version"; const PREF_APP_UPDATE_CUSTOM = "app.update.custom"; -this.UpdateUtils = { +var UpdateUtils = { _locale: undefined, /** diff --git a/toolkit/modules/WebChannel.jsm b/toolkit/modules/WebChannel.jsm index 9663d778f49cd..675c7ed0bf6e4 100644 --- a/toolkit/modules/WebChannel.jsm +++ b/toolkit/modules/WebChannel.jsm @@ -7,7 +7,7 @@ * to create a two-way communication channel between chrome and content code. */ -this.EXPORTED_SYMBOLS = ["WebChannel", "WebChannelBroker"]; +var EXPORTED_SYMBOLS = ["WebChannel", "WebChannelBroker"]; const ERRNO_MISSING_PRINCIPAL = 1; const ERRNO_NO_SUCH_CHANNEL = 2; @@ -161,7 +161,7 @@ var WebChannelBroker = Object.create({ * permission manager. * @constructor */ -this.WebChannel = function(id, originOrPermission) { +var WebChannel = function(id, originOrPermission) { if (!id || !originOrPermission) { throw new Error("WebChannel id and originOrPermission are required."); } diff --git a/toolkit/modules/WindowDraggingUtils.jsm b/toolkit/modules/WindowDraggingUtils.jsm index b7f5220eb85fd..b594853347001 100644 --- a/toolkit/modules/WindowDraggingUtils.jsm +++ b/toolkit/modules/WindowDraggingUtils.jsm @@ -6,9 +6,9 @@ ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); const HAVE_CSS_WINDOW_DRAG_SUPPORT = ["win", "macosx"].includes(AppConstants.platform); -this.EXPORTED_SYMBOLS = [ "WindowDraggingElement" ]; +var EXPORTED_SYMBOLS = [ "WindowDraggingElement" ]; -this.WindowDraggingElement = function WindowDraggingElement(elem) { +function WindowDraggingElement(elem) { this._elem = elem; this._window = elem.ownerGlobal; if (HAVE_CSS_WINDOW_DRAG_SUPPORT && !this.isPanel()) { @@ -16,7 +16,7 @@ this.WindowDraggingElement = function WindowDraggingElement(elem) { } this._elem.addEventListener("mousedown", this); -}; +} WindowDraggingElement.prototype = { mouseDownCheck(e) { return true; }, diff --git a/toolkit/modules/WindowsRegistry.jsm b/toolkit/modules/WindowsRegistry.jsm index 75da03b156ad3..5870c3a724488 100644 --- a/toolkit/modules/WindowsRegistry.jsm +++ b/toolkit/modules/WindowsRegistry.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["WindowsRegistry"]; +var EXPORTED_SYMBOLS = ["WindowsRegistry"]; var WindowsRegistry = { /** diff --git a/toolkit/modules/ZipUtils.jsm b/toolkit/modules/ZipUtils.jsm index 9199a75dd4611..125665cd66f0a 100644 --- a/toolkit/modules/ZipUtils.jsm +++ b/toolkit/modules/ZipUtils.jsm @@ -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 = [ "ZipUtils" ]; +var EXPORTED_SYMBOLS = [ "ZipUtils" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -82,7 +82,7 @@ function saveStreamAsync(aPath, aStream, aFile) { } -this.ZipUtils = { +var ZipUtils = { /** * Asynchronously extracts files from a ZIP file into a directory. diff --git a/toolkit/modules/addons/MatchURLFilters.jsm b/toolkit/modules/addons/MatchURLFilters.jsm index e961fed3f03a8..bb1b9a1984130 100644 --- a/toolkit/modules/addons/MatchURLFilters.jsm +++ b/toolkit/modules/addons/MatchURLFilters.jsm @@ -11,7 +11,7 @@ ChromeUtils.defineModuleGetter(this, "Services", /* exported MatchURLFilters */ -this.EXPORTED_SYMBOLS = ["MatchURLFilters"]; +var EXPORTED_SYMBOLS = ["MatchURLFilters"]; // Match WebNavigation URL Filters. class MatchURLFilters { diff --git a/toolkit/modules/css-selector.js b/toolkit/modules/css-selector.js index e1ca9dc50f793..b27c0de5b26bc 100644 --- a/toolkit/modules/css-selector.js +++ b/toolkit/modules/css-selector.js @@ -6,7 +6,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["findCssSelector"]; +var EXPORTED_SYMBOLS = ["findCssSelector"]; /** * Traverse getBindingParent until arriving upon the bound element diff --git a/toolkit/modules/debug.js b/toolkit/modules/debug.js index ddda8800d9aa5..273d48334871d 100644 --- a/toolkit/modules/debug.js +++ b/toolkit/modules/debug.js @@ -8,7 +8,7 @@ // This file contains functions that are useful for debugging purposes from // within JavaScript code. -this.EXPORTED_SYMBOLS = ["NS_ASSERT"]; +var EXPORTED_SYMBOLS = ["NS_ASSERT"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "Services", @@ -33,7 +33,7 @@ var gTraceOnAssert = false; * @param message a string to be displayed upon failure of the assertion */ -this.NS_ASSERT = function NS_ASSERT(condition, message) { +function NS_ASSERT(condition, message) { if (condition) return; @@ -79,4 +79,4 @@ this.NS_ASSERT = function NS_ASSERT(condition, message) { } dump(assertionText + stackText); -}; +} diff --git a/toolkit/modules/secondscreen/RokuApp.jsm b/toolkit/modules/secondscreen/RokuApp.jsm index a7e4eec5af2d4..811a5e037e754 100644 --- a/toolkit/modules/secondscreen/RokuApp.jsm +++ b/toolkit/modules/secondscreen/RokuApp.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["RokuApp"]; +var EXPORTED_SYMBOLS = ["RokuApp"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); diff --git a/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm b/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm index 8a79b78140575..9341bc6e2f89d 100644 --- a/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm +++ b/toolkit/modules/secondscreen/SimpleServiceDiscovery.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SimpleServiceDiscovery"]; +var EXPORTED_SYMBOLS = ["SimpleServiceDiscovery"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/modules/sessionstore/FormData.jsm b/toolkit/modules/sessionstore/FormData.jsm index 38a429966605a..55bced824bb22 100644 --- a/toolkit/modules/sessionstore/FormData.jsm +++ b/toolkit/modules/sessionstore/FormData.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["FormData"]; +var EXPORTED_SYMBOLS = ["FormData"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); /** @@ -93,7 +93,7 @@ function shouldIgnoreNode(node) { * The public API exported by this module that allows to collect * and restore form data for a document and its subframes. */ -this.FormData = Object.freeze({ +var FormData = Object.freeze({ collect(frame) { return FormDataInternal.collect(frame); }, diff --git a/toolkit/modules/sessionstore/PrivacyLevel.jsm b/toolkit/modules/sessionstore/PrivacyLevel.jsm index 9e9a97dec5dd4..ac9e18c975210 100644 --- a/toolkit/modules/sessionstore/PrivacyLevel.jsm +++ b/toolkit/modules/sessionstore/PrivacyLevel.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["PrivacyLevel"]; +var EXPORTED_SYMBOLS = ["PrivacyLevel"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); diff --git a/toolkit/modules/sessionstore/ScrollPosition.jsm b/toolkit/modules/sessionstore/ScrollPosition.jsm index 6784b14ef2579..a54fb0b6be77c 100644 --- a/toolkit/modules/sessionstore/ScrollPosition.jsm +++ b/toolkit/modules/sessionstore/ScrollPosition.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ScrollPosition"]; +var EXPORTED_SYMBOLS = ["ScrollPosition"]; /** * It provides methods to collect scroll positions from single frames and to @@ -12,7 +12,7 @@ this.EXPORTED_SYMBOLS = ["ScrollPosition"]; * * This is a child process module. */ -this.ScrollPosition = Object.freeze({ +var ScrollPosition = Object.freeze({ collect(frame) { return ScrollPositionInternal.collect(frame); }, diff --git a/toolkit/modules/sessionstore/SessionHistory.jsm b/toolkit/modules/sessionstore/SessionHistory.jsm index 498ce738a52a3..3aa3d21f7a30a 100644 --- a/toolkit/modules/sessionstore/SessionHistory.jsm +++ b/toolkit/modules/sessionstore/SessionHistory.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["SessionHistory"]; +var EXPORTED_SYMBOLS = ["SessionHistory"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -21,7 +21,7 @@ function debug(msg) { /** * The external API exported by this module. */ -this.SessionHistory = Object.freeze({ +var SessionHistory = Object.freeze({ isEmpty(docShell) { return SessionHistoryInternal.isEmpty(docShell); }, diff --git a/toolkit/modules/sessionstore/Utils.jsm b/toolkit/modules/sessionstore/Utils.jsm index ddbc2de3d0b92..db2c9e3b53972 100644 --- a/toolkit/modules/sessionstore/Utils.jsm +++ b/toolkit/modules/sessionstore/Utils.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["Utils"]; +var EXPORTED_SYMBOLS = ["Utils"]; ChromeUtils.import("resource://gre/modules/Services.jsm", this); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this); @@ -22,7 +22,7 @@ function debug(msg) { Services.console.logStringMessage("Utils: " + msg); } -this.Utils = Object.freeze({ +var Utils = Object.freeze({ get SERIALIZED_SYSTEMPRINCIPAL() { return SERIALIZED_SYSTEMPRINCIPAL; }, makeURI(url) { diff --git a/toolkit/modules/tests/modules/MockDocument.jsm b/toolkit/modules/tests/modules/MockDocument.jsm index cd637d831abf6..37260a2c29fb3 100644 --- a/toolkit/modules/tests/modules/MockDocument.jsm +++ b/toolkit/modules/tests/modules/MockDocument.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["MockDocument"]; +var EXPORTED_SYMBOLS = ["MockDocument"]; Cu.importGlobalProperties(["URL"]); ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); diff --git a/toolkit/modules/tests/modules/PromiseTestUtils.jsm b/toolkit/modules/tests/modules/PromiseTestUtils.jsm index db5ba5f5e7b15..bd8d39c103c4a 100644 --- a/toolkit/modules/tests/modules/PromiseTestUtils.jsm +++ b/toolkit/modules/tests/modules/PromiseTestUtils.jsm @@ -8,7 +8,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "PromiseTestUtils", ]; @@ -18,7 +18,7 @@ ChromeUtils.import("resource://testing-common/Assert.jsm", this); // Keep "JSMPromise" separate so "Promise" still refers to DOM Promises. let JSMPromise = ChromeUtils.import("resource://gre/modules/Promise.jsm", {}).Promise; -this.PromiseTestUtils = { +var PromiseTestUtils = { /** * Array of objects containing the details of the Promise rejections that are * currently left uncaught. This includes DOM Promise and Promise.jsm. When diff --git a/toolkit/modules/tests/xpcshell/TestIntegration.jsm b/toolkit/modules/tests/xpcshell/TestIntegration.jsm index 340d688c80eb5..6052e11d5e4d2 100644 --- a/toolkit/modules/tests/xpcshell/TestIntegration.jsm +++ b/toolkit/modules/tests/xpcshell/TestIntegration.jsm @@ -7,11 +7,11 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "TestIntegration", ]; -this.TestIntegration = { +var TestIntegration = { value: "value", get valueFromThis() { diff --git a/toolkit/modules/third_party/jsesc/jsesc.js b/toolkit/modules/third_party/jsesc/jsesc.js index 0145101d53d38..b923182466ae6 100644 --- a/toolkit/modules/third_party/jsesc/jsesc.js +++ b/toolkit/modules/third_party/jsesc/jsesc.js @@ -23,7 +23,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -this.EXPORTED_SYMBOLS = ["jsesc"]; +var EXPORTED_SYMBOLS = ["jsesc"]; /*! https://mths.be/jsesc v1.0.0 by @mathias */ ;(function(root) { diff --git a/toolkit/mozapps/downloads/DownloadLastDir.jsm b/toolkit/mozapps/downloads/DownloadLastDir.jsm index 933ebd96c4d20..27bce9b635345 100644 --- a/toolkit/mozapps/downloads/DownloadLastDir.jsm +++ b/toolkit/mozapps/downloads/DownloadLastDir.jsm @@ -28,7 +28,7 @@ const LAST_DIR_PREF = "browser.download.lastDir"; const SAVE_PER_SITE_PREF = LAST_DIR_PREF + ".savePerSite"; const nsIFile = Components.interfaces.nsIFile; -this.EXPORTED_SYMBOLS = [ "DownloadLastDir" ]; +var EXPORTED_SYMBOLS = [ "DownloadLastDir" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/Services.jsm"); @@ -89,7 +89,7 @@ function isContentPrefEnabled() { var gDownloadLastDirFile = readLastDirPref(); -this.DownloadLastDir = function DownloadLastDir(aWindow) { +function DownloadLastDir(aWindow) { let loadContext = aWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIWebNavigation) .QueryInterface(Components.interfaces.nsILoadContext); @@ -99,7 +99,7 @@ this.DownloadLastDir = function DownloadLastDir(aWindow) { this.fakeContext = loadContext.usePrivateBrowsing ? privateLoadContext : nonPrivateLoadContext; -}; +} DownloadLastDir.prototype = { isPrivate: function DownloadLastDir_isPrivate() { diff --git a/toolkit/mozapps/downloads/DownloadUtils.jsm b/toolkit/mozapps/downloads/DownloadUtils.jsm index fde477efcaa81..013424ca14024 100644 --- a/toolkit/mozapps/downloads/DownloadUtils.jsm +++ b/toolkit/mozapps/downloads/DownloadUtils.jsm @@ -5,7 +5,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "DownloadUtils" ]; +var EXPORTED_SYMBOLS = [ "DownloadUtils" ]; /** * This module provides the DownloadUtils object which contains useful methods @@ -95,7 +95,7 @@ Object.defineProperty(this, "gBundle", { const kCachedLastMaxSize = 10; var gCachedLast = []; -this.DownloadUtils = { +var DownloadUtils = { /** * Generate a full status string for a download given its current progress, * total size, speed, last time remaining diff --git a/toolkit/mozapps/extensions/AddonManager.jsm b/toolkit/mozapps/extensions/AddonManager.jsm index c065c2b982aa3..db60c878b81b1 100644 --- a/toolkit/mozapps/extensions/AddonManager.jsm +++ b/toolkit/mozapps/extensions/AddonManager.jsm @@ -92,7 +92,7 @@ Services.ppmm.loadProcessScript( const INTEGER = /^[1-9]\d*$/; -this.EXPORTED_SYMBOLS = [ "AddonManager", "AddonManagerPrivate" ]; +var EXPORTED_SYMBOLS = [ "AddonManager", "AddonManagerPrivate" ]; const CATEGORY_PROVIDER_MODULE = "addon-provider-module"; @@ -2962,7 +2962,7 @@ var AddonManagerInternal = { * AddonManagerInternal for documentation however note that these methods are * subject to change at any time. */ -this.AddonManagerPrivate = { +var AddonManagerPrivate = { startup() { AddonManagerInternal.startup(); }, @@ -3167,7 +3167,7 @@ this.AddonManagerPrivate = { * just forward to AddonManagerInternal. * @class */ -this.AddonManager = { +var AddonManager = { // Constants for the AddonInstall.state property // These will show up as AddonManager.STATE_* (eg, STATE_AVAILABLE) _states: new Map([ diff --git a/toolkit/mozapps/extensions/ChromeManifestParser.jsm b/toolkit/mozapps/extensions/ChromeManifestParser.jsm index e2f6bce80cd9d..b72d75c6671e8 100644 --- a/toolkit/mozapps/extensions/ChromeManifestParser.jsm +++ b/toolkit/mozapps/extensions/ChromeManifestParser.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["ChromeManifestParser"]; +var EXPORTED_SYMBOLS = ["ChromeManifestParser"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); @@ -28,7 +28,7 @@ function flushJarCache(aJarFile) { /** * Parses chrome manifest files. */ -this.ChromeManifestParser = { +var ChromeManifestParser = { /** * Reads and parses a chrome manifest file located at a specified URI, and all diff --git a/toolkit/mozapps/extensions/LightweightThemeManager.jsm b/toolkit/mozapps/extensions/LightweightThemeManager.jsm index a8d8a437eea7a..4ac3827a0a856 100644 --- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm +++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["LightweightThemeManager"]; +var EXPORTED_SYMBOLS = ["LightweightThemeManager"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); @@ -89,7 +89,7 @@ var _fallbackThemeData = null; } })(); -this.LightweightThemeManager = { +var LightweightThemeManager = { get name() { return "LightweightThemeManager"; }, diff --git a/toolkit/mozapps/extensions/internal/AddonRepository.jsm b/toolkit/mozapps/extensions/internal/AddonRepository.jsm index 9d99331025fb0..7805ab9e4d479 100644 --- a/toolkit/mozapps/extensions/internal/AddonRepository.jsm +++ b/toolkit/mozapps/extensions/internal/AddonRepository.jsm @@ -18,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(this, { Preferences: "resource://gre/modules/Preferences.jsm", }); -this.EXPORTED_SYMBOLS = [ "AddonRepository" ]; +var EXPORTED_SYMBOLS = [ "AddonRepository" ]; const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled"; const PREF_GETADDONS_CACHE_TYPES = "extensions.getAddons.cache.types"; @@ -456,7 +456,7 @@ AddonSearchResult.prototype = { * that are compatible with the current application and are not already * installed. */ -this.AddonRepository = { +var AddonRepository = { /** * Whether caching is currently enabled */ diff --git a/toolkit/mozapps/extensions/internal/AddonSettings.jsm b/toolkit/mozapps/extensions/internal/AddonSettings.jsm index 7fed074911beb..5d11d4e7f9025 100644 --- a/toolkit/mozapps/extensions/internal/AddonSettings.jsm +++ b/toolkit/mozapps/extensions/internal/AddonSettings.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "AddonSettings" ]; +var EXPORTED_SYMBOLS = [ "AddonSettings" ]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); @@ -12,7 +12,7 @@ ChromeUtils.import("resource://gre/modules/AppConstants.jsm"); const PREF_SIGNATURES_REQUIRED = "xpinstall.signatures.required"; const PREF_ALLOW_LEGACY = "extensions.legacy.enabled"; -this.AddonSettings = {}; +var AddonSettings = {}; // Make a non-changable property that can't be manipulated from other // code in the app. diff --git a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm index 22ddfbb39bbe6..25a01eff2169f 100644 --- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm +++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.jsm @@ -9,7 +9,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ "AddonUpdateChecker" ]; +var EXPORTED_SYMBOLS = [ "AddonUpdateChecker" ]; const TIMEOUT = 60 * 1000; const PREFIX_NS_RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; @@ -776,7 +776,7 @@ function matchesVersions(aUpdate, aAppVersion, aPlatformVersion, return result; } -this.AddonUpdateChecker = { +var AddonUpdateChecker = { /** * Retrieves the best matching compatibility update for the application from * a list of available update objects. diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm index 27867c0c42a61..4331b11da9c21 100644 --- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm +++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = []; +var EXPORTED_SYMBOLS = []; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); diff --git a/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm b/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm index 0910309d5cc30..0b4b113989952 100644 --- a/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm +++ b/toolkit/mozapps/extensions/internal/LightweightThemeImageOptimizer.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["LightweightThemeImageOptimizer"]; +var EXPORTED_SYMBOLS = ["LightweightThemeImageOptimizer"]; ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -17,7 +17,7 @@ ChromeUtils.defineModuleGetter(this, "FileUtils", const ORIGIN_TOP_RIGHT = 1; const ORIGIN_BOTTOM_LEFT = 2; -this.LightweightThemeImageOptimizer = { +var LightweightThemeImageOptimizer = { optimize(aThemeData, aScreen) { let data = Object.assign({}, aThemeData); if (!data.headerURL) { diff --git a/toolkit/mozapps/extensions/internal/PluginProvider.jsm b/toolkit/mozapps/extensions/internal/PluginProvider.jsm index fa7b6257a4a2f..ec724ebad36e1 100644 --- a/toolkit/mozapps/extensions/internal/PluginProvider.jsm +++ b/toolkit/mozapps/extensions/internal/PluginProvider.jsm @@ -6,7 +6,7 @@ /* exported logger */ -this.EXPORTED_SYMBOLS = []; +var EXPORTED_SYMBOLS = []; ChromeUtils.import("resource://gre/modules/AddonManager.jsm"); /* globals AddonManagerPrivate*/ diff --git a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm index 5af94253b5c35..399d13986dca1 100644 --- a/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm +++ b/toolkit/mozapps/extensions/internal/ProductAddonChecker.jsm @@ -14,7 +14,7 @@ const LOCAL_EME_SOURCES = [{ "src": "chrome://global/content/gmp-sources/widevinecdm.json" }]; -this.EXPORTED_SYMBOLS = [ "ProductAddonChecker" ]; +var EXPORTED_SYMBOLS = [ "ProductAddonChecker" ]; Cu.importGlobalProperties(["XMLHttpRequest"]); diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.jsm b/toolkit/mozapps/extensions/internal/XPIInstall.jsm index 8275c27c470bf..0216d11816bf9 100644 --- a/toolkit/mozapps/extensions/internal/XPIInstall.jsm +++ b/toolkit/mozapps/extensions/internal/XPIInstall.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "DownloadAddonInstall", "LocalAddonInstall", "StagedAddonInstall", @@ -956,7 +956,7 @@ var loadManifestFromZipFile = async function(aXPIFile, aInstallLocation) { } }; -this.loadManifestFromFile = function(aFile, aInstallLocation) { +var loadManifestFromFile = function(aFile, aInstallLocation) { if (aFile.isFile()) return loadManifestFromZipFile(aFile, aInstallLocation); return loadManifestFromDir(aFile, aInstallLocation); @@ -1170,7 +1170,7 @@ function verifyDirSignedState(aDir, aAddon) { * the add-on object to verify * @return a Promise that resolves to an AddonManager.SIGNEDSTATE_* constant. */ -this.verifyBundleSignedState = function(aBundle, aAddon) { +var verifyBundleSignedState = function(aBundle, aAddon) { let promise = aBundle.isFile() ? verifyZipSignedState(aBundle, aAddon) : verifyDirSignedState(aBundle, aAddon); return promise.then(({signedState}) => signedState); @@ -1989,7 +1989,7 @@ class AddonInstall { } } -this.LocalAddonInstall = class extends AddonInstall { +var LocalAddonInstall = class extends AddonInstall { /** * Initialises this install to be an install from a local file. * @@ -2099,7 +2099,7 @@ this.LocalAddonInstall = class extends AddonInstall { } }; -this.DownloadAddonInstall = class extends AddonInstall { +var DownloadAddonInstall = class extends AddonInstall { /** * Instantiates a DownloadAddonInstall * @@ -2511,7 +2511,7 @@ this.DownloadAddonInstall = class extends AddonInstall { * can clean it up if the same add-on is installed again (see the comment * about "pending installs for the same add-on" in AddonInstall.startInstall) */ -this.StagedAddonInstall = class extends AddonInstall { +var StagedAddonInstall = class extends AddonInstall { constructor(installLocation, dir, manifest) { super(installLocation, dir); @@ -2659,7 +2659,7 @@ AddonInstallWrapper.prototype = { * An optional platform version to check for updates for * @throws if the aListener or aReason arguments are not valid */ -this.UpdateChecker = function(aAddon, aListener, aReason, aAppVersion, aPlatformVersion) { +var UpdateChecker = function(aAddon, aListener, aReason, aAppVersion, aPlatformVersion) { if (!aListener || !aReason) throw Cr.NS_ERROR_INVALID_ARG; diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.jsm b/toolkit/mozapps/extensions/internal/XPIProvider.jsm index cbce39c2ff731..253fb8844a1ae 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["XPIProvider", "XPIInternal"]; +var EXPORTED_SYMBOLS = ["XPIProvider", "XPIInternal"]; /* globals WebExtensionPolicy */ @@ -1442,7 +1442,7 @@ class XPIStateLocation extends Map { /** * Keeps track of the state of XPI add-ons on the file system. */ -this.XPIStates = { +var XPIStates = { // Map(location name -> Map(add-on ID -> XPIState)) db: null, @@ -1782,7 +1782,7 @@ this.XPIStates = { }, }; -this.XPIProvider = { +var XPIProvider = { get name() { return "XPIProvider"; }, @@ -6973,7 +6973,7 @@ class WinRegInstallLocation extends DirectoryInstallLocation { } } -this.XPIInternal = { +var XPIInternal = { AddonInternal, BOOTSTRAP_REASONS, KEY_APP_SYSTEM_ADDONS, diff --git a/toolkit/mozapps/extensions/test/AddonManagerTesting.jsm b/toolkit/mozapps/extensions/test/AddonManagerTesting.jsm index 8eba7c5e74ffa..540eaf9a51c85 100644 --- a/toolkit/mozapps/extensions/test/AddonManagerTesting.jsm +++ b/toolkit/mozapps/extensions/test/AddonManagerTesting.jsm @@ -7,7 +7,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "AddonManagerTesting", ]; @@ -16,7 +16,7 @@ ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm"); -this.AddonManagerTesting = { +var AddonManagerTesting = { /** * Get the add-on that is specified by its ID. * diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/version.jsm b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/version.jsm index 7fe60e632dd82..7b6d8960c5757 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/version.jsm +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/version.jsm @@ -1,3 +1,3 @@ -this.EXPORTED_SYMBOLS = ["VERSION"]; +var EXPORTED_SYMBOLS = ["VERSION"]; -this.VERSION = 1; +var VERSION = 1; diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/version.jsm b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/version.jsm index 532741e121b98..4afb723f695bc 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/version.jsm +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/version.jsm @@ -1,3 +1,3 @@ -this.EXPORTED_SYMBOLS = ["VERSION"]; +var EXPORTED_SYMBOLS = ["VERSION"]; -this.VERSION = 2; +var VERSION = 2; diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/version.jsm b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/version.jsm index 1b813faaf47ec..2454336c69146 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/version.jsm +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/version.jsm @@ -1,3 +1,3 @@ -this.EXPORTED_SYMBOLS = ["VERSION"]; +var EXPORTED_SYMBOLS = ["VERSION"]; -this.VERSION = 3; +var VERSION = 3; diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/BootstrapMonitor.jsm b/toolkit/mozapps/extensions/test/xpcshell/data/BootstrapMonitor.jsm index e747ec8f6d2dc..b04e612dfcebf 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/data/BootstrapMonitor.jsm +++ b/toolkit/mozapps/extensions/test/xpcshell/data/BootstrapMonitor.jsm @@ -1,6 +1,6 @@ ChromeUtils.import("resource://gre/modules/Services.jsm"); -this.EXPORTED_SYMBOLS = [ "monitor" ]; +var EXPORTED_SYMBOLS = [ "monitor" ]; function notify(event, originalMethod, data, reason) { let info = { @@ -23,7 +23,7 @@ function notify(event, originalMethod, data, reason) { // Allows a simple one-line bootstrap script: // Components.utils.import("resource://xpcshelldata/bootstrapmonitor.jsm").monitor(this); -this.monitor = function(scope, methods = ["install", "startup", "shutdown", "uninstall"]) { +var monitor = function(scope, methods = ["install", "startup", "shutdown", "uninstall"]) { for (let event of methods) { scope[event] = notify.bind(null, event, scope[event]); } diff --git a/toolkit/mozapps/update/UpdateListener.jsm b/toolkit/mozapps/update/UpdateListener.jsm index 3cdf1ed484c2c..a2b228d321ac1 100644 --- a/toolkit/mozapps/update/UpdateListener.jsm +++ b/toolkit/mozapps/update/UpdateListener.jsm @@ -4,7 +4,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = ["UpdateListener"]; +var EXPORTED_SYMBOLS = ["UpdateListener"]; ChromeUtils.import("resource://gre/modules/Services.jsm"); ChromeUtils.import("resource://gre/modules/Timer.jsm"); diff --git a/toolkit/mozapps/update/UpdateTelemetry.jsm b/toolkit/mozapps/update/UpdateTelemetry.jsm index 83646159bf43a..e29cc768cc435 100644 --- a/toolkit/mozapps/update/UpdateTelemetry.jsm +++ b/toolkit/mozapps/update/UpdateTelemetry.jsm @@ -4,13 +4,13 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "AUSTLMY" ]; ChromeUtils.import("resource://gre/modules/Services.jsm", this); -this.AUSTLMY = { +var AUSTLMY = { // Telemetry for the application update background update check occurs when // the background update timer fires after the update interval which is // determined by the app.update.interval preference and its telemetry diff --git a/uriloader/exthandler/tests/HandlerServiceTestUtils.jsm b/uriloader/exthandler/tests/HandlerServiceTestUtils.jsm index cb14b78000ebc..4c5644503af7c 100644 --- a/uriloader/exthandler/tests/HandlerServiceTestUtils.jsm +++ b/uriloader/exthandler/tests/HandlerServiceTestUtils.jsm @@ -7,7 +7,7 @@ "use strict"; -this.EXPORTED_SYMBOLS = [ +var EXPORTED_SYMBOLS = [ "HandlerServiceTestUtils", ]; @@ -23,7 +23,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "gMIMEService", "@mozilla.org/mime;1", "nsIMIMEService"); -this.HandlerServiceTestUtils = { +var HandlerServiceTestUtils = { /** * This has to be initialized to the nsIHandlerService instance under testing. *