Explorar o código

check for Performance object capabilities

Alexander Rose %!s(int64=5) %!d(string=hai) anos
pai
achega
29b6a88343
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mol-task/util/user-timing.ts

+ 1 - 1
src/mol-task/util/user-timing.ts

@@ -7,7 +7,7 @@
 import { Task } from '../task'
 import { isProductionMode } from '../../mol-util/debug';
 
-const hasPerformance = typeof performance !== 'undefined'
+const hasPerformance = (typeof performance !== 'undefined') && performance.mark && performance.measure
 const timingEnabled = hasPerformance && !isProductionMode
 
 export namespace UserTiming {