Add missing startWorkerTask calls in the "SaveDocument" handler
Without these calls we'll not actually wait for saving to complete when document destruction runs; compare with other `WorkerTask`-usage in this file. While I cannot imagine that this has caused any problems for library users, the code is however not technically correct as-is.
This commit is contained in:
parent
dd5618ebed
commit
ec1a05c104
@ -177,6 +177,7 @@ class WorkerMessageHandler {
|
||||
if (isPureXfa) {
|
||||
const task = new WorkerTask("loadXfaFonts");
|
||||
startWorkerTask(task);
|
||||
|
||||
await Promise.all([
|
||||
pdfManager
|
||||
.loadXfaFonts(handler, task)
|
||||
@ -590,6 +591,8 @@ class WorkerMessageHandler {
|
||||
newAnnotationPromises.push(
|
||||
pdfManager.getPage(pageIndex).then(page => {
|
||||
const task = new WorkerTask(`Save (editor): page ${pageIndex}`);
|
||||
startWorkerTask(task);
|
||||
|
||||
return page
|
||||
.saveNewAnnotations(
|
||||
handler,
|
||||
@ -637,6 +640,8 @@ class WorkerMessageHandler {
|
||||
promises.push(
|
||||
pdfManager.getPage(pageIndex).then(function (page) {
|
||||
const task = new WorkerTask(`Save: page ${pageIndex}`);
|
||||
startWorkerTask(task);
|
||||
|
||||
return page
|
||||
.save(handler, task, annotationStorage, changes)
|
||||
.finally(function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user