mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Remove the undocumented PDFJS.enableStats
option
In order to simplify things, the undocumented `enableStats` option was removed and `pdfBug` is now instead used to enabled general debugging *and* page request/rendering stats. Considering that in the default viewer the `stats` was only used when debugging was also enabled, this simplification (code wise) definitely seem worthwhile to me.
This commit is contained in:
parent
6bc3e1fb93
commit
e95c11a7f0
5 changed files with 5 additions and 11 deletions
|
@ -745,7 +745,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
|
|||
this.pageIndex = pageIndex;
|
||||
this.pageInfo = pageInfo;
|
||||
this.transport = transport;
|
||||
this._stats = (getDefaultSetting('enableStats') ?
|
||||
this._stats = (getDefaultSetting('pdfBug') ?
|
||||
new StatTimer() : DummyStatTimer);
|
||||
this.commonObjs = transport.commonObjs;
|
||||
this.objs = new PDFObjects();
|
||||
|
|
|
@ -359,8 +359,6 @@ function getDefaultSetting(id) {
|
|||
return globalSettings ? globalSettings.maxImageSize : -1;
|
||||
case 'isEvalSupported':
|
||||
return globalSettings ? globalSettings.isEvalSupported : true;
|
||||
case 'enableStats':
|
||||
return !!(globalSettings && globalSettings.enableStats);
|
||||
default:
|
||||
throw new Error('Unknown default setting: ' + id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue