1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

Fixes content stream reset; terminating rendering when destroyed

This commit is contained in:
Yury Delendik 2012-04-16 16:46:26 -05:00
parent 32684fe324
commit b6edbb38c1
2 changed files with 12 additions and 4 deletions

View file

@ -233,6 +233,11 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
// Once the operatorList and fonts are loaded, do the actual rendering.
this.displayReadyPromise.then(
function pageDisplayReadyPromise() {
if (self.destroyed) {
complete();
return;
}
var gfx = new CanvasGraphics(params.canvasContext,
this.objs, params.textLayer);
try {
@ -351,8 +356,8 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
this.destroyed = true;
if (!this.renderInProgress) {
delete self.operatorList;
delete self.displayReadyPromise;
delete this.operatorList;
delete this.displayReadyPromise;
}
}
};