Bug 1481691 - Drop code for FirefoxOS. r=jdescottes
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 10 Aug 2018 16:32:21 +0900
changeset 486168 fa083919718a87778ac4a8507ffd41c103861ec8
parent 486167 0d6fb76b026b0fe301683a5b2b96b82fe4fb7e46
child 486169 0ce06cc7f5d7e2d19e2967285f030807749e0889
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1481691
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 1481691 - Drop code for FirefoxOS. r=jdescottes
devtools/shared/adb/adb-scanner.js
--- a/devtools/shared/adb/adb-scanner.js
+++ b/devtools/shared/adb/adb-scanner.js
@@ -51,19 +51,18 @@ const ADBScanner = {
     }, () => {
       this._updatingPromise = null;
     });
     return this._updatingPromise;
   },
 
   _detectRuntimes: async function(device) {
     const model = await device.getModel();
-    let detectedRuntimes = await FirefoxOSRuntime.detect(device, model);
-    this._runtimes.push(...detectedRuntimes);
-    detectedRuntimes = await FirefoxOnAndroidRuntime.detect(device, model);
+    const detectedRuntimes =
+      await FirefoxOnAndroidRuntime.detect(device, model);
     this._runtimes.push(...detectedRuntimes);
   },
 
   scan() {
     return this._updateRuntimes();
   },
 
   listRuntimes() {
@@ -97,50 +96,16 @@ Runtime.prototype = {
       connection.connect();
     });
   },
   get id() {
     return this.device.id + "|" + this._socketPath;
   },
 };
 
-// FIXME: Bug 1481691 - Drop code for support FirefoxOS.
-function FirefoxOSRuntime(device, model) {
-  Runtime.call(this, device, model, "/data/local/debugger-socket");
-}
-
-FirefoxOSRuntime.detect = async function(device, model) {
-  const runtimes = [];
-  const query = "test -f /system/b2g/b2g; echo $?";
-  let b2gExists = await device.shell(query);
-  // XXX: Sometimes we get an empty response back.  Likely a bug in our shell
-  // code in this add-on.
-  // There are also some Android devices that do not have `test` installed.
-  for (let attempts = 3; attempts > 0; attempts--) {
-    b2gExists = await device.shell(query);
-    if (b2gExists.length == 3) {
-      break;
-    }
-  }
-  if (b2gExists === "0\r\n") {
-    const runtime = new FirefoxOSRuntime(device, model);
-    dumpn("Found " + runtime.name);
-    runtimes.push(runtime);
-  }
-  return runtimes;
-};
-
-FirefoxOSRuntime.prototype = Object.create(Runtime.prototype);
-
-Object.defineProperty(FirefoxOSRuntime.prototype, "name", {
-  get() {
-    return this._model || this.device.id;
-  }
-});
-
 function FirefoxOnAndroidRuntime(device, model, socketPath) {
   Runtime.call(this, device, model, socketPath);
 }
 
 // This requires Unix socket support from Firefox for Android (35+)
 FirefoxOnAndroidRuntime.detect = async function(device, model) {
   const runtimes = [];
   // A matching entry looks like: