mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-28 18:07:21 +02:00
Merge pull request #20503 from andriivitiv/Fix-Worker-was-terminated-error
Fix `Worker was terminated` error when loading is cancelled
This commit is contained in:
commit
58ac273f1f
@ -319,7 +319,9 @@ class WorkerMessageHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onFailure(ex) {
|
function onFailure(ex) {
|
||||||
ensureNotTerminated();
|
if (terminated) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ex instanceof PasswordException) {
|
if (ex instanceof PasswordException) {
|
||||||
const task = new WorkerTask(`PasswordException: response ${ex.code}`);
|
const task = new WorkerTask(`PasswordException: response ${ex.code}`);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user