From 4f6766932f01061162cf6859350a97d84449fb4c Mon Sep 17 00:00:00 2001 From: anayo Date: Wed, 22 Mar 2023 16:05:28 +0000 Subject: [PATCH] Bug 1817015 - Convert JSM in browser/components/protocolhandler to ESM r=kpatenio Differential Revision: https://phabricator.services.mozilla.com/D172829 --- ...ndlerRegistrar.jsm => WebProtocolHandlerRegistrar.sys.mjs} | 4 +--- browser/components/protocolhandler/components.conf | 2 +- browser/components/protocolhandler/moz.build | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename browser/components/protocolhandler/{WebProtocolHandlerRegistrar.jsm => WebProtocolHandlerRegistrar.sys.mjs} (98%) diff --git a/browser/components/protocolhandler/WebProtocolHandlerRegistrar.jsm b/browser/components/protocolhandler/WebProtocolHandlerRegistrar.sys.mjs similarity index 98% rename from browser/components/protocolhandler/WebProtocolHandlerRegistrar.jsm rename to browser/components/protocolhandler/WebProtocolHandlerRegistrar.sys.mjs index 31bc231bc547..023dad6855f9 100644 --- a/browser/components/protocolhandler/WebProtocolHandlerRegistrar.jsm +++ b/browser/components/protocolhandler/WebProtocolHandlerRegistrar.sys.mjs @@ -3,11 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -var EXPORTED_SYMBOLS = ["WebProtocolHandlerRegistrar"]; - const STRING_BUNDLE_URI = "chrome://browser/locale/feeds/subscribe.properties"; -function WebProtocolHandlerRegistrar() {} +export function WebProtocolHandlerRegistrar() {} WebProtocolHandlerRegistrar.prototype = { get stringBundle() { diff --git a/browser/components/protocolhandler/components.conf b/browser/components/protocolhandler/components.conf index a0495ad0127f..6fd4f035957a 100644 --- a/browser/components/protocolhandler/components.conf +++ b/browser/components/protocolhandler/components.conf @@ -8,7 +8,7 @@ Classes = [ { 'cid': '{efbd7b87-9b15-4684-abf0-dc2679daadb1}', 'contract_ids': ['@mozilla.org/embeddor.implemented/web-protocol-handler-registrar;1'], - 'jsm': 'resource:///modules/WebProtocolHandlerRegistrar.jsm', + 'esModule': 'resource:///modules/WebProtocolHandlerRegistrar.sys.mjs', 'constructor': 'WebProtocolHandlerRegistrar', 'processes': ProcessSelector.MAIN_PROCESS_ONLY, }, diff --git a/browser/components/protocolhandler/moz.build b/browser/components/protocolhandler/moz.build index 6e23e023cf0e..84fd43d18a4e 100644 --- a/browser/components/protocolhandler/moz.build +++ b/browser/components/protocolhandler/moz.build @@ -7,7 +7,7 @@ BROWSER_CHROME_MANIFESTS += ["test/browser/browser.ini"] EXTRA_JS_MODULES += [ - "WebProtocolHandlerRegistrar.jsm", + "WebProtocolHandlerRegistrar.sys.mjs", ] XPCOM_MANIFESTS += [