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:
parent
32684fe324
commit
b6edbb38c1
2 changed files with 12 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue