diff options
Diffstat (limited to 'node_modules/react-dom/lib/ReactPerf.js')
-rw-r--r-- | node_modules/react-dom/lib/ReactPerf.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/node_modules/react-dom/lib/ReactPerf.js b/node_modules/react-dom/lib/ReactPerf.js index a7e1201bc..891b9dc81 100644 --- a/node_modules/react-dom/lib/ReactPerf.js +++ b/node_modules/react-dom/lib/ReactPerf.js @@ -16,7 +16,7 @@ var _assign = require('object-assign'); var _extends = _assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var ReactDebugTool = require('./ReactDebugTool'); -var warning = require('fbjs/lib/warning'); +var lowPriorityWarning = require('./lowPriorityWarning'); var alreadyWarned = false; function roundFloat(val) { @@ -360,7 +360,7 @@ function printExclusive(flushHistory) { var renderCount = item.counts.render || 0; var renderDuration = item.durations.render || 0; return { - 'Component': key, + Component: key, 'Total time (ms)': roundFloat(totalDuration), 'Instance count': instanceCount, 'Total render time (ms)': roundFloat(renderDuration), @@ -428,8 +428,8 @@ function printOperations(flushHistory) { var table = stats.map(function (stat) { return { 'Owner > Node': stat.key, - 'Operation': stat.type, - 'Payload': typeof stat.payload === 'object' ? JSON.stringify(stat.payload) : stat.payload, + Operation: stat.type, + Payload: typeof stat.payload === 'object' ? JSON.stringify(stat.payload) : stat.payload, 'Flush index': stat.flushIndex, 'Owner Component ID': stat.ownerID, 'DOM Component ID': stat.instanceID @@ -440,14 +440,14 @@ function printOperations(flushHistory) { var warnedAboutPrintDOM = false; function printDOM(measurements) { - process.env.NODE_ENV !== 'production' ? warning(warnedAboutPrintDOM, '`ReactPerf.printDOM(...)` is deprecated. Use ' + '`ReactPerf.printOperations(...)` instead.') : void 0; + lowPriorityWarning(warnedAboutPrintDOM, '`ReactPerf.printDOM(...)` is deprecated. Use ' + '`ReactPerf.printOperations(...)` instead.'); warnedAboutPrintDOM = true; return printOperations(measurements); } var warnedAboutGetMeasurementsSummaryMap = false; function getMeasurementsSummaryMap(measurements) { - process.env.NODE_ENV !== 'production' ? warning(warnedAboutGetMeasurementsSummaryMap, '`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use ' + '`ReactPerf.getWasted(...)` instead.') : void 0; + lowPriorityWarning(warnedAboutGetMeasurementsSummaryMap, '`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use ' + '`ReactPerf.getWasted(...)` instead.'); warnedAboutGetMeasurementsSummaryMap = true; return getWasted(measurements); } |