Bug 1361601 - Remove nsSystemInfo.getProperty("host") r=froydnj
authorPatrick McManus <mcmanus@ducksong.com>
Tue, 02 May 2017 16:54:46 -0400
changeset 356206 040f581bbbd9bc96fc4babf85000b586aeef92b9
parent 356205 43f195f28f6a2efc5ab58b5b371b8b905b77cd8b
child 356207 03cfa568b94046e31d6d6dddd200cb9f60bb91cd
push id31759
push userkwierso@gmail.com
push dateWed, 03 May 2017 20:18:58 +0000
treeherdermozilla-central@96605941c002 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1361601, 1361495
milestone55.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 1361601 - Remove nsSystemInfo.getProperty("host") r=froydnj See also bug 1361495 - PR_SI_HOSTNAME is implemented in NSPR on Windows as initializing winsock which can be janky. There don't seem to be any users of this property, and it has tracker concerns anyhow - so remove it. MozReview-Commit-ID: S2AwzMUgYk
xpcom/base/nsSystemInfo.cpp
xpcom/tests/unit/test_systemInfo.js
--- a/xpcom/base/nsSystemInfo.cpp
+++ b/xpcom/base/nsSystemInfo.cpp
@@ -347,17 +347,16 @@ nsSystemInfo::Init()
   nsresult rv;
 
   static const struct
   {
     PRSysInfo cmd;
     const char* name;
   } items[] = {
     { PR_SI_SYSNAME, "name" },
-    { PR_SI_HOSTNAME, "host" },
     { PR_SI_ARCHITECTURE, "arch" },
     { PR_SI_RELEASE, "version" }
   };
 
   for (uint32_t i = 0; i < (sizeof(items) / sizeof(items[0])); i++) {
     char buf[SYS_INFO_BUFFER_LENGTH];
     if (PR_GetSystemInfo(items[i].cmd, buf, sizeof(buf)) == PR_SUCCESS) {
       rv = SetPropertyAsACString(NS_ConvertASCIItoUTF16(items[i].name),
--- a/xpcom/tests/unit/test_systemInfo.js
+++ b/xpcom/tests/unit/test_systemInfo.js
@@ -1,14 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function run_test() {
-  const PROPERTIES = ["name", "host", "arch", "version", "pagesize",
+  const PROPERTIES = ["name", "arch", "version", "pagesize",
                       "pageshift", "memmapalign", "cpucount", "memsize"];
   let sysInfo = Components.classes["@mozilla.org/system-info;1"].
                 getService(Components.interfaces.nsIPropertyBag2);
 
   PROPERTIES.forEach(function(aPropertyName) {
     print("Testing property: " + aPropertyName);
     let value = sysInfo.getProperty(aPropertyName);
     do_check_true(!!value);