mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Change the createPromiseCapability
helper function into a PromiseCapability
class
This is not only slightly more compact, but it also simplifies the handling of the `settled` getter.
This commit is contained in:
parent
f9c2a8d437
commit
317abd6d07
24 changed files with 117 additions and 122 deletions
|
@ -18,7 +18,6 @@ import {
|
|||
AbortException,
|
||||
assert,
|
||||
CMapCompressionType,
|
||||
createPromiseCapability,
|
||||
FONT_IDENTITY_MATRIX,
|
||||
FormatError,
|
||||
IDENTITY_MATRIX,
|
||||
|
@ -26,6 +25,7 @@ import {
|
|||
isArrayEqual,
|
||||
normalizeUnicode,
|
||||
OPS,
|
||||
PromiseCapability,
|
||||
shadow,
|
||||
stringToPDFString,
|
||||
TextRenderingMode,
|
||||
|
@ -1253,7 +1253,7 @@ class PartialEvaluator {
|
|||
return this.fontCache.get(font.cacheKey);
|
||||
}
|
||||
|
||||
const fontCapability = createPromiseCapability();
|
||||
const fontCapability = new PromiseCapability();
|
||||
|
||||
let preEvaluatedFont;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue