Backed out 3 changesets (bug 1418131) for Browser-chrome failure, mochitest failre and build bustage on Windows mingw
authorDorel Luca <dluca@mozilla.com>
Mon, 15 Jan 2018 22:51:31 +0200
changeset 453634 c4dd70f035f664022212b841862ffe4d9cd1e96e
parent 453633 58c0a6ed3bb71d9f79d4b7e89135d984768a2a4f
child 453635 d66bae3d5be11415ce50fc35c3b6510f57678b02
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1418131
milestone59.0a1
backs out75591ea83b3c104643603a8992f2e20b1abd2bdf
73dca204352537366f995ca177e69870a3ccf693
5dd6963e2a123df1baa6fab3a878ed4b1660133c
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
Backed out 3 changesets (bug 1418131) for Browser-chrome failure, mochitest failre and build bustage on Windows mingw Backed out changeset 75591ea83b3c (bug 1418131) Backed out changeset 73dca2043525 (bug 1418131) Backed out changeset 5dd6963e2a12 (bug 1418131)
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/docs/data/environment.rst
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
toolkit/content/aboutSupport.js
toolkit/content/aboutSupport.xhtml
toolkit/locales/en-US/chrome/global/aboutSupport.dtd
toolkit/modules/Troubleshoot.jsm
xpcom/base/moz.build
xpcom/base/nsSystemInfo.cpp
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -1593,41 +1593,16 @@ EnvironmentCache.prototype = {
       system:  { // hdd where the system files are located
         model: getSysinfoProperty("winHDDModel", null),
         revision: getSysinfoProperty("winHDDRevision", null),
       },
     };
   },
 
   /**
-   * Get registered security product information.
-   * @return Object containing the security product data
-   */
-  _getSecurityAppData() {
-    const maxStringLength = 256;
-
-    const keys = [ ["registeredAntiVirus", "antivirus"],
-                   ["registeredAntiSpyware", "antispyware"],
-                   ["registeredFirewall", "firewall"] ];
-
-    let result = {};
-
-    for (let [inKey, outKey] of keys) {
-      let prop = getSysinfoProperty(inKey, null);
-      if (prop) {
-        prop = limitStringToLength(prop, maxStringLength).split(";");
-      }
-
-      result[outKey] = prop;
-    }
-
-    return result;
-  },
-
-  /**
    * Get the GFX information.
    * @return Object containing the GFX data.
    */
   _getGFXData() {
     let gfxData = {
       D2DEnabled: getGfxField("D2DEnabled", null),
       DWriteEnabled: getGfxField("DWriteEnabled", null),
       ContentBackend: getGfxField("ContentBackend", null),
@@ -1704,21 +1679,16 @@ EnvironmentCache.prototype = {
     };
 
     if (AppConstants.platform === "win") {
       data.isWow64 = getSysinfoProperty("isWow64", null);
     } else if (AppConstants.platform == "android") {
       data.device = this._getDeviceData();
     }
 
-    // Windows 8+
-    if (AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
-      data.sec = this._getSecurityAppData();
-    }
-
     return data;
   },
 
   _onEnvironmentChange(what, oldEnvironment) {
     this._log.trace("_onEnvironmentChange for " + what);
 
     // We are already skipping change events in _checkChanges if there is a pending change task running.
     if (this._shutdown) {
--- a/toolkit/components/telemetry/docs/data/environment.rst
+++ b/toolkit/components/telemetry/docs/data/environment.rst
@@ -197,21 +197,16 @@ Structure:
                 status: <string>, // "Available" means currently in use
               },
               advancedLayers: { // Advanced Layers compositing. Only present if D3D11 enabled.
                 status: <string>,    // See the status codes above.
               },
             },
           },
         appleModelId: <string>, // Mac only or null on failure
-        sec: { // This feature is Windows 8+ only
-          antivirus: [ <string>, ... ],    // null if unavailable on platform: Product name(s) of registered antivirus programs
-          antispyware: [ <string>, ... ],  // null if unavailable on platform: Product name(s) of registered antispyware programs
-          firewall: [ <string>, ... ],     // null if unavailable on platform: Product name(s) of registered firewall programs
-        },
       },
       addons: {
         activeAddons: { // the currently enabled add-ons
           <addon id>: {
             blocklisted: <bool>,
             description: <string>, // null if not available
             name: <string>,
             userDisabled: <bool>,
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -661,35 +661,16 @@ function checkSystemSection(data) {
     Assert.equal(features.webgl, gfxData.features.webgl);
   } catch (e) {}
 
   if (gIsMac) {
     Assert.ok(checkString(data.system.appleModelId));
   } else {
     Assert.ok(checkNullOrString(data.system.appleModelId));
   }
-
-  // This feature is only available on Windows 8+
-  if (AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
-    Assert.ok("sec" in data.system, "sec must be available under data.system");
-
-    let SEC_FIELDS = ["antivirus", "antispyware", "firewall"];
-    for (let f of SEC_FIELDS) {
-      Assert.ok(f in data.system.sec, f + " must be available under data.system.sec");
-
-      let value = data.system.sec[f];
-      // value is null on Windows Server
-      Assert.ok(value === null || Array.isArray(value), f + " must be either null or an array");
-      if (Array.isArray(value)) {
-        for (let product of value) {
-          Assert.equal(typeof product, "string", "Each element of " + f + " must be a string");
-        }
-      }
-    }
-  }
 }
 
 function checkActiveAddon(data, partialRecord) {
   let signedState = mozinfo.addon_signing ? "number" : "undefined";
   // system add-ons have an undefined signState
   if (data.isSystem)
     signedState = "undefined";
 
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -178,28 +178,16 @@ var snapshotFormatters = {
         $.new("td", extension.name),
         $.new("td", extension.version),
         $.new("td", extension.isActive),
         $.new("td", extension.id),
       ]);
     }));
   },
 
-  securitySoftware: function securitySoftware(data) {
-    if (!AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
-      $("security-software-title").hidden = true;
-      $("security-software-table").hidden = true;
-      return;
-    }
-
-    $("security-software-antivirus").textContent = data.registeredAntiVirus;
-    $("security-software-antispyware").textContent = data.registeredAntiSpyware;
-    $("security-software-firewall").textContent = data.registeredFirewall;
-  },
-
   features: function features(data) {
     $.append($("features-tbody"), data.map(function(feature) {
       return $.new("tr", [
         $.new("td", feature.name),
         $.new("td", feature.version),
         $.new("td", feature.id),
       ]);
     }));
--- a/toolkit/content/aboutSupport.xhtml
+++ b/toolkit/content/aboutSupport.xhtml
@@ -365,63 +365,16 @@
           </tr>
         </thead>
         <tbody id="extensions-tbody">
         </tbody>
       </table>
 
       <!-- - - - - - - - - - - - - - - - - - - - - -->
 
-      <h2 class="major-section" id="security-software-title">
-        &aboutSupport.securitySoftwareTitle;
-      </h2>
-
-      <table id="security-software-table">
-        <thead>
-          <tr>
-            <th>
-              &aboutSupport.securitySoftwareType;
-            </th>
-            <th>
-              &aboutSupport.securitySoftwareName;
-            </th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr>
-            <th class="column">
-              &aboutSupport.securitySoftwareAntivirus;
-            </th>
-
-            <td id="security-software-antivirus">
-            </td>
-          </tr>
-
-          <tr>
-            <th class="column">
-              &aboutSupport.securitySoftwareAntiSpyware;
-            </th>
-
-            <td id="security-software-antispyware">
-            </td>
-          </tr>
-
-          <tr>
-            <th class="column">
-              &aboutSupport.securitySoftwareFirewall;
-            </th>
-
-            <td id="security-software-firewall">
-            </td>
-          </tr>
-        </tbody>
-      </table>
-
-      <!-- - - - - - - - - - - - - - - - - - - - - -->
-
       <h2 class="major-section">
         &aboutSupport.graphicsTitle;
       </h2>
 
       <table>
         <tbody id="graphics-features-tbody">
           <tr>
             <th colspan="2" class="title-column">
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.dtd
@@ -20,23 +20,16 @@ This is likely the same like id.heading 
 <!ENTITY aboutSupport.crashes.noConfig "This application has not been configured to display crash reports.">
 
 <!ENTITY aboutSupport.extensionsTitle "Extensions">
 <!ENTITY aboutSupport.extensionName "Name">
 <!ENTITY aboutSupport.extensionEnabled "Enabled">
 <!ENTITY aboutSupport.extensionVersion "Version">
 <!ENTITY aboutSupport.extensionId "ID">
 
-<!ENTITY aboutSupport.securitySoftwareTitle "Security Software">
-<!ENTITY aboutSupport.securitySoftwareType "Type">
-<!ENTITY aboutSupport.securitySoftwareName "Name">
-<!ENTITY aboutSupport.securitySoftwareAntivirus "Antivirus">
-<!ENTITY aboutSupport.securitySoftwareAntiSpyware "Antispyware">
-<!ENTITY aboutSupport.securitySoftwareFirewall "Firewall">
-
 <!ENTITY aboutSupport.featuresTitle "&brandShortName; Features">
 <!ENTITY aboutSupport.featureName "Name">
 <!ENTITY aboutSupport.featureVersion "Version">
 <!ENTITY aboutSupport.featureId "ID">
 
 <!ENTITY aboutSupport.experimentsTitle "Experimental Features">
 <!ENTITY aboutSupport.experimentName "Name">
 <!ENTITY aboutSupport.experimentId "ID">
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -284,37 +284,16 @@ var dataProviders = {
         return props.reduce(function(extData, prop) {
           extData[prop] = ext[prop];
           return extData;
         }, {});
       }));
     });
   },
 
-  securitySoftware: function securitySoftware(done) {
-    let data = {};
-
-    let sysInfo = Cc["@mozilla.org/system-info;1"].
-                  getService(Ci.nsIPropertyBag2);
-
-    const keys = ["registeredAntiVirus", "registeredAntiSpyware",
-                  "registeredFirewall"];
-    for (let key of keys) {
-      let prop = "";
-      try {
-        prop = sysInfo.getProperty(key);
-      } catch (e) {
-      }
-
-      data[key] = prop;
-    }
-
-    done(data);
-  },
-
   features: function features(done) {
     AddonManager.getAddonsByTypes(["extension"], function(features) {
       features = features.filter(f => f.isSystem);
       features.sort(function(a, b) {
         // In some unfortunate cases addon names can be null.
         let aname = a.name || null;
         let bname = b.name || null;
         let lc = aname.localeCompare(bname);
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -84,19 +84,16 @@ EXPORTS += [
     'nsWeakPtr.h',
     'nsWeakReference.h',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     EXPORTS += [
         'nsWindowsHelpers.h',
     ]
-    OS_LIBS += [
-        'wscapi',
-    ]
 
 EXPORTS.mozilla += [
     'AutoRestore.h',
     'AvailableMemoryTracker.h',
     'ClearOnShutdown.h',
     'CountingAllocatorBase.h',
     'CycleCollectedJSContext.h',
     'CycleCollectedJSRuntime.h',
--- a/xpcom/base/nsSystemInfo.cpp
+++ b/xpcom/base/nsSystemInfo.cpp
@@ -9,22 +9,19 @@
 #include "nsSystemInfo.h"
 #include "prsystem.h"
 #include "prio.h"
 #include "mozilla/SSE.h"
 #include "mozilla/arm.h"
 #include "mozilla/Sprintf.h"
 
 #ifdef XP_WIN
-#include <comutil.h>
 #include <time.h>
-#include <iwscapi.h>
 #include <windows.h>
 #include <winioctl.h>
-#include <wscapi.h>
 #include "base/scoped_handle_win.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsIObserverService.h"
 #include "nsWindowsHelpers.h"
 #endif
 
@@ -233,115 +230,16 @@ nsresult GetCountryCode(nsAString& aCoun
   }
 
   // numChars includes null terminator
   aCountryCode.Truncate(numChars - 1);
   return NS_OK;
 }
 
 } // namespace
-
-static HRESULT
-EnumWSCProductList(nsAString& aOutput, NotNull<IWSCProductList*> aProdList)
-{
-  MOZ_ASSERT(aOutput.IsEmpty());
-
-  LONG count;
-  HRESULT hr = aProdList->get_Count(&count);
-  if (FAILED(hr)) {
-    return hr;
-  }
-
-  for (LONG index = 0; index < count; ++index) {
-    RefPtr<IWscProduct> product;
-    hr = aProdList->get_Item(index, getter_AddRefs(product));
-    if (FAILED(hr)) {
-      return hr;
-    }
-
-    WSC_SECURITY_PRODUCT_STATE state;
-    hr = product->get_ProductState(&state);
-    if (FAILED(hr)) {
-      return hr;
-    }
-
-    // We only care about products that are active
-    if (state == WSC_SECURITY_PRODUCT_STATE_OFF ||
-        state == WSC_SECURITY_PRODUCT_STATE_SNOOZED) {
-      continue;
-    }
-
-    _bstr_t bName;
-    hr = product->get_ProductName(bName.GetAddress());
-    if (FAILED(hr)) {
-      return hr;
-    }
-
-    if (!aOutput.IsEmpty()) {
-      aOutput.AppendLiteral(u";");
-    }
-
-    aOutput.Append((wchar_t*)bName, bName.length());
-  }
-
-  return S_OK;
-}
-
-static nsresult
-GetWindowsSecurityCenterInfo(nsAString& aAVInfo, nsAString& aAntiSpyInfo,
-                             nsAString& aFirewallInfo)
-{
-  aAVInfo.Truncate();
-  aAntiSpyInfo.Truncate();
-  aFirewallInfo.Truncate();
-
-  MOZ_ASSERT(XRE_IsParentProcess());
-  if (!XRE_IsParentProcess()) {
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-
-  const CLSID clsid = __uuidof(WSCProductList);
-  const IID iid = __uuidof(IWSCProductList);
-
-  // NB: A separate instance of IWSCProductList is needed for each distinct
-  // security provider type; MSDN says that we cannot reuse the same object
-  // and call Initialize() to pave over the previous data.
-
-  WSC_SECURITY_PROVIDER providerTypes[] = { WSC_SECURITY_PROVIDER_ANTIVIRUS,
-                                            WSC_SECURITY_PROVIDER_ANTISPYWARE,
-                                            WSC_SECURITY_PROVIDER_FIREWALL };
-
-  // Each output must match the corresponding entry in providerTypes.
-  nsAString* outputs[] = { &aAVInfo, &aAntiSpyInfo, &aFirewallInfo };
-
-  static_assert(ArrayLength(providerTypes) == ArrayLength(outputs),
-                "Length of providerTypes and outputs arrays must match");
-
-  for (uint32_t index = 0; index < ArrayLength(providerTypes); ++index) {
-    RefPtr<IWSCProductList> prodList;
-    HRESULT hr = ::CoCreateInstance(clsid, nullptr, CLSCTX_INPROC_SERVER, iid,
-                                    getter_AddRefs(prodList));
-    if (FAILED(hr)) {
-      return NS_ERROR_NOT_AVAILABLE;
-    }
-
-    hr = prodList->Initialize(providerTypes[index]);
-    if (FAILED(hr)) {
-      return NS_ERROR_UNEXPECTED;
-    }
-
-    hr = EnumWSCProductList(*outputs[index], WrapNotNull(prodList.get()));
-    if (FAILED(hr)) {
-      return NS_ERROR_UNEXPECTED;
-    }
-  }
-
-  return NS_OK;
-}
-
 #endif // defined(XP_WIN)
 
 #ifdef XP_MACOSX
 static nsresult GetAppleModelId(nsAutoCString& aModelId)
 {
   size_t numChars = 0;
   size_t result = sysctlbyname("hw.model", nullptr, &numChars, nullptr, 0);
   if (result != 0 || !numChars) {
@@ -789,44 +687,16 @@ nsSystemInfo::Init()
 
   uint32_t installYear = 0;
   if (NS_SUCCEEDED(GetInstallYear(installYear))) {
     rv = SetPropertyAsUint32(NS_LITERAL_STRING("installYear"), installYear);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
   }
-
-  nsAutoString avInfo, antiSpyInfo, firewallInfo;
-  if (NS_SUCCEEDED(GetWindowsSecurityCenterInfo(avInfo, antiSpyInfo,
-                                                firewallInfo))) {
-    if (!avInfo.IsEmpty()) {
-      rv = SetPropertyAsAString(NS_LITERAL_STRING("registeredAntiVirus"),
-                                avInfo);
-      if (NS_WARN_IF(NS_FAILED(rv))) {
-        return rv;
-      }
-    }
-
-    if (!antiSpyInfo.IsEmpty()) {
-      rv = SetPropertyAsAString(NS_LITERAL_STRING("registeredAntiSpyware"),
-                                antiSpyInfo);
-      if (NS_WARN_IF(NS_FAILED(rv))) {
-        return rv;
-      }
-    }
-
-    if (!firewallInfo.IsEmpty()) {
-      rv = SetPropertyAsAString(NS_LITERAL_STRING("registeredFirewall"),
-                                firewallInfo);
-      if (NS_WARN_IF(NS_FAILED(rv))) {
-        return rv;
-      }
-    }
-  }
 #endif
 
 #if defined(XP_MACOSX)
   nsAutoString countryCode;
   if (NS_SUCCEEDED(GetSelectedCityInfo(countryCode))) {
     rv = SetPropertyAsAString(NS_LITERAL_STRING("countryCode"), countryCode);
     NS_ENSURE_SUCCESS(rv, rv);
   }