1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #16551 from Snuffleupagus/page-destroyed-complete

Ensure that `cleanup` during rendering is actually ignored, to prevent a blank canvas
This commit is contained in:
Jonas Jenwald 2023-06-15 12:26:57 +02:00 committed by GitHub
commit 877884029d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -1524,7 +1524,7 @@ class PDFPageProxy {
optionalContentConfigPromise,
])
.then(([transparency, optionalContentConfig]) => {
if (this.#pendingCleanup) {
if (this.destroyed) {
complete();
return;
}
@ -1727,7 +1727,7 @@ class PDFPageProxy {
#tryCleanup(delayed = false) {
this.#abortDelayedCleanup();
if (!this.#pendingCleanup) {
if (!this.#pendingCleanup || this.destroyed) {
return false;
}
if (delayed) {