diff --git a/src/display/display_utils.js b/src/display/display_utils.js index 2cf65b23c..e59246342 100644 --- a/src/display/display_utils.js +++ b/src/display/display_utils.js @@ -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,