Bug 1447487 - use target.getFront to instantiate inspectorFront; r=ochameau
authoryulia <ystartsev@mozilla.com>
Tue, 28 Aug 2018 15:04:36 +0200
changeset 492076 01e1051d99f633e36ef194b67ecb2eea4d95cc6e
parent 492075 93b787ac2f3377d38121f07da493706bb3b48ea1
child 492077 5ed7c0b5a15e3a22df74bfab88e016b73c26c16c
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1447487
milestone63.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 1447487 - use target.getFront to instantiate inspectorFront; r=ochameau
devtools/client/menus.js
--- a/devtools/client/menus.js
+++ b/devtools/client/menus.js
@@ -29,17 +29,16 @@
  */
 
 const { Cu } = require("chrome");
 
 loader.lazyRequireGetter(this, "gDevToolsBrowser", "devtools/client/framework/devtools-browser", true);
 loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/target", true);
 loader.lazyRequireGetter(this, "ResponsiveUIManager", "devtools/client/responsive.html/manager", true);
 loader.lazyRequireGetter(this, "openDocLink", "devtools/client/shared/link", true);
-loader.lazyRequireGetter(this, "InspectorFront", "devtools/shared/fronts/inspector", true);
 
 loader.lazyImporter(this, "BrowserToolboxProcess", "resource://devtools/client/framework/ToolboxProcess.jsm");
 loader.lazyImporter(this, "ScratchpadManager", "resource://devtools/client/scratchpad/scratchpad-manager.jsm");
 
 exports.menuitems = [
   { id: "menu_devToolbox",
     l10nKey: "devToolboxMenuItem",
     oncommand(event) {
@@ -95,18 +94,18 @@ exports.menuitems = [
     checkbox: true
   },
   { id: "menu_eyedropper",
     l10nKey: "eyedropper",
     async oncommand(event) {
       const window = event.target.ownerDocument.defaultView;
       const target = TargetFactory.forTab(window.gBrowser.selectedTab);
       await target.makeRemote();
-      const inspector = new InspectorFront(target.client, target.form);
-      inspector.pickColorFromPage({copyOnSelect: true, fromMenu: true});
+      const inspectorFront = await target.getFront("inspector");
+      inspectorFront.pickColorFromPage({copyOnSelect: true, fromMenu: true});
     },
     checkbox: true
   },
   { id: "menu_scratchpad",
     l10nKey: "scratchpad",
     oncommand() {
       ScratchpadManager.openScratchpad();
     },