mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Make new perf unit test pass
This commit is contained in:
@@ -165,7 +165,11 @@ var ReactDefaultPerf = {
|
||||
].totalTime = performanceNow() - start;
|
||||
return rv;
|
||||
} else if (fnName === '_mountImageIntoNode' ||
|
||||
moduleName === 'ReactDOMIDOperations') {
|
||||
moduleName === 'ReactBrowserEventEmitter' ||
|
||||
moduleName === 'ReactDOMIDOperations' ||
|
||||
moduleName === 'CSSPropertyOperations' ||
|
||||
moduleName === 'DOMChildrenOperations' ||
|
||||
moduleName === 'DOMPropertyOperations') {
|
||||
start = performanceNow();
|
||||
rv = func.apply(this, args);
|
||||
totalTime = performanceNow() - start;
|
||||
@@ -198,8 +202,12 @@ var ReactDefaultPerf = {
|
||||
});
|
||||
} else {
|
||||
// basic format
|
||||
var id = args[0];
|
||||
if (typeof id === 'object') {
|
||||
id = ReactMount.getID(args[0]);
|
||||
}
|
||||
ReactDefaultPerf._recordWrite(
|
||||
args[0],
|
||||
id,
|
||||
fnName,
|
||||
totalTime,
|
||||
Array.prototype.slice.call(args, 1)
|
||||
@@ -211,7 +219,7 @@ var ReactDefaultPerf = {
|
||||
fnName === 'updateComponent' || // TODO: receiveComponent()?
|
||||
fnName === '_renderValidatedComponent')) {
|
||||
|
||||
if (typeof this._currentElement.type === 'string') {
|
||||
if (this._currentElement.type === ReactMount.TopLevelWrapper) {
|
||||
return func.apply(this, args);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@ var DOM_OPERATION_TYPES = {
|
||||
REMOVE_NODE: 'remove',
|
||||
SET_MARKUP: 'set innerHTML',
|
||||
TEXT_CONTENT: 'set textContent',
|
||||
'updatePropertyByID': 'update attribute',
|
||||
'setValueForProperty': 'update attribute',
|
||||
'setValueForAttribute': 'update attribute',
|
||||
'deleteValueForProperty': 'remove attribute',
|
||||
'dangerouslyReplaceNodeWithMarkupByID': 'replace',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user