Convert the PartialEvaluator.extractDataStructures
method to be async
This commit is contained in:
parent
cf0797dfbd
commit
f5c01188dc
@ -3428,7 +3428,7 @@ class PartialEvaluator {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
extractDataStructures(dict, baseDict, properties) {
|
async extractDataStructures(dict, baseDict, properties) {
|
||||||
const xref = this.xref;
|
const xref = this.xref;
|
||||||
let cidToGidBytes;
|
let cidToGidBytes;
|
||||||
// 9.10.2
|
// 9.10.2
|
||||||
@ -3554,13 +3554,12 @@ class PartialEvaluator {
|
|||||||
properties.baseEncodingName = baseEncodingName;
|
properties.baseEncodingName = baseEncodingName;
|
||||||
properties.hasEncoding = !!baseEncodingName || differences.length > 0;
|
properties.hasEncoding = !!baseEncodingName || differences.length > 0;
|
||||||
properties.dict = dict;
|
properties.dict = dict;
|
||||||
return toUnicodePromise
|
|
||||||
.then(readToUnicode => {
|
properties.toUnicode = await toUnicodePromise;
|
||||||
properties.toUnicode = readToUnicode;
|
|
||||||
return this.buildToUnicode(properties);
|
const builtToUnicode = await this.buildToUnicode(properties);
|
||||||
})
|
|
||||||
.then(builtToUnicode => {
|
|
||||||
properties.toUnicode = builtToUnicode;
|
properties.toUnicode = builtToUnicode;
|
||||||
|
|
||||||
if (cidToGidBytes) {
|
if (cidToGidBytes) {
|
||||||
properties.cidToGidMap = this.readCidToGidMap(
|
properties.cidToGidMap = this.readCidToGidMap(
|
||||||
cidToGidBytes,
|
cidToGidBytes,
|
||||||
@ -3568,7 +3567,6 @@ class PartialEvaluator {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return properties;
|
return properties;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user