diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index 4a7218536841..dc783712b631 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -147,14 +147,14 @@ const listeners = { "Reader:ArticleGet": ["ReaderParent"], "Reader:FaviconRequest": ["ReaderParent"], "Reader:UpdateReaderButton": ["ReaderParent"], - // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN LoginManagerParent.init + // PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN BrowserCLH.js "RemoteLogins:findLogins": ["LoginManagerParent"], "RemoteLogins:findRecipes": ["LoginManagerParent"], "RemoteLogins:onFormSubmit": ["LoginManagerParent"], "RemoteLogins:autoCompleteLogins": ["LoginManagerParent"], "RemoteLogins:removeLogin": ["LoginManagerParent"], "RemoteLogins:insecureLoginFormPresent": ["LoginManagerParent"], - // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN LoginManagerParent.init + // PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN BrowserCLH.js "WCCR:registerProtocolHandler": ["Feeds"], "WCCR:registerContentHandler": ["Feeds"], "rtcpeer:CancelRequest": ["webrtcUI"], diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm index 7d72f1acc9e1..e7230aca6def 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm @@ -66,24 +66,8 @@ var LoginManagerParent = { return LoginHelper.dedupeLogins(logins, ["username"], resolveBy, formOrigin); }, - // This should only be called on Android. Listeners are added in - // nsBrowserGlue.js on desktop. Please make sure that the list of - // listeners added here stays in sync with the listeners added in - // nsBrowserGlue when you change either. - init() { - let mm = Cc["@mozilla.org/globalmessagemanager;1"] - .getService(Ci.nsIMessageListenerManager); - // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN nsBrowserGlue - mm.addMessageListener("RemoteLogins:findLogins", this); - mm.addMessageListener("RemoteLogins:findRecipes", this); - mm.addMessageListener("RemoteLogins:onFormSubmit", this); - mm.addMessageListener("RemoteLogins:autoCompleteLogins", this); - mm.addMessageListener("RemoteLogins:removeLogin", this); - mm.addMessageListener("RemoteLogins:insecureLoginFormPresent", this); - // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN nsBrowserGlue - }, - - // Listeners are added in nsBrowserGlue.js + // Listeners are added in nsBrowserGlue.js on desktop + // and in BrowserCLH.js on mobile. receiveMessage(msg) { let data = msg.data; switch (msg.name) { diff --git a/toolkit/components/passwordmgr/test/pwmgr_common.js b/toolkit/components/passwordmgr/test/pwmgr_common.js index 1dd20a1c9a1e..04f09d829bfa 100644 --- a/toolkit/components/passwordmgr/test/pwmgr_common.js +++ b/toolkit/components/passwordmgr/test/pwmgr_common.js @@ -398,12 +398,6 @@ if (this.addMessageListener) { Services.obs.addObserver(onPrompt, "passwordmgr-prompt-save"); addMessageListener("setupParent", ({selfFilling = false} = {selfFilling: false}) => { - // Force LoginManagerParent to init for the tests since it's normally delayed - // by apps such as on Android. - if (AppConstants.platform == "android") { - LoginManagerParent.init(); - } - commonInit(selfFilling); sendAsyncMessage("doneSetup"); });