mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Better errors capturing at the core and stop rendering on error.
This commit is contained in:
parent
4784863ef7
commit
8ba413e761
2 changed files with 58 additions and 41 deletions
|
@ -1716,11 +1716,20 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
|
||||
var page = this.pageCache[data.pageNum - 1];
|
||||
var intentState = page.intentStates[data.intent];
|
||||
|
||||
if (intentState.displayReadyCapability) {
|
||||
intentState.displayReadyCapability.reject(data.error);
|
||||
} else {
|
||||
error(data.error);
|
||||
}
|
||||
|
||||
if (intentState.operatorList) {
|
||||
// Mark operator list as complete.
|
||||
intentState.operatorList.lastChunk = true;
|
||||
for (var i = 0; i < intentState.renderTasks.length; i++) {
|
||||
intentState.renderTasks[i].operatorListChanged();
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
|
||||
messageHandler.on('UnsupportedFeature',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue