From 725566cfeabe2347b3f17af1f95285f40d1d2c08 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 27 Nov 2019 13:42:07 +0100 Subject: [PATCH] Remove the `Number.isInteger` checks from `XRef.fetchUncompressed` (PR 8857 follow-up) Having ran the entire test-suite locally with these `Number.isInteger` checks removed, there wasn't a single test failure anywhere; see also PR 8857. Hence everything points to this being completely unnecessary now, and by removing this code there's thus fewer function calls being made in `XRef.fetchUncompressed`. --- src/core/obj.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/core/obj.js b/src/core/obj.js index 283ea9aba..42ae9cf00 100644 --- a/src/core/obj.js +++ b/src/core/obj.js @@ -1682,12 +1682,6 @@ var XRef = (function XRefClosure() { var obj2 = parser.getObj(); var obj3 = parser.getObj(); - if (!Number.isInteger(obj1)) { - obj1 = parseInt(obj1, 10); - } - if (!Number.isInteger(obj2)) { - obj2 = parseInt(obj2, 10); - } if (obj1 !== num || obj2 !== gen || !(obj3 instanceof Cmd)) { throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); }