Backed out changeset 42f5c08a4d86 (bug 1399985) on request from miketaylr

This commit is contained in:
Sebastian Hengst 2018-04-21 01:44:52 +03:00
Родитель b78a4e45de
Коммит b1e0f59114
1 изменённых файлов: 9 добавлений и 11 удалений

Просмотреть файл

@ -16,17 +16,15 @@ XPCOMUtils.defineLazyGetter(this, "wcStrings", function() {
"chrome://webcompat-reporter/locale/webcompat.properties");
});
// Gather values for interesting details we want to appear in reports.
let details = {};
XPCOMUtils.defineLazyPreferenceGetter(details, "gfx.webrender.all", "gfx.webrender.all", false);
XPCOMUtils.defineLazyPreferenceGetter(details, "gfx.webrender.blob-images", "gfx.webrender.blob-images", 1);
XPCOMUtils.defineLazyPreferenceGetter(details, "gfx.webrender.enabled", "gfx.webrender.enabled", false);
XPCOMUtils.defineLazyPreferenceGetter(details, "image.mem.shared", "image.mem.shared", 2);
details.buildID = Services.appinfo.appBuildID;
details.channel = AppConstants.MOZ_UPDATE_CHANNEL;
// Gather values for prefs we want to appear in reports.
let prefs = {};
XPCOMUtils.defineLazyPreferenceGetter(prefs, "gfx.webrender.all", "gfx.webrender.all", false);
XPCOMUtils.defineLazyPreferenceGetter(prefs, "gfx.webrender.blob-images", "gfx.webrender.blob-images", true);
XPCOMUtils.defineLazyPreferenceGetter(prefs, "gfx.webrender.enabled", "gfx.webrender.enabled", false);
XPCOMUtils.defineLazyPreferenceGetter(prefs, "image.mem.shared", "image.mem.shared", true);
if (AppConstants.platform == "linux") {
XPCOMUtils.defineLazyPreferenceGetter(details, "layers.acceleration.force-enabled", "layers.acceleration.force-enabled", false);
XPCOMUtils.defineLazyPreferenceGetter(prefs, "layers.acceleration.force-enabled", "layers.acceleration.force-enabled", false);
}
let WebCompatReporter = {
@ -93,9 +91,9 @@ let WebCompatReporter = {
let params = new URLSearchParams();
params.append("url", `${tabData.url}`);
params.append("src", "desktop-reporter");
params.append("details", JSON.stringify(details));
params.append("details", JSON.stringify(prefs));
if (details["gfx.webrender.all"] || details["gfx.webrender.enabled"]) {
if (prefs["gfx.webrender.all"] || prefs["gfx.webrender.enabled"]) {
params.append("label", "type-webrender-enabled");
}