зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1422985. Send webrender prefs & label in webcompat reports (when enabled). r=Gijs
MozReview-Commit-ID: DtBE4JKp37F --HG-- extra : rebase_source : 5e5deec8b67aff53760f1aec08a4b58f7f6b5ff5
This commit is contained in:
Родитель
04cc210cfd
Коммит
bda39c3852
|
@ -6,6 +6,7 @@ this.EXPORTED_SYMBOLS = ["WebCompatReporter"];
|
|||
|
||||
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
|
@ -19,8 +20,16 @@ XPCOMUtils.defineLazyGetter(this, "wcStrings", function() {
|
|||
|
||||
// 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", 2);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(prefs, "gfx.webrender.enabled", "gfx.webrender.enabled", false);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(prefs, "image.mem.shared", "image.mem.shared", 2);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(prefs, "layout.css.servo.enabled", "layout.css.servo.enabled", false);
|
||||
|
||||
if (AppConstants.platform == "linux") {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(prefs, "layers.acceleration.force-enabled", "layers.acceleration.force-enabled", false);
|
||||
}
|
||||
|
||||
let WebCompatReporter = {
|
||||
get endpoint() {
|
||||
return Services.urlFormatter.formatURLPref(
|
||||
|
@ -91,6 +100,10 @@ let WebCompatReporter = {
|
|||
params.append("label", "type-stylo");
|
||||
}
|
||||
|
||||
if (prefs["gfx.webrender.all"] || prefs["gfx.webrender.enabled"]) {
|
||||
params.append("label", "type-webrender-enabled");
|
||||
}
|
||||
|
||||
let tab = gBrowser.loadOneTab(
|
||||
`${WebCompatReporter.endpoint}?${params}`,
|
||||
{inBackground: false, triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()});
|
||||
|
|
Загрузка…
Ссылка в новой задаче