mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
added missing restore
This commit is contained in:
parent
53511decbb
commit
6f74406a2c
1 changed files with 3 additions and 1 deletions
4
pdf.js
4
pdf.js
|
@ -4251,8 +4251,10 @@ var CanvasGraphics = (function() {
|
|||
var height = botRight[1] - topLeft[1];
|
||||
|
||||
// TODO: hack to avoid OOM, remove then pattern code is fixed
|
||||
if (Math.abs(width) > 8192 || Math.abs(height) > 8192)
|
||||
if (Math.abs(width) > 8192 || Math.abs(height) > 8192) {
|
||||
this.restore();
|
||||
return 'hotpink';
|
||||
}
|
||||
|
||||
var tmpCanvas = new this.ScratchCanvas(width, height);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue