mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Remove DummyStatTimer
since it's unused now
Since this isn't part of the API surface, removing it now that it's unused shouldn't cause any problems.
This commit is contained in:
parent
860da8b840
commit
9fc40f8b84
1 changed files with 1 additions and 24 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
import {
|
||||
assert, BaseException, CMapCompressionType, isString, removeNullCharacters,
|
||||
stringToBytes, unreachable, Util, warn
|
||||
stringToBytes, Util, warn
|
||||
} from '../shared/util';
|
||||
|
||||
const DEFAULT_LINK_REL = 'noopener noreferrer nofollow';
|
||||
|
@ -429,28 +429,6 @@ class StatTimer {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helps avoid having to initialize {StatTimer} instances, e.g. one for every
|
||||
* page, in cases where the collected stats are not actually being used.
|
||||
* This (dummy) class can thus, since all its methods are `static`, be directly
|
||||
* shared between multiple call-sites without the need to be initialized first.
|
||||
*
|
||||
* NOTE: This must implement the same interface as {StatTimer}.
|
||||
*/
|
||||
class DummyStatTimer {
|
||||
constructor() {
|
||||
unreachable('Cannot initialize DummyStatTimer.');
|
||||
}
|
||||
|
||||
static time(name) {}
|
||||
|
||||
static timeEnd(name) {}
|
||||
|
||||
static toString() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function isFetchSupported() {
|
||||
return (typeof fetch !== 'undefined' &&
|
||||
typeof Response !== 'undefined' && 'body' in Response.prototype &&
|
||||
|
@ -593,7 +571,6 @@ export {
|
|||
DOMCMapReaderFactory,
|
||||
DOMSVGFactory,
|
||||
StatTimer,
|
||||
DummyStatTimer,
|
||||
isFetchSupported,
|
||||
isValidFetchUrl,
|
||||
loadScript,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue