1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

Pass the /Info-strings as a Map to the src/core/writer.js code

We want to iterate through the data in the `computeMD5` function, and `Map`s have "nicer" support for that than generic objects.
(Somewhat recently `Map` performance was improved in Firefox, however this also isn't really performance sensitive code.)
This commit is contained in:
Jonas Jenwald 2025-04-04 13:36:13 +02:00
parent 0bde69c7bf
commit dad6febc39
3 changed files with 8 additions and 8 deletions

View file

@ -42,7 +42,7 @@ describe("Writer", function () {
infoRef: null,
encryptRef: null,
filename: "foo.pdf",
info: {},
infoMap: new Map(),
};
let data = await incrementalUpdate({
@ -111,7 +111,7 @@ describe("Writer", function () {
infoRef: null,
encryptRef: null,
filename: "foo.pdf",
info: {},
infoMap: new Map(),
};
let data = await incrementalUpdate({
@ -218,7 +218,7 @@ describe("Writer", function () {
infoRef: null,
encryptRef: null,
filename: "foo.pdf",
info: {},
infoMap: new Map(),
};
let data = await incrementalUpdate({
@ -272,7 +272,7 @@ describe("Writer", function () {
infoRef: null,
encryptRef: null,
filename: "foo.pdf",
info: {},
infoMap: new Map(),
};
let data = await incrementalUpdate({