From 57e7557235c4f47ec150a28fc62d9daaf4c2b9b5 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 19 Mar 2021 11:31:54 +0100 Subject: [PATCH] Actually reset the `PDFPageProxy._xfaPromise` property as intended (PR 13069 follow-up) (#13119) Similar to the existing `annotationsPromise` and `_jsActionsPromise` properties, the new `_xfaPromise` should obviously also be reset, since otherwise you might end up holding onto a lot of data for pages that are no longer active. (That caching wasn't present in the original version of PR 13069, which is why I didn't spot it until now.) --- src/display/api.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/display/api.js b/src/display/api.js index fdc1404a2..ada95d622 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -1468,6 +1468,7 @@ class PDFPageProxy { this.objs.clear(); this.annotationsPromise = null; this._jsActionsPromise = null; + this._xfaPromise = null; this.pendingCleanup = false; return Promise.all(waitOn); } @@ -1502,6 +1503,7 @@ class PDFPageProxy { this.objs.clear(); this.annotationsPromise = null; this._jsActionsPromise = null; + this._xfaPromise = null; if (resetStats && this._stats) { this._stats = new StatTimer(); }