Add buttons to about:support for reseting driver crash guards. (bug 1270894 part 2, r=milan)

This commit is contained in:
David Anderson 2016-05-09 13:16:03 -07:00
Родитель 8ac61fc54a
Коммит dc17cef0eb
6 изменённых файлов: 42 добавлений и 0 удалений

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

@ -479,6 +479,30 @@ var snapshotFormatters = {
$("graphics-workarounds-tbody").style.display = "none";
}
let crashGuards = data.crashGuards;
delete data.crashGuards;
if (crashGuards.length) {
for (let guard of crashGuards) {
let resetButton = $.new("button");
let onClickReset = (function (guard) {
// Note - need this wrapper until bug 449811 fixes |guard| scoping.
return function () {
Services.prefs.setIntPref(guard.prefName, 0);
resetButton.removeEventListener("click", onClickReset);
resetButton.disabled = true;
};
})(guard);
resetButton.textContent = strings.GetStringFromName("resetOnNextRestart");
resetButton.addEventListener("click", onClickReset);
addRow("crashguards", guard.type + "CrashGuard", [resetButton]);
}
} else {
$("graphics-crashguards-tbody").style.display = "none";
}
// Now that we're done, grab any remaining keys in data and drop them into
// the diagnostics section.
for (let key in data) {

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

@ -342,6 +342,14 @@
</tr>
</tbody>
<tbody id="graphics-crashguards-tbody">
<tr>
<th colspan="2" class="title-column">
&aboutSupport.graphicsCrashGuardsTitle;
</th>
</tr>
</tbody>
<tbody id="graphics-workarounds-tbody">
<tr>
<th colspan="2" class="title-column">

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

@ -119,4 +119,5 @@ variant of aboutSupport.showDir.label. -->
<!ENTITY aboutSupport.graphicsGPU1Title "GPU #1">
<!ENTITY aboutSupport.graphicsGPU2Title "GPU #2">
<!ENTITY aboutSupport.graphicsDecisionLogTitle "Decision Log">
<!ENTITY aboutSupport.graphicsCrashGuardsTitle "Crash Guard Disabled Features">
<!ENTITY aboutSupport.graphicsWorkaroundsTitle "Workarounds">

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

@ -79,6 +79,11 @@ bugLink = bug %1$S
# LOCALIZATION NOTE %1$S will be replaced with an arbitrary identifier
# string that can be searched on DXR/MXR or grepped in the source tree.
unknownFailure = Blocklisted; failure code %1$S
d3d11layersCrashGuard = D3D11 Compositor
d3d11videoCrashGuard = D3D11 Video Decoder
d3d9videoCrashGuard = D3D9 Video Decoder
glcontextCrashGuard = OpenGL
resetOnNextRestart = Reset on Next Restart
minLibVersions = Expected minimum version
loadedLibVersions = Version in use

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

@ -474,6 +474,7 @@ var dataProviders = {
}
data.featureLog = gfxInfo.getFeatureLog();
data.crashGuards = gfxInfo.getActiveCrashGuards();
completed();
},

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

@ -309,6 +309,9 @@ const SNAPSHOT_SCHEMA = {
featureLog: {
type: "object",
},
crashGuards: {
type: "array",
},
direct2DEnabledMessage: {
type: "array",
},