Don't reset temporary XRef-entries during saving (PR 16392 follow-up)

*Please note:* I'm not aware of any bugs caused by this, however that might be more luck than anything else.

In PR 16392 the `incrementalUpdate` function, and all of its various helpers, were made asynchronous. However the call-site in `src/core/worker.js` wasn't updated, which means that we currently reset temporary XRef-entries while saving is ongoing.
This commit is contained in:
Jonas Jenwald 2023-07-20 15:36:08 +02:00
parent 0702663b7d
commit 88524bf9ae

View File

@ -661,7 +661,6 @@ class WorkerMessageHandler {
}; };
} }
try {
return incrementalUpdate({ return incrementalUpdate({
originalData: stream.bytes, originalData: stream.bytes,
xrefInfo: newXrefInfo, xrefInfo: newXrefInfo,
@ -674,10 +673,9 @@ class WorkerMessageHandler {
acroFormRef, acroFormRef,
acroForm, acroForm,
xfaData, xfaData,
}); }).finally(() => {
} finally {
xref.resetNewTemporaryRef(); xref.resetNewTemporaryRef();
} });
}); });
} }
); );