mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Move IsLittleEndianCached
and IsEvalSupportedCached
to src/shared/util.js
Rather than duplicating the lookup and caching in multiple files, it seems easier to simply move all of this functionality into `src/shared/util.js` instead. This will also help avoid a bunch of ESLint errors once the `no-shadow` rule is eventually enabled.
This commit is contained in:
parent
6db8e085ee
commit
e4758beaaa
4 changed files with 16 additions and 26 deletions
|
@ -16,7 +16,7 @@
|
|||
import {
|
||||
assert,
|
||||
bytesToString,
|
||||
isEvalSupported,
|
||||
IsEvalSupportedCached,
|
||||
shadow,
|
||||
string32,
|
||||
unreachable,
|
||||
|
@ -337,12 +337,6 @@ if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
|||
};
|
||||
} // End of PDFJSDev.test('CHROME || GENERIC')
|
||||
|
||||
const IsEvalSupportedCached = {
|
||||
get value() {
|
||||
return shadow(this, "value", isEvalSupported());
|
||||
},
|
||||
};
|
||||
|
||||
class FontFaceObject {
|
||||
constructor(
|
||||
translatedData,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue