mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Annotate crash reports during the graphics sanity test. (bug 1181375 part 2, r=mchang)
This commit is contained in:
parent
2c413a42e6
commit
a51532ac11
@ -74,6 +74,16 @@ function reportTestReason(val) {
|
||||
histogram.add(val);
|
||||
}
|
||||
|
||||
function annotateCrashReport(value) {
|
||||
try {
|
||||
// "1" if we're annotating the crash report, "" to remove the annotation.
|
||||
var crashReporter = Cc['@mozilla.org/toolkit/crash-reporter;1'].
|
||||
getService(Ci.nsICrashReporter);
|
||||
crashReporter.annotateCrashReport("GraphicsSanityTest", value ? "1" : "");
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
function takeWindowSnapshot(win, ctx) {
|
||||
// TODO: drawWindow reads back from the gpu's backbuffer, which won't catch issues with presenting
|
||||
// the front buffer via the window manager. Ideally we'd use an OS level API for reading back
|
||||
@ -207,6 +217,10 @@ let listener = {
|
||||
});
|
||||
|
||||
this.mm = null;
|
||||
|
||||
// Remove the annotation after we've cleaned everything up, to catch any
|
||||
// incidental crashes from having performed the sanity test.
|
||||
annotateCrashReport(false);
|
||||
}
|
||||
};
|
||||
|
||||
@ -267,6 +281,8 @@ SanityTest.prototype = {
|
||||
if (topic != "profile-after-change") return;
|
||||
if (!this.shouldRunTest()) return;
|
||||
|
||||
annotateCrashReport(true);
|
||||
|
||||
// Open a tiny window to render our test page, and notify us when it's loaded
|
||||
var sanityTest = Services.ww.openWindow(null,
|
||||
"chrome://gfxsanity/content/sanityparent.html",
|
||||
|
Loading…
Reference in New Issue
Block a user