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;
|
||||
let cidToGidBytes;
|
||||
// 9.10.2
|
||||
@ -3554,21 +3554,19 @@ class PartialEvaluator {
|
||||
properties.baseEncodingName = baseEncodingName;
|
||||
properties.hasEncoding = !!baseEncodingName || differences.length > 0;
|
||||
properties.dict = dict;
|
||||
return toUnicodePromise
|
||||
.then(readToUnicode => {
|
||||
properties.toUnicode = readToUnicode;
|
||||
return this.buildToUnicode(properties);
|
||||
})
|
||||
.then(builtToUnicode => {
|
||||
properties.toUnicode = builtToUnicode;
|
||||
if (cidToGidBytes) {
|
||||
properties.cidToGidMap = this.readCidToGidMap(
|
||||
cidToGidBytes,
|
||||
builtToUnicode
|
||||
);
|
||||
}
|
||||
return properties;
|
||||
});
|
||||
|
||||
properties.toUnicode = await toUnicodePromise;
|
||||
|
||||
const builtToUnicode = await this.buildToUnicode(properties);
|
||||
properties.toUnicode = builtToUnicode;
|
||||
|
||||
if (cidToGidBytes) {
|
||||
properties.cidToGidMap = this.readCidToGidMap(
|
||||
cidToGidBytes,
|
||||
builtToUnicode
|
||||
);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user