This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
constructor(name) {
    this.name = name;
    this.terminated = false;
    this._capability = createPromiseCapability();
  }
  get finished() {
    return this._capability.promise;
  }
  finish() {
    this._capability.resolve();
  }
  terminate() {
    this.terminated = true;
  }
  ensureNotTerminated() {
    if (this.terminated) {
      throw new Error("Worker task was terminated");
    }
  }
}
class WorkerMessageHandler {