Check before overriding global.performance
Reviewed By: gaearon Differential Revision: D5218876 fbshipit-source-id: 7fbe9ca020774a0c53d8cbb64996680112828709
This commit is contained in:
Родитель
2984628357
Коммит
9d4cc7cce4
|
@ -100,8 +100,10 @@ if (!global.process.env.NODE_ENV) {
|
||||||
const Systrace = require('Systrace');
|
const Systrace = require('Systrace');
|
||||||
Systrace.setEnabled(global.__RCTProfileIsProfiling || false);
|
Systrace.setEnabled(global.__RCTProfileIsProfiling || false);
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
|
if (global.performance === undefined) {
|
||||||
global.performance = Systrace.getUserTimingPolyfill();
|
global.performance = Systrace.getUserTimingPolyfill();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set up console
|
// Set up console
|
||||||
const ExceptionsManager = require('ExceptionsManager');
|
const ExceptionsManager = require('ExceptionsManager');
|
||||||
|
|
Загрузка…
Ссылка в новой задаче