Bug 1509753 - Use XULFrameElement instead of XULElement when determining sender. r=darktrojan
authorPhilipp Kewisch <mozilla@kewis.ch>
Mon, 26 Nov 2018 00:19:47 +0100
changeset 33786 8199346174a7d9de8f882c52e3d02f9867eecc00
parent 33785 fbf6d186a18a44e793e414fdd5715d2234e3cfd6
child 33787 fab70cf9e35485946adfc8a507210a6f837c64e0
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersdarktrojan
bugs1509753
Bug 1509753 - Use XULFrameElement instead of XULElement when determining sender. r=darktrojan
mail/components/extensions/parent/ext-mail.js
--- a/mail/components/extensions/parent/ext-mail.js
+++ b/mail/components/extensions/parent/ext-mail.js
@@ -18,17 +18,17 @@ let windowTracker;
 const getSender = (extension, target, sender) => {
   let tabId = -1;
   if ("tabId" in sender) {
     // The message came from a privileged extension page running in a tab. In
     // that case, it should include a tabId property (which is filled in by the
     // page-open listener below).
     tabId = sender.tabId;
     delete sender.tabId;
-  } else if (ExtensionCommon.instanceOf(target, "XULElement") ||
+  } else if (ExtensionCommon.instanceOf(target, "XULFrameElement") ||
              ExtensionCommon.instanceOf(target, "HTMLIFrameElement")) {
     tabId = tabTracker.getBrowserData(target).tabId;
   }
 
   if (tabId != null && tabId >= 0) {
     let tab = extension.tabManager.get(tabId, null);
     if (tab) {
       sender.tab = tab.convert();