Bug 1297792 - Add a diagnostic button to kill the GPU process from about:support r=dvander,mconley

This commit is contained in:
George Wright 2016-11-01 16:46:48 -04:00
parent 51a59d1d02
commit 8210cdaee4
2 changed files with 19 additions and 0 deletions

View File

@ -290,6 +290,24 @@ var snapshotFormatters = {
delete data.info;
}
if (AppConstants.NIGHTLY_BUILD) {
let windowUtils = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils);
let gpuProcessPid = windowUtils.gpuProcessPid;
if (gpuProcessPid != -1) {
let gpuProcessKillButton = $.new("button");
gpuProcessKillButton.addEventListener("click", function() {
windowUtils.terminateGPUProcess();
});
gpuProcessKillButton.textContent = strings.GetStringFromName("gpuProcessKillButton");
addRow("diagnostics", "GPUProcessPid", gpuProcessPid);
addRow("diagnostics", "GPUProcess", [gpuProcessKillButton]);
}
}
// graphics-failures-tbody tbody
if ("failures" in data) {
// If indices is there, it should be the same length as failures,

View File

@ -86,6 +86,7 @@ d3d11videoCrashGuard = D3D11 Video Decoder
d3d9videoCrashGuard = D3D9 Video Decoder
glcontextCrashGuard = OpenGL
resetOnNextRestart = Reset on Next Restart
gpuProcessKillButton = Terminate GPU Process
minLibVersions = Expected minimum version
loadedLibVersions = Version in use