[api-minor] Allow specifying an extra-delay, in RenderTask.cancel, for worker-thread aborting of operatorList parsing

This is done to support upcoming viewer-changes, and in order to prevent third-party users from outright breaking things we'll simply ignore too large values.
This commit is contained in:
Jonas Jenwald 2022-12-14 12:34:16 +01:00
parent e182597cb1
commit 91524d1a60
3 changed files with 20 additions and 6 deletions

View file

@ -332,9 +332,10 @@ class PageViewport {
}
class RenderingCancelledException extends BaseException {
constructor(msg, type) {
constructor(msg, type, extraDelay = 0) {
super(msg, "RenderingCancelledException");
this.type = type;
this.extraDelay = extraDelay;
}
}