Merge pull request #12965 from Snuffleupagus/ObjectLoader-errors
Request all data, rather than throwing, when encountering general errors in `ObjectLoader._walk` (issue 9462, PR 3289 follow-up)
This commit is contained in:
commit
8ccd9eac3d
@ -2556,7 +2556,11 @@ const ObjectLoader = (function () {
|
||||
currentNode = this.xref.fetch(currentNode);
|
||||
} catch (ex) {
|
||||
if (!(ex instanceof MissingDataException)) {
|
||||
throw ex;
|
||||
warn(`ObjectLoader._walk - requesting all data: "${ex}".`);
|
||||
this.refSet = null;
|
||||
|
||||
const { manager } = this.xref.stream;
|
||||
return manager.requestAllChunks();
|
||||
}
|
||||
nodesToRevisit.push(currentNode);
|
||||
pendingRequests.push({ begin: ex.begin, end: ex.end });
|
||||
|
1
test/pdfs/issue9462.pdf.link
Normal file
1
test/pdfs/issue9462.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/mozilla/pdf.js/files/1706865/cb7e7bd2362328f37fe97dc8dff151a3.pdf
|
@ -1127,6 +1127,15 @@
|
||||
"rounds": 1,
|
||||
"type": "load"
|
||||
},
|
||||
{ "id": "issue9462",
|
||||
"file": "pdfs/issue9462.pdf",
|
||||
"md5": "0a2895b0aa8a8ef730a20b4116cd996c",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"firstPage": 3,
|
||||
"lastPage": 3,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "f1040",
|
||||
"file": "pdfs/f1040.pdf",
|
||||
"md5": "7323b50c6d28d959b8b4b92c469b2469",
|
||||
|
Loading…
x
Reference in New Issue
Block a user