Bug 1516968 - Fix reading number of HTMX metrics. r=timvandermeij, a=RyanVM DEVEDITION_65_0b10_BUILD1 DEVEDITION_65_0b10_RELEASE FIREFOX_65_0b10_BUILD1 FIREFOX_65_0b10_RELEASE
authorBrendan Dahl <brendan.dahl@gmail.com>
Tue, 08 Jan 2019 10:58:44 -0500
changeset 509393 f0bb91ca0015991e22c06681f0cd959a390f3a42
parent 509392 e620bf5160a4685b2728d28d2bf0eaa1dbf9d786
child 509394 c881a99b0213c73872faa8e05a4a4e5a6413b8ea
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstimvandermeij, RyanVM
bugs1516968
milestone65.0
Bug 1516968 - Fix reading number of HTMX metrics. r=timvandermeij, a=RyanVM This is a backport of upstream commit: https://github.com/mozilla/pdf.js/commit/b81984f0cb8f4e1e1ac6878d74d7788c7a012ad1
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
@@ -28703,17 +28703,29 @@ var Font = function FontClosure() {
           if (metrics) {
             metrics.data = null;
           }
 
           return;
         }
 
         font.pos = (font.start ? font.start : 0) + header.offset;
-        font.pos += header.length - 2;
+        font.pos += 4;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 2;
+        font.pos += 8;
+        font.pos += 2;
         var numOfMetrics = font.getUint16();
 
         if (numOfMetrics > numGlyphs) {
           (0, _util.info)('The numOfMetrics (' + numOfMetrics + ') should not be ' + 'greater than the numGlyphs (' + numGlyphs + ')');
           numOfMetrics = numGlyphs;
           header.data[34] = (numOfMetrics & 0xff00) >> 8;
           header.data[35] = numOfMetrics & 0x00ff;
         }