mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1801780 - Include more information about blocklist in about:support. r=jrmuizel
We used to provide links to the bug numbers but this was broken somewhere along the way. Now it is provided the failure IDs from which it can attempt to extract a bug number, as well as always display any failure ID and message whenever possible. Differential Revision: https://phabricator.services.mozilla.com/D162734
This commit is contained in:
parent
8b8b4e414f
commit
d664f47e78
@ -210,15 +210,15 @@ void FeatureState::ForEachStatusChange(
|
|||||||
aCallback("default", mDefault.mStatus, mDefault.MessageOrNull(),
|
aCallback("default", mDefault.mStatus, mDefault.MessageOrNull(),
|
||||||
mDefault.FailureId());
|
mDefault.FailureId());
|
||||||
if (mUser.IsInitialized()) {
|
if (mUser.IsInitialized()) {
|
||||||
aCallback("user", mUser.mStatus, mUser.Message(), mDefault.FailureId());
|
aCallback("user", mUser.mStatus, mUser.Message(), mUser.FailureId());
|
||||||
}
|
}
|
||||||
if (mEnvironment.IsInitialized()) {
|
if (mEnvironment.IsInitialized()) {
|
||||||
aCallback("env", mEnvironment.mStatus, mEnvironment.Message(),
|
aCallback("env", mEnvironment.mStatus, mEnvironment.Message(),
|
||||||
mDefault.FailureId());
|
mEnvironment.FailureId());
|
||||||
}
|
}
|
||||||
if (mRuntime.IsInitialized()) {
|
if (mRuntime.IsInitialized()) {
|
||||||
aCallback("runtime", mRuntime.mStatus, mRuntime.Message(),
|
aCallback("runtime", mRuntime.mStatus, mRuntime.Message(),
|
||||||
mDefault.FailureId());
|
mRuntime.FailureId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -801,39 +801,55 @@ var snapshotFormatters = {
|
|||||||
for (let feature of featureLog.features) {
|
for (let feature of featureLog.features) {
|
||||||
let trs = [];
|
let trs = [];
|
||||||
for (let entry of feature.log) {
|
for (let entry of feature.log) {
|
||||||
let contents;
|
let bugNumber;
|
||||||
if (!entry.hasOwnProperty("message")) {
|
if (entry.hasOwnProperty("failureId")) {
|
||||||
// This is a default entry.
|
|
||||||
contents = entry.status + " by " + entry.type;
|
|
||||||
} else if (entry.message.length && entry.message[0] == "#") {
|
|
||||||
// This is a failure ID. See nsIGfxInfo.idl.
|
// This is a failure ID. See nsIGfxInfo.idl.
|
||||||
let m = /#BLOCKLIST_FEATURE_FAILURE_BUG_(\d+)/.exec(entry.message);
|
let m = /BUG_(\d+)/.exec(entry.failureId);
|
||||||
if (m) {
|
if (m) {
|
||||||
let bugSpan = $.new("span");
|
bugNumber = m[1];
|
||||||
|
|
||||||
let bugHref = $.new("a");
|
|
||||||
bugHref.href =
|
|
||||||
"https://bugzilla.mozilla.org/show_bug.cgi?id=" + m[1];
|
|
||||||
bugHref.setAttribute("data-l10n-name", "bug-link");
|
|
||||||
bugSpan.append(bugHref);
|
|
||||||
document.l10n.setAttributes(bugSpan, "support-blocklisted-bug", {
|
|
||||||
bugNumber: m[1],
|
|
||||||
});
|
|
||||||
|
|
||||||
contents = [bugSpan];
|
|
||||||
} else {
|
|
||||||
let unknownFailure = $.new("span");
|
|
||||||
document.l10n.setAttributes(unknownFailure, "unknown-failure", {
|
|
||||||
failureCode: entry.message.substr(1),
|
|
||||||
});
|
|
||||||
contents = [unknownFailure];
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
contents =
|
|
||||||
entry.status + " by " + entry.type + ": " + entry.message;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trs.push($.new("tr", [$.new("td", contents)]));
|
let failureIdSpan = $.new("span", "");
|
||||||
|
if (bugNumber) {
|
||||||
|
let bugHref = $.new("a");
|
||||||
|
bugHref.href =
|
||||||
|
"https://bugzilla.mozilla.org/show_bug.cgi?id=" + bugNumber;
|
||||||
|
bugHref.setAttribute("data-l10n-name", "bug-link");
|
||||||
|
failureIdSpan.append(bugHref);
|
||||||
|
document.l10n.setAttributes(
|
||||||
|
failureIdSpan,
|
||||||
|
"support-blocklisted-bug",
|
||||||
|
{
|
||||||
|
bugNumber,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
} else if (
|
||||||
|
entry.hasOwnProperty("failureId") &&
|
||||||
|
entry.failureId.length
|
||||||
|
) {
|
||||||
|
document.l10n.setAttributes(failureIdSpan, "unknown-failure", {
|
||||||
|
failureCode: entry.failureId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let messageSpan = $.new("span", "");
|
||||||
|
if (entry.hasOwnProperty("message") && entry.message.length) {
|
||||||
|
messageSpan.innerText = entry.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
let typeCol = $.new("td", entry.type);
|
||||||
|
let statusCol = $.new("td", entry.status);
|
||||||
|
let messageCol = $.new("td", "");
|
||||||
|
let failureIdCol = $.new("td", "");
|
||||||
|
typeCol.style.width = "10%";
|
||||||
|
statusCol.style.width = "10%";
|
||||||
|
messageCol.style.width = "30%";
|
||||||
|
messageCol.appendChild(messageSpan);
|
||||||
|
failureIdCol.style.width = "50%";
|
||||||
|
failureIdCol.appendChild(failureIdSpan);
|
||||||
|
|
||||||
|
trs.push($.new("tr", [typeCol, statusCol, messageCol, failureIdCol]));
|
||||||
}
|
}
|
||||||
addRow("decisions", "#" + feature.name, [$.new("table", trs)]);
|
addRow("decisions", "#" + feature.name, [$.new("table", trs)]);
|
||||||
}
|
}
|
||||||
|
@ -1746,6 +1746,8 @@ bool GfxInfoBase::BuildFeatureStateLog(JSContext* aCx,
|
|||||||
if (!SetJSPropertyString(aCx, obj, "type", aType) ||
|
if (!SetJSPropertyString(aCx, obj, "type", aType) ||
|
||||||
!SetJSPropertyString(aCx, obj, "status",
|
!SetJSPropertyString(aCx, obj, "status",
|
||||||
FeatureStatusToString(aStatus)) ||
|
FeatureStatusToString(aStatus)) ||
|
||||||
|
(!aFailureId.IsEmpty() &&
|
||||||
|
!SetJSPropertyString(aCx, obj, "failureId", aFailureId.get())) ||
|
||||||
(aMessage && !SetJSPropertyString(aCx, obj, "message", aMessage))) {
|
(aMessage && !SetJSPropertyString(aCx, obj, "message", aMessage))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user