Bug 1401293 - Remove unneeded special handling for the devtools panel from extension-process-script.js. draft
authorLuca Greco <lgreco@mozilla.com>
Tue, 19 Sep 2017 20:28:56 +0200
changeset 667132 0fbb196c6509552fe63a4682c345c863a2272611
parent 667127 ba69e294fc80f23d54fc68050f1b7d63d341aa9c
child 732300 65da6ba0ba3034cba6fae813667566930fbd3ed6
push id80617
push userluca.greco@alcacoop.it
push dateTue, 19 Sep 2017 18:30:23 +0000
bugs1401293
milestone57.0a1
Bug 1401293 - Remove unneeded special handling for the devtools panel from extension-process-script.js. MozReview-Commit-ID: 3pjuoqjULAB
toolkit/components/extensions/extension-process-script.js
--- a/toolkit/components/extensions/extension-process-script.js
+++ b/toolkit/components/extensions/extension-process-script.js
@@ -219,35 +219,26 @@ DocumentManager = {
    * @param {Window} window
    *        The window to check.
    * @param {string} addonId
    *        The add-on ID to check.
    * @returns {boolean}
    */
   checkParentFrames(window, addonId) {
     while (window.parent !== window) {
-      let {frameElement} = window;
       window = window.parent;
 
       let principal = window.document.nodePrincipal;
 
       if (Services.scriptSecurityManager.isSystemPrincipal(principal)) {
         // The add-on manager is a special case, since it contains extension
         // options pages in same-type <browser> frames.
         if (window.location.href === "about:addons") {
           return true;
         }
-
-        // NOTE: Special handling for devtools panels using a chrome iframe here
-        // for the devtools panel, it is needed because a content iframe breaks
-        // switching between docked and undocked mode (see bug 1075490).
-        if (frameElement &&
-            frameElement.mozMatchesSelector("browser[webextension-view-type='devtools_panel']")) {
-          return true;
-        }
       }
 
       if (principal.addonId !== addonId) {
         return false;
       }
     }
 
     return true;