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:
Jonas Jenwald 2023-03-15 12:20:41 +01:00
parent d950b91c4e
commit b0a1af306d
6 changed files with 16 additions and 58 deletions

View file

@ -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