Bug 1552444 - Fix Debugger isInToolbox helper to detect all about:devtools-toolbox URLs r=jlast
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 17 May 2019 13:02:44 +0000
changeset 474325 2d1a7a5be46038b3b130e18f409eec5b7e6bce66
parent 474324 8952fe75cb7a65e4f8d718439f6e156ed179c66f
child 474326 f72947acdfcd662c26a8e84efac58e703b2ce2ec
push id113144
push usershindli@mozilla.com
push dateFri, 17 May 2019 16:44:55 +0000
treeherdermozilla-inbound@f4c4b796f845 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1552444
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552444 - Fix Debugger isInToolbox helper to detect all about:devtools-toolbox URLs r=jlast Differential Revision: https://phabricator.services.mozilla.com/D31597
devtools/client/debugger/dist/vendors.js
--- a/devtools/client/debugger/dist/vendors.js
+++ b/devtools/client/debugger/dist/vendors.js
@@ -2528,17 +2528,17 @@ var substr = 'ab'.substr(-1) === 'b'
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 const { Menu, MenuItem } = __webpack_require__(183);
 
 function inToolbox() {
   try {
-    return window.parent.document.documentURI == "about:devtools-toolbox";
+    return window.parent.document.documentURI.startsWith("about:devtools-toolbox");
   } catch (e) {
     // If `window` is not available, it's very likely that we are in the toolbox.
     return true;
   }
 }
 
 if (!inToolbox()) {
   __webpack_require__(431);
@@ -2707,17 +2707,17 @@ function formatKeyShortcut(shortcut) {
   if (isMacOS) {
     return shortcut.replace(/Shift\+/g, "\u21E7").replace(/Command\+|Cmd\+/g, "\u2318").replace(/CommandOrControl\+|CmdOrCtrl\+/g, "\u2318").replace(/Alt\+/g, "\u2325");
   }
   return shortcut.replace(/CommandOrControl\+|CmdOrCtrl\+/g, `${L10N.getStr("ctrl")}+`).replace(/Shift\+/g, "Shift+");
 }
 
 function inToolbox() {
   try {
-    return window.parent.document.documentURI == "about:devtools-toolbox";
+    return window.parent.document.documentURI.startsWith("about:devtools-toolbox");
   } catch (e) {
     // If `window` is not available, it's very likely that we are in the toolbox.
     return true;
   }
 }
 
 /**
  * A partial implementation of the Menu API provided by electron: