Bug 1405288 - Remove duplicateNode actor method check from the inspector r=ochameau
authorPatrick Brosset <pbrosset@mozilla.com>
Thu, 19 Oct 2017 11:05:10 +0200
changeset 392862 5bc74f98b7ce480bc13e451f3fda5465d3297c7b
parent 392861 16c50fd548b688ab00ed16eb7bd09997a845ee2c
child 392863 531086ab7eba004afb1217b6e5ac46369094339b
push id55731
push userpbrosset@mozilla.com
push dateTue, 21 Nov 2017 10:21:45 +0000
treeherderautoland@a13174ac2d95 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau
bugs1405288, 1208864
milestone59.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 1405288 - Remove duplicateNode actor method check from the inspector r=ochameau This method was added in bug 1208864 2 years ago and shipped with Firefox 44. We support all the way to the latest ESR, which now is 52. So let's remove this backward compat code. MozReview-Commit-ID: AdTU63Oehi4
devtools/client/inspector/inspector.js
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -214,26 +214,22 @@ Inspector.prototype = {
       console.error(e);
     }
   },
 
   /**
    * Figure out what features the backend supports
    */
   _detectActorFeatures: function () {
-    this._supportsDuplicateNode = false;
     this._supportsScrollIntoView = false;
 
     // Use getActorDescription first so that all actorHasMethod calls use
     // a cached response from the server.
     return this._target.getActorDescription("domwalker").then(desc => {
       return promise.all([
-        this._target.actorHasMethod("domwalker", "duplicateNode").then(value => {
-          this._supportsDuplicateNode = value;
-        }).catch(console.error),
         this._target.actorHasMethod("domnode", "scrollIntoView").then(value => {
           this._supportsScrollIntoView = value;
         }).catch(console.error)
       ]);
     });
   },
 
   _deferredOpen: async function (defaultSelection) {
@@ -1290,17 +1286,16 @@ Inspector.prototype = {
       label: INSPECTOR_L10N.getStr("inspectorAddNode.label"),
       accesskey: INSPECTOR_L10N.getStr("inspectorAddNode.accesskey"),
       disabled: !this.canAddHTMLChild(),
       click: () => this.addNode(),
     }));
     menu.append(new MenuItem({
       id: "node-menu-duplicatenode",
       label: INSPECTOR_L10N.getStr("inspectorDuplicateNode.label"),
-      hidden: !this._supportsDuplicateNode,
       disabled: !isDuplicatableElement,
       click: () => this.duplicateNode(),
     }));
     menu.append(new MenuItem({
       id: "node-menu-delete",
       label: INSPECTOR_L10N.getStr("inspectorHTMLDelete.label"),
       accesskey: INSPECTOR_L10N.getStr("inspectorHTMLDelete.accesskey"),
       disabled: !isEditableElement,