diff --git a/src/core/worker.js b/src/core/worker.js index 7b04b822698fc5..a606c74f3c51da 100644 --- a/src/core/worker.js +++ b/src/core/worker.js @@ -661,23 +661,21 @@ class WorkerMessageHandler { }; } - try { - return incrementalUpdate({ - originalData: stream.bytes, - xrefInfo: newXrefInfo, - newRefs, - xref, - hasXfa: !!xfa, - xfaDatasetsRef, - hasXfaDatasetsEntry, - needAppearances, - acroFormRef, - acroForm, - xfaData, - }); - } finally { + return incrementalUpdate({ + originalData: stream.bytes, + xrefInfo: newXrefInfo, + newRefs, + xref, + hasXfa: !!xfa, + xfaDatasetsRef, + hasXfaDatasetsEntry, + needAppearances, + acroFormRef, + acroForm, + xfaData, + }).finally(() => { xref.resetNewTemporaryRef(); - } + }); }); } );