Bug 1370148 - Stop using the missing system-info.getProperty(host); r=jryans draft
authorPatrick Brosset <pbrosset@mozilla.com>
Mon, 05 Jun 2017 12:27:01 +0200
changeset 588976 eca3cb09b636cb57ff0370937202de76a837cd84
parent 588975 0440dfb684398145e531366e093e6bb7be736930
child 631726 2ae3a3a3486cacc456b8848cce10a49026874e85
push id62205
push userbmo:pbrosset@mozilla.com
push dateMon, 05 Jun 2017 10:27:43 +0000
reviewersjryans
bugs1370148
milestone55.0a1
Bug 1370148 - Stop using the missing system-info.getProperty(host); r=jryans MozReview-Commit-ID: 9vfGIXqIDk9
devtools/shared/discovery/discovery.js
--- a/devtools/shared/discovery/discovery.js
+++ b/devtools/shared/discovery/discovery.js
@@ -171,17 +171,18 @@ LocalDevice.prototype = {
       // To hex and zero pad
       randomID = ("00000000" + randomID.toString(16)).slice(-8);
       this.name = name + "-" + randomID;
     } else if (Services.appinfo.widgetToolkit == "android") {
       // For Firefox for Android, use the device's model name.
       // TODO: Bug 1180997: Find the right way to expose an editable name
       this.name = sysInfo.get("device");
     } else {
-      this.name = sysInfo.get("host");
+      this.name = Cc["@mozilla.org/network/dns-service;1"].getService(Ci.nsIDNSService)
+                                                          .myHostName;
     }
   },
 
   get name() {
     return this._name;
   },
 
   set name(name) {