Replace some instances of implicit function.bind(this)
usage, in src/display/api.js
, with arrow functions instead
This commit is contained in:
parent
3dfce2d4ef
commit
ae0d9e8c2a
@ -1248,17 +1248,17 @@ class PDFPageProxy {
|
|||||||
*/
|
*/
|
||||||
_tryCleanup(resetStats = false) {
|
_tryCleanup(resetStats = false) {
|
||||||
if (!this.pendingCleanup ||
|
if (!this.pendingCleanup ||
|
||||||
Object.keys(this.intentStates).some(function(intent) {
|
Object.keys(this.intentStates).some((intent) => {
|
||||||
const intentState = this.intentStates[intent];
|
const intentState = this.intentStates[intent];
|
||||||
return (intentState.renderTasks.length !== 0 ||
|
return (intentState.renderTasks.length !== 0 ||
|
||||||
!intentState.operatorList.lastChunk);
|
!intentState.operatorList.lastChunk);
|
||||||
}, this)) {
|
})) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.keys(this.intentStates).forEach(function(intent) {
|
Object.keys(this.intentStates).forEach((intent) => {
|
||||||
delete this.intentStates[intent];
|
delete this.intentStates[intent];
|
||||||
}, this);
|
});
|
||||||
this.objs.clear();
|
this.objs.clear();
|
||||||
this.annotationsPromise = null;
|
this.annotationsPromise = null;
|
||||||
if (resetStats && this._stats instanceof StatTimer) {
|
if (resetStats && this._stats instanceof StatTimer) {
|
||||||
@ -1443,18 +1443,18 @@ class LoopbackPort {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this._defer) {
|
if (!this._defer) {
|
||||||
this._listeners.forEach(function(listener) {
|
this._listeners.forEach((listener) => {
|
||||||
listener.call(this, { data: obj, });
|
listener.call(this, { data: obj, });
|
||||||
}, this);
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const cloned = new WeakMap();
|
const cloned = new WeakMap();
|
||||||
const e = { data: cloneValue(obj), };
|
const e = { data: cloneValue(obj), };
|
||||||
this._deferred.then(() => {
|
this._deferred.then(() => {
|
||||||
this._listeners.forEach(function(listener) {
|
this._listeners.forEach((listener) => {
|
||||||
listener.call(this, e);
|
listener.call(this, e);
|
||||||
}, this);
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user