Merge pull request #11466 from Snuffleupagus/telemetry-generator-parsing

[Firefox] Slightly simplify how the generator is determined, when sending telemetry data from the viewer
This commit is contained in:
Tim van der Meij 2020-01-06 22:55:30 +01:00 committed by GitHub
commit 049a464372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1365,16 +1365,16 @@ const PDFViewerApplication = {
"fpdf",
];
if (info.Producer) {
KNOWN_GENERATORS.some(
function(generator, s, i) {
if (!generator.includes(s)) {
const producer = info.Producer.toLowerCase();
KNOWN_GENERATORS.some(function(generator) {
if (!producer.includes(generator)) {
return false;
}
generatorId = s.replace(/[ .\-]/g, "_");
generatorId = generator.replace(/[ .\-]/g, "_");
return true;
}.bind(null, info.Producer.toLowerCase())
);
});
}
const formType = !info.IsAcroFormPresent
? null
: info.IsXFAPresent