Bug 1515116 - Remove all useless destroy methods on Fronts. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 03 Jan 2019 10:09:40 +0000
changeset 509522 1a4647e09ea904c152bbac33dce377a64f9c2286
parent 509521 dafa583b9dfb1f176340624e58c5ae0dd3278553
child 509523 f0a67e0b5282cb3052690c09ea39ee7d3456ed0b
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1515116
milestone66.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 1515116 - Remove all useless destroy methods on Fronts. r=jdescottes Differential Revision: https://phabricator.services.mozilla.com/D14914
devtools/shared/fronts/animation.js
devtools/shared/fronts/changes.js
devtools/shared/fronts/emulation.js
devtools/shared/fronts/inspector.js
devtools/shared/fronts/node.js
devtools/shared/fronts/performance-recording.js
devtools/shared/fronts/performance.js
devtools/shared/fronts/promises.js
devtools/shared/fronts/reflow.js
devtools/shared/fronts/styles.js
--- a/devtools/shared/fronts/animation.js
+++ b/devtools/shared/fronts/animation.js
@@ -24,20 +24,16 @@ class AnimationPlayerFront extends Front
     if (detail === "actorid") {
       this.actorID = form;
       return;
     }
     this._form = form;
     this.state = this.initialState;
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   /**
    * If the AnimationsActor was given a reference to the WalkerActor previously
    * then calling this getter will return the animation target NodeFront.
    */
   get animationTargetNodeFront() {
     if (!this._form.animationTargetNodeActorID) {
       return null;
     }
@@ -201,16 +197,12 @@ class AnimationPlayerFront extends Front
 exports.AnimationPlayerFront = AnimationPlayerFront;
 registerFront(AnimationPlayerFront);
 
 class AnimationsFront extends FrontClassWithSpec(animationsSpec) {
   constructor(client, {animationsActor}) {
     super(client, {actor: animationsActor});
     this.manage(this);
   }
-
-  destroy() {
-    super.destroy();
-  }
 }
 
 exports.AnimationsFront = AnimationsFront;
 registerFront(AnimationsFront);
--- a/devtools/shared/fronts/changes.js
+++ b/devtools/shared/fronts/changes.js
@@ -10,16 +10,12 @@ const {changesSpec} = require("devtools/
 /**
  * ChangesFront, the front object for the ChangesActor
  */
 class ChangesFront extends FrontClassWithSpec(changesSpec) {
   constructor(client, {changesActor}) {
     super(client, {actor: changesActor});
     this.manage(this);
   }
-
-  destroy() {
-    super.destroy();
-  }
 }
 
 exports.ChangesFront = ChangesFront;
 registerFront(ChangesFront);
--- a/devtools/shared/fronts/emulation.js
+++ b/devtools/shared/fronts/emulation.js
@@ -10,16 +10,12 @@ const { emulationSpec } = require("devto
  * The corresponding Front object for the EmulationActor.
  */
 class EmulationFront extends FrontClassWithSpec(emulationSpec) {
   constructor(client, form) {
     super(client);
     this.actorID = form.emulationActor;
     this.manage(this);
   }
-
-  destroy() {
-    super.destroy();
-  }
 }
 
 exports.EmulationFront = EmulationFront;
 registerFront(EmulationFront);
--- a/devtools/shared/fronts/inspector.js
+++ b/devtools/shared/fronts/inspector.js
@@ -51,20 +51,16 @@ class WalkerFront extends FrontClassWith
     this._retainedOrphans = new Set();
 
     // Set to true if cleanup should be requested after every mutation list.
     this.autoCleanup = true;
 
     this.before("new-mutations", this.onMutations.bind(this));
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   // Update the object given a form representation off the wire.
   form(json) {
     this.actorID = json.actor;
     this.rootNode = types.getType("domnode").read(json.root, this);
     this._rootNodeDeferred.resolve(this.rootNode);
     // FF42+ the actor starts exposing traits
     this.traits = json.traits || {};
   }
--- a/devtools/shared/fronts/node.js
+++ b/devtools/shared/fronts/node.js
@@ -25,20 +25,16 @@ const HIDDEN_CLASS = "__fx-devtools-hide
 /**
  * Client side of a node list as returned by querySelectorAll()
  */
 class NodeListFront extends FrontClassWithSpec(nodeListSpec) {
   constructor(client, form) {
     super(client, form);
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   marshallPool() {
     return this.parent();
   }
 
   // Update the object given a form representation off the wire.
   form(json) {
     this.length = json.length;
   }
--- a/devtools/shared/fronts/performance-recording.js
+++ b/devtools/shared/fronts/performance-recording.js
@@ -54,20 +54,16 @@ class PerformanceRecordingFront extends 
     super(client, form);
     this._markers = [];
     this._frames = [];
     this._memory = [];
     this._ticks = [];
     this._allocations = { sites: [], timestamps: [], frames: [], sizes: [] };
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   /**
    * Saves the current recording to a file.
    *
    * @param nsIFile file
    *        The file to stream the data into.
    */
   exportRecording(file) {
     const recordingData = this.getAllData();
--- a/devtools/shared/fronts/performance.js
+++ b/devtools/shared/fronts/performance.js
@@ -26,20 +26,16 @@ class PerformanceFront extends FrontClas
     this.before("timeline-data", this._onTimelineEvent.bind(this));
     this.on("recording-started", this._onRecordingStartedEvent);
   }
 
   async initialize() {
     await this.connect();
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   /**
    * Conenct to the server, and handle once-off tasks like storing traits
    * or system info.
    */
   async connect() {
     const systemClient = await getSystemInfo();
     const { traits } = await super.connect({ systemClient });
     this._traits = traits;
--- a/devtools/shared/fronts/promises.js
+++ b/devtools/shared/fronts/promises.js
@@ -13,16 +13,12 @@ const { promisesSpec } = require("devtoo
  * PromisesFront, the front for the PromisesActor.
  */
 class PromisesFront extends FrontClassWithSpec(promisesSpec) {
   constructor(client, form) {
     super(client, form);
     this.actorID = form.promisesActor;
     this.manage(this);
   }
-
-  destroy() {
-    super.destroy();
-  }
 }
 
 exports.PromisesFront = PromisesFront;
 registerFront(PromisesFront);
--- a/devtools/shared/fronts/reflow.js
+++ b/devtools/shared/fronts/reflow.js
@@ -15,16 +15,12 @@ const { FrontClassWithSpec, registerFron
  * front.start();
  * // now wait for events to come
  */
 class ReflowFront extends FrontClassWithSpec(reflowSpec) {
   constructor(client, {reflowActor}) {
     super(client, {actor: reflowActor});
     this.manage(this);
   }
-
-  destroy() {
-    super.destroy();
-  }
 }
 
 exports.ReflowFront = ReflowFront;
 registerFront(ReflowFront);
--- a/devtools/shared/fronts/styles.js
+++ b/devtools/shared/fronts/styles.js
@@ -28,20 +28,16 @@ class PageStyleFront extends FrontClassW
   form(form, detail) {
     if (detail === "actorid") {
       this.actorID = form;
       return;
     }
     this._form = form;
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   get walker() {
     return this.inspector.walker;
   }
 
   get supportsAuthoredStyles() {
     return this._form.traits && this._form.traits.authoredStyles;
   }
 
@@ -100,20 +96,16 @@ registerFront(PageStyleFront);
  */
 class StyleRuleFront extends FrontClassWithSpec(styleRuleSpec) {
   constructor(client, form, ctx, detail) {
     super(client, form, ctx, detail);
 
     this.before("location-changed", this._locationChangedPre.bind(this));
   }
 
-  destroy() {
-    super.destroy();
-  }
-
   form(form, detail) {
     if (detail === "actorid") {
       this.actorID = form;
       return;
     }
     this.actorID = form.actor;
     this._form = form;
     if (this._mediaText) {