diff --git a/browser/base/content/browser-media.js b/browser/base/content/browser-media.js index 9956d1e8c1e0..749baab58a58 100644 --- a/browser/base/content/browser-media.js +++ b/browser/base/content/browser-media.js @@ -356,9 +356,9 @@ let gDecoderDoctorHandler = { }, } -window.messageManager.addMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler); -window.messageManager.addMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler); +window.getGroupMessageManager("browsers").addMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler); +window.getGroupMessageManager("browsers").addMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler); window.addEventListener("unload", function() { - window.messageManager.removeMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler); - window.messageManager.removeMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler); + window.getGroupMessageManager("browsers").removeMessageListener("EMEVideo:ContentMediaKeysRequest", gEMEHandler); + window.getGroupMessageManager("browsers").removeMessageListener("DecoderDoctor:Notification", gDecoderDoctorHandler); }, false);