Change PartialEvaluator.setGState to an async method

Since this method calls `Dict.get` to fetch data, there could thus be `Error`s thrown in corrupt PDF documents when attempting to resolve an indirect object.
To ensure that this won't ever become a problem, we change the method to be `async` such that a rejected Promise would be returned and general OperatorList parsing won't break.
This commit is contained in:
Jonas Jenwald 2020-07-15 14:25:24 +02:00
parent 981ff41b5f
commit 03547b5633

View File

@ -832,7 +832,7 @@ class PartialEvaluator {
throw reason; throw reason;
} }
setGState({ async setGState({
resources, resources,
gState, gState,
operatorList, operatorList,