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)
This commit is contained in:
Dorel Luca
2018-01-15 22:51:31 +02:00
parent ea00a7a3b2
commit e99ef2d7a5
9 changed files with 0 additions and 274 deletions

View File

@@ -1597,31 +1597,6 @@ EnvironmentCache.prototype = {
};
},
/**
* 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.
@@ -1709,11 +1684,6 @@ EnvironmentCache.prototype = {
data.device = this._getDeviceData();
}
// Windows 8+
if (AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
data.sec = this._getSecurityAppData();
}
return data;
},

View File

@@ -202,11 +202,6 @@ Structure:
},
},
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

View File

@@ -666,25 +666,6 @@ function checkSystemSection(data) {
} 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) {

View File

@@ -183,18 +183,6 @@ var snapshotFormatters = {
}));
},
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", [

View File

@@ -370,53 +370,6 @@
<!-- - - - - - - - - - - - - - - - - - - - - -->
<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>

View File

@@ -25,13 +25,6 @@ This is likely the same like id.heading in crashes.dtd. -->
<!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">

View File

@@ -289,27 +289,6 @@ var dataProviders = {
});
},
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);

View File

@@ -89,9 +89,6 @@ if CONFIG['OS_ARCH'] == 'WINNT':
EXPORTS += [
'nsWindowsHelpers.h',
]
OS_LIBS += [
'wscapi',
]
EXPORTS.mozilla += [
'AutoRestore.h',

View File

@@ -14,12 +14,9 @@
#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"
@@ -238,105 +235,6 @@ nsresult GetCountryCode(nsAString& aCountryCode)
}
} // 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
@@ -794,34 +692,6 @@ nsSystemInfo::Init()
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)