mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Move worker-thread only functions from src/shared/util.js
and into a new src/core/core_utils.js
file
The `src/shared/util.js` file is being bundled into both the `pdf.js` and `pdf.worker.js` files, meaning that its code is by definition duplicated. Some main-thread only utility functions have already been moved to a separate `src/display/display_utils.js` file, and this patch simply extends that concept to utility functions which are used *only* on the worker-thread. Note in particular the `getInheritableProperty` function, which expects a `Dict` as input and thus *cannot* possibly ever be used on the main-thread.
This commit is contained in:
parent
a1f7517996
commit
db5dc14158
21 changed files with 359 additions and 308 deletions
|
@ -19,7 +19,7 @@ import {
|
|||
} from './stream';
|
||||
import {
|
||||
assert, bytesToString, FormatError, info, isNum, isSpace, isString,
|
||||
MissingDataException, StreamType, warn
|
||||
StreamType, warn
|
||||
} from '../shared/util';
|
||||
import {
|
||||
Cmd, Dict, EOF, isCmd, isDict, isEOF, isName, Name, Ref
|
||||
|
@ -28,6 +28,7 @@ import { CCITTFaxStream } from './ccitt_stream';
|
|||
import { Jbig2Stream } from './jbig2_stream';
|
||||
import { JpegStream } from './jpeg_stream';
|
||||
import { JpxStream } from './jpx_stream';
|
||||
import { MissingDataException } from './core_utils';
|
||||
|
||||
const MAX_LENGTH_TO_CACHE = 1000;
|
||||
const MAX_ADLER32_LENGTH = 5552;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue