Merge pull request #9405 from Snuffleupagus/pr-9245-followup
Re-factor resetting of `StatTimer` instances to fix completely broken benchmarking (PR 9245 follow-up)
This commit is contained in:
commit
628e70fbb5
@ -1056,8 +1056,8 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
|
||||
}, this);
|
||||
this.objs.clear();
|
||||
this.annotationsPromise = null;
|
||||
if (resetStats) {
|
||||
this._stats.reset();
|
||||
if (resetStats && this._stats instanceof StatTimer) {
|
||||
this._stats = new StatTimer();
|
||||
}
|
||||
this.pendingCleanup = false;
|
||||
},
|
||||
|
@ -411,10 +411,6 @@ function isExternalLinkTargetSet() {
|
||||
class StatTimer {
|
||||
constructor(enable = true) {
|
||||
this.enabled = !!enable;
|
||||
this.reset();
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.started = Object.create(null);
|
||||
this.times = [];
|
||||
}
|
||||
@ -477,8 +473,6 @@ class DummyStatTimer {
|
||||
unreachable('Cannot initialize DummyStatTimer.');
|
||||
}
|
||||
|
||||
static reset() {}
|
||||
|
||||
static time(name) {}
|
||||
|
||||
static timeEnd(name) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user