mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +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
|
@ -18,7 +18,7 @@ import {
|
|||
IDENTITY_MATRIX,
|
||||
ImageKind,
|
||||
info,
|
||||
isLittleEndian,
|
||||
IsLittleEndianCached,
|
||||
isNum,
|
||||
OPS,
|
||||
shadow,
|
||||
|
@ -46,12 +46,6 @@ var MAX_SIZE_TO_COMPILE = 1000;
|
|||
|
||||
var FULL_CHUNK_HEIGHT = 16;
|
||||
|
||||
var IsLittleEndianCached = {
|
||||
get value() {
|
||||
return shadow(IsLittleEndianCached, "value", isLittleEndian());
|
||||
},
|
||||
};
|
||||
|
||||
function addContextCurrentTransform(ctx) {
|
||||
// If the context doesn't expose a `mozCurrentTransform`, add a JS based one.
|
||||
if (!ctx.mozCurrentTransform) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue