Browse Source

PDF.js version 1.0.379

Yury Delendik 10 years ago
parent
commit
934facdbc0
5 changed files with 24 additions and 10 deletions
  1. 1 1
      bower.json
  2. 10 3
      build/pdf.combined.js
  3. 10 3
      build/pdf.js
  4. 2 2
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.0.377",
+  "version": "1.0.379",
   "keywords": [
     "Mozilla",
     "pdf",

+ 10 - 3
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];
+      }
     }
   };
 })();

+ 10 - 3
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];
+      }
     }
   };
 })();

+ 2 - 2
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

+ 1 - 1
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",