Bug 1209634 - Remove unused target.version. r=past
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 01 Oct 2015 18:13:24 -0500
changeset 266911 404ae1b08e793195558313eab4f984fdd74f8ac0
parent 266910 b5993cbe18731815dfe2aa5ac6c01e0d691bc8a0
child 266912 9d03bc7fad056b1330362faeaff75237b4691a65
push id66331
push userkwierso@gmail.com
push dateThu, 08 Oct 2015 21:35:51 +0000
treeherdermozilla-inbound@1a5167cd7688 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs1209634
milestone44.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 1209634 - Remove unused target.version. r=past
devtools/client/framework/target.js
--- a/devtools/client/framework/target.js
+++ b/devtools/client/framework/target.js
@@ -75,28 +75,16 @@ exports.TargetFactory = {
    * @return true/false
    */
   isKnownTab: function TF_isKnownTab(tab) {
     return targets.has(tab);
   },
 };
 
 /**
- * The 'version' property allows the developer tools equivalent of browser
- * detection. Browser detection is evil, however while we don't know what we
- * will need to detect in the future, it is an easy way to postpone work.
- * We should be looking to use the support features added in bug 1069673
- * in place of version where possible.
- */
-function getVersion() {
-  // FIXME: return something better
-  return 20;
-}
-
-/**
  * A Target represents something that we can debug. Targets are generally
  * read-only. Any changes that you wish to make to a target should be done via
  * a Tool that attaches to the target. i.e. a Target is just a pointer saying
  * "the thing to debug is over there".
  *
  * Providing a generalized abstraction of a web-page or web-browser (available
  * either locally or remotely) is beyond the scope of this class (and maybe
  * also beyond the scope of this universe) However Target does attempt to
@@ -118,22 +106,16 @@ function getVersion() {
  * Comparing Targets: 2 instances of a Target object can point at the same
  * thing, so t1 !== t2 and t1 != t2 even when they represent the same object.
  * To compare to targets use 't1.equals(t2)'.
  */
 function Target() {
   throw new Error("Use TargetFactory.newXXX or Target.getXXX to create a Target in place of 'new Target()'");
 }
 
-Object.defineProperty(Target.prototype, "version", {
-  get: getVersion,
-  enumerable: true
-});
-
-
 /**
  * A TabTarget represents a page living in a browser tab. Generally these will
  * be web pages served over http(s), but they don't have to be.
  */
 function TabTarget(tab) {
   EventEmitter.decorate(this);
   this.destroy = this.destroy.bind(this);
   this._handleThreadState = this._handleThreadState.bind(this);
@@ -269,18 +251,16 @@ TabTarget.prototype = {
     // override the root actor traits
     if (this.form.traits && traitName in this.form.traits) {
       return this.form.traits[traitName];
     }
 
     return this.client.traits[traitName];
   },
 
-  get version() { return getVersion(); },
-
   get tab() {
     return this._tab;
   },
 
   get form() {
     return this._form;
   },