mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Upstream the changes from: Bug 1339461 - Convert foo.indexOf(...) == -1 to foo.includes() and implement an eslint rule to enforce this
Yet another case where PDF.js code was modified in `mozilla-central` without the changes happening in the GitHub repo first; *sigh*. If we don't upstream at least the changes in `extensions/firefox/`, any future update of PDF.js in `mozilla-central` will be blocked. Please see: - https://bugzilla.mozilla.org/show_bug.cgi?id=1339461 - https://hg.mozilla.org/mozilla-central/rev/d5a5ad1dbbf2
This commit is contained in:
parent
9ac9ef8ef1
commit
712090eff8
9 changed files with 13 additions and 13 deletions
|
@ -1316,7 +1316,7 @@ var Font = (function FontClosure() {
|
|||
|
||||
for (let i = 0; i < numTables; i++) {
|
||||
let table = readTableEntry(font);
|
||||
if (VALID_TABLES.indexOf(table.tag) < 0) {
|
||||
if (!VALID_TABLES.includes(table.tag)) {
|
||||
continue; // skipping table if it's not a required or optional table
|
||||
}
|
||||
if (table.length === 0) {
|
||||
|
@ -2113,7 +2113,7 @@ var Font = (function FontClosure() {
|
|||
if (funcId in ttContext.functionsStackDeltas) {
|
||||
stack.length += ttContext.functionsStackDeltas[funcId];
|
||||
} else if (funcId in ttContext.functionsDefined &&
|
||||
functionsCalled.indexOf(funcId) < 0) {
|
||||
!functionsCalled.includes(funcId)) {
|
||||
callstack.push({ data, i, stackTop: stack.length - 1, });
|
||||
functionsCalled.push(funcId);
|
||||
pc = ttContext.functionsDefined[funcId];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue