mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Simplify initialization of static
class properties in the worker-thread
Now that we no longer depend on the old Babel version in SystemJS we can remove the `static get ...` work-arounds used to define constants, which leads to slightly more compact code.
This commit is contained in:
parent
d950b91c4e
commit
b0a1af306d
6 changed files with 16 additions and 58 deletions
|
@ -182,13 +182,9 @@ function incrementCachedImageMaskCount(data) {
|
|||
|
||||
// Trying to minimize Date.now() usage and check every 100 time.
|
||||
class TimeSlotManager {
|
||||
static get TIME_SLOT_DURATION_MS() {
|
||||
return shadow(this, "TIME_SLOT_DURATION_MS", 20);
|
||||
}
|
||||
static TIME_SLOT_DURATION_MS = 20;
|
||||
|
||||
static get CHECK_TIME_EVERY() {
|
||||
return shadow(this, "CHECK_TIME_EVERY", 100);
|
||||
}
|
||||
static CHECK_TIME_EVERY = 100;
|
||||
|
||||
constructor() {
|
||||
this.reset();
|
||||
|
@ -4838,9 +4834,7 @@ class EvaluatorPreprocessor {
|
|||
return shadow(this, "opMap", getOPMap());
|
||||
}
|
||||
|
||||
static get MAX_INVALID_PATH_OPS() {
|
||||
return shadow(this, "MAX_INVALID_PATH_OPS", 10);
|
||||
}
|
||||
static MAX_INVALID_PATH_OPS = 10;
|
||||
|
||||
constructor(stream, xref, stateManager = new StateManager()) {
|
||||
// TODO(mduan): pass array of knownCommands rather than this.opMap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue