Ver Fonte

check for Performance object capabilities

Alexander Rose há 5 anos atrás
pai
commit
29b6a88343
1 ficheiros alterados com 1 adições e 1 exclusões
  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 {