mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Refactors buildImage to use Promise; don't draw bad images
This commit is contained in:
parent
347a38a129
commit
a00f854848
4 changed files with 42 additions and 35 deletions
|
@ -912,7 +912,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||
|
||||
// heuristics that will allow not to store large data
|
||||
var MAX_IMAGE_SIZE_TO_STORE = 8000000;
|
||||
if ('data' in imageData &&
|
||||
if (imageData && 'data' in imageData &&
|
||||
imageData.data.length > MAX_IMAGE_SIZE_TO_STORE) {
|
||||
pageProxy.cleanupAfterRender = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue