mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +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
|
@ -15,9 +15,9 @@
|
|||
|
||||
import {
|
||||
AbortException, assert, CMapCompressionType, createPromiseCapability,
|
||||
FONT_IDENTITY_MATRIX, FormatError, getLookupTableFactory, IDENTITY_MATRIX,
|
||||
info, isNum, isString, NativeImageDecoding, OPS, stringToPDFString,
|
||||
TextRenderingMode, UNSUPPORTED_FEATURES, Util, warn
|
||||
FONT_IDENTITY_MATRIX, FormatError, IDENTITY_MATRIX, info, isNum, isString,
|
||||
NativeImageDecoding, OPS, stringToPDFString, TextRenderingMode,
|
||||
UNSUPPORTED_FEATURES, Util, warn
|
||||
} from '../shared/util';
|
||||
import { CMapFactory, IdentityCMap } from './cmap';
|
||||
import { DecodeStream, Stream } from './stream';
|
||||
|
@ -42,6 +42,7 @@ import { Lexer, Parser } from './parser';
|
|||
import { bidi } from './bidi';
|
||||
import { ColorSpace } from './colorspace';
|
||||
import { getGlyphsUnicode } from './glyphlist';
|
||||
import { getLookupTableFactory } from './core_utils';
|
||||
import { getMetrics } from './metrics';
|
||||
import { isPDFFunction } from './function';
|
||||
import { JpegStream } from './jpeg_stream';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue