Bug 835785 - Don't show additional dump names in about:crashes. r=ted

This commit is contained in:
Georg Fritzsche 2013-01-29 14:20:06 +01:00
parent 6dc3226a04
commit 0c64a8dc41
2 changed files with 5 additions and 3 deletions

View File

@ -126,13 +126,15 @@ function populateReportList() {
pendingDir.append("pending");
if (pendingDir.exists() && pendingDir.isDirectory()) {
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
var entries = pendingDir.directoryEntries;
while (entries.hasMoreElements()) {
var file = entries.getNext().QueryInterface(Ci.nsIFile);
var leaf = file.leafName;
if (leaf.substr(-4) == ".dmp") {
var id = leaf.slice(0, -4);
if (leaf.substr(-4) == ".dmp" && uuidRegex.test(id)) {
var entry = {
id: leaf.slice(0, -4),
id: id,
date: file.lastModifiedTime,
pending: true
};

View File

@ -112,7 +112,7 @@ function addPendingCrashreport(crD, date, extra) {
.getService(Ci.nsIUUIDGenerator);
let uuid = uuidGenerator.generateUUID().toString();
// ditch the {}
uuid = uuid.substring(1, uuid.length - 2);
uuid = uuid.substring(1, uuid.length - 1);
let dumpfile = pendingdir.clone();
dumpfile.append(uuid + ".dmp");
writeDataToFile(dumpfile, "MDMP"); // that's the start of a valid minidump, anyway