Skip to content

Commit

Permalink
Merge pull request #11463 from Snuffleupagus/bug-1606566
Browse files Browse the repository at this point in the history
[Firefox] Ensure that telemetry will be correctly recorded even when the PDF header is missing (bug 1606566)
  • Loading branch information
Rob--W authored Jan 1, 2020
2 parents 10716aa + bee941b commit b833f84
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,28 @@ const PDFViewerApplication = {
PDFJSDev.test("FIREFOX || MOZCENTRAL")
) {
// Telemetry labels must be C++ variable friendly.
const versionId = `v${info.PDFFormatVersion.replace(".", "_")}`;
let versionId = "other";
// Keep these in sync with mozilla central's Histograms.json.
const KNOWN_VERSIONS = [
"1.0",
"1.1",
"1.2",
"1.3",
"1.4",
"1.5",
"1.6",
"1.7",
"1.8",
"1.9",
"2.0",
"2.1",
"2.2",
"2.3",
];
if (KNOWN_VERSIONS.includes(info.PDFFormatVersion)) {
versionId = `v${info.PDFFormatVersion.replace(".", "_")}`;
}

let generatorId = "other";
// Keep these in sync with mozilla central's Histograms.json.
const KNOWN_GENERATORS = [
Expand Down

0 comments on commit b833f84

Please sign in to comment.