Merge pull request #12135 from Snuffleupagus/pdfManagerReady-loadDocument-promise
[src/core/worker.js] Remove a useless Promise handler from the `pdfManagerReady` function
This commit is contained in:
commit
bcbbd03f7b
@ -371,25 +371,21 @@ class WorkerMessageHandler {
|
|||||||
function pdfManagerReady() {
|
function pdfManagerReady() {
|
||||||
ensureNotTerminated();
|
ensureNotTerminated();
|
||||||
|
|
||||||
loadDocument(false).then(
|
loadDocument(false).then(onSuccess, function (reason) {
|
||||||
onSuccess,
|
ensureNotTerminated();
|
||||||
function loadFailure(ex) {
|
|
||||||
|
// Try again with recoveryMode == true
|
||||||
|
if (!(reason instanceof XRefParseException)) {
|
||||||
|
onFailure(reason);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pdfManager.requestLoadedStream();
|
||||||
|
pdfManager.onLoadedStream().then(function () {
|
||||||
ensureNotTerminated();
|
ensureNotTerminated();
|
||||||
|
|
||||||
// Try again with recoveryMode == true
|
loadDocument(true).then(onSuccess, onFailure);
|
||||||
if (!(ex instanceof XRefParseException)) {
|
});
|
||||||
onFailure(ex);
|
});
|
||||||
return;
|
|
||||||
}
|
|
||||||
pdfManager.requestLoadedStream();
|
|
||||||
pdfManager.onLoadedStream().then(function () {
|
|
||||||
ensureNotTerminated();
|
|
||||||
|
|
||||||
loadDocument(true).then(onSuccess, onFailure);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onFailure
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ensureNotTerminated();
|
ensureNotTerminated();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user