mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Prevent undefined error on null object when calling .destroy on a
document initialized with LocalPdfManager. Per @brendandahl's recommendation, moved the terminate function out of worker and into the PdfManager
This commit is contained in:
parent
1bcb3efd4a
commit
fb957f5c6e
2 changed files with 15 additions and 1 deletions
|
@ -368,7 +368,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
|
|||
});
|
||||
|
||||
handler.on('Terminate', function wphTerminate(data, promise) {
|
||||
pdfManager.streamManager.networkManager.abortAllRequests();
|
||||
pdfManager.terminate();
|
||||
promise.resolve();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue