mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Merge pull request #15575 from Snuffleupagus/startCleanup-destroyed
Don't trigger worker-thread cleanup when destruction has already started
This commit is contained in:
commit
951564d697
1 changed files with 2 additions and 2 deletions
|
@ -2997,11 +2997,11 @@ class WorkerTransport {
|
|||
}
|
||||
|
||||
async startCleanup(keepLoadedFonts = false) {
|
||||
await this.messageHandler.sendWithPromise("Cleanup", null);
|
||||
|
||||
if (this.destroyed) {
|
||||
return; // No need to manually clean-up when destruction has started.
|
||||
}
|
||||
await this.messageHandler.sendWithPromise("Cleanup", null);
|
||||
|
||||
for (const page of this.#pageCache.values()) {
|
||||
const cleanupSuccessful = page.cleanup();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue