Bug 1513565 - Remove now-unused form argument from Target. r=yulia
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 18 Dec 2018 23:36:06 +0000
changeset 511267 3d30fc6ff7c4c6b007b554ef8c185b6a81ef117e
parent 511266 835e98747541301ba1beb317a6ea3fcd7dd0b310
child 511268 83732aea523264c55ebda67f7a3ea55f1d0154b9
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1513565
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 1513565 - Remove now-unused form argument from Target. r=yulia Depends on D14280 Differential Revision: https://phabricator.services.mozilla.com/D14765
devtools/client/framework/target.js
--- a/devtools/client/framework/target.js
+++ b/devtools/client/framework/target.js
@@ -197,24 +197,23 @@ const TargetFactory = exports.TargetFact
  *                  The DebuggerClient instance to be used to debug this target.
  * @param {Boolean} chrome
  *                  True, if we allow to see privileged resources like JSM, xpcom,
  *                  frame scripts...
  * @param {xul:tab} tab (optional)
  *                  If the target is a local Firefox tab, a reference to the firefox
  *                  frontend tab object.
  */
-function Target({ form, client, chrome, activeTab = null, tab = null }) {
+function Target({ client, chrome, activeTab = null, tab = null }) {
   EventEmitter.decorate(this);
   this.destroy = this.destroy.bind(this);
   this._onTabNavigated = this._onTabNavigated.bind(this);
   this.activeConsole = null;
   this.activeTab = activeTab;
 
-  this._form = form;
   this._url = this.form.url;
   this._title = this.form.title;
 
   this._client = client;
   this._chrome = chrome;
 
   // When debugging local tabs, we also have a reference to the Firefox tab
   // This is used to:
@@ -351,19 +350,17 @@ Target.prototype = {
     return this.client.traits[traitName];
   },
 
   get tab() {
     return this._tab;
   },
 
   get form() {
-    // Target constructor either receive a form or a Front.
-    // If a front is passed, fetch the form from it.
-    return this._form || this.activeTab.targetForm;
+    return this.activeTab.targetForm;
   },
 
   // Get a promise of the RootActor's form
   get root() {
     return this.client.mainRoot.rootForm;
   },
 
   // Temporary fix for bug #1493131 - inspector has a different life cycle
@@ -831,17 +828,16 @@ Target.prototype = {
     } else {
       promiseTargets.delete(this.form);
     }
 
     this.activeTab = null;
     this.activeConsole = null;
     this._client = null;
     this._tab = null;
-    this._form = null;
     this._attach = null;
     this._title = null;
     this._url = null;
   },
 
   toString: function() {
     const id = this._tab ? this._tab : (this.form && this.form.actor);
     return `Target:${id}`;