Bug 1027130 - Prevent font error when no preferred cmap table is found. a=sledru
authorYury Delendik <ydelendik@mozilla.com>
Tue, 24 Jun 2014 16:46:55 -0500
changeset 207331 75cffcdac1397acc64a2b641b1a9533c09447ef1
parent 207330 fd1a2d08ca92f8d439b0862525f4207d131bd146
child 207332 85b450997e1f5a5350aa10c4446d924148b7bd64
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssledru
bugs1027130
milestone32.0a2
Bug 1027130 - Prevent font error when no preferred cmap table is found. a=sledru
browser/extensions/pdfjs/content/build/pdf.worker.js
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -21222,17 +21222,22 @@ var Font = (function FontClosure() {
           }
           if (canBreak) {
             break;
           }
         }
 
         if (!potentialTable) {
           warn('Could not find a preferred cmap table.');
-          return [];
+          return {
+            platformId: -1,
+            encodingId: -1,
+            mappings: [],
+            hasShortCmap: false
+          };
         }
 
         font.pos = start + potentialTable.offset;
         var format = font.getUint16();
         var length = font.getUint16();
         var language = font.getUint16();
 
         var hasShortCmap = false;