From 934facdbc04a6988992611723cb3016ebd897b61 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:27:26 -0500 Subject: [PATCH] PDF.js version 1.0.379 --- bower.json | 2 +- build/pdf.combined.js | 13 ++++++++++--- build/pdf.js | 13 ++++++++++--- build/pdf.worker.js | 4 ++-- package.json | 2 +- 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index e183da92e..5b73ff738 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.377", + "version": "1.0.379", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index aa10bf564..efc941a0c 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.377'; -PDFJS.build = '5a2e511'; +PDFJS.version = '1.0.379'; +PDFJS.build = '11302f0'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -3903,7 +3903,14 @@ var CachedCanvases = (function CachedCanvasesClosure() { return canvasEntry; }, clear: function () { - cache = {}; + for (var id in cache) { + var canvasEntry = cache[id]; + // Zeroing the width and height causes Firefox to release graphics + // resources immediately, which can greatly reduce memory consumption. + canvasEntry.canvas.width = 0; + canvasEntry.canvas.height = 0; + delete cache[id]; + } } }; })(); diff --git a/build/pdf.js b/build/pdf.js index 0f40e5ebb..96d20600c 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.377'; -PDFJS.build = '5a2e511'; +PDFJS.version = '1.0.379'; +PDFJS.build = '11302f0'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -3951,7 +3951,14 @@ var CachedCanvases = (function CachedCanvasesClosure() { return canvasEntry; }, clear: function () { - cache = {}; + for (var id in cache) { + var canvasEntry = cache[id]; + // Zeroing the width and height causes Firefox to release graphics + // resources immediately, which can greatly reduce memory consumption. + canvasEntry.canvas.width = 0; + canvasEntry.canvas.height = 0; + delete cache[id]; + } } }; })(); diff --git a/build/pdf.worker.js b/build/pdf.worker.js index a48245465..8ef54b5d2 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.377'; -PDFJS.build = '5a2e511'; +PDFJS.version = '1.0.379'; +PDFJS.build = '11302f0'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/package.json b/package.json index eb97c9a70..ddcf6fed8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.377", + "version": "1.0.379", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",