revert D2707930

Reviewed By: fkgozali

Differential Revision: D2720828

fb-gh-sync-id: 53113fb33150b42a7b597a7dfd04bb9885def029
This commit is contained in:
Dan Witte
2015-12-03 16:04:34 -08:00
committed by facebook-github-bot-0
parent d1029d1b9d
commit 70f0dfc0e6
4 changed files with 32 additions and 95 deletions

View File

@@ -104,11 +104,11 @@ ReactNativeBaseComponent.Mixin = {
// no children - let's avoid calling out to the native bridge for a large
// portion of the children.
if (mountImages.length) {
var indexes = cachedIndexArray(mountImages.length);
// TODO: Pool these per platform view class. Reusing the `mountImages`
// array would likely be a jit deopt.
var createdTags = [];
for (var i = 0, l = mountImages.length; i < l; i++) {
for (var i = 0; i < mountImages.length; i++) {
var mountImage = mountImages[i];
var childTag = mountImage.tag;
var childID = mountImage.rootNodeID;
@@ -122,15 +122,8 @@ ReactNativeBaseComponent.Mixin = {
);
createdTags[i] = mountImage.tag;
}
// Fast path for iOS
if (UIManager.addChildren) {
UIManager.addChildren(containerTag, createdTags);
return;
}
var indexes = cachedIndexArray(mountImages.length);
UIManager.manageChildren(containerTag, null, null, createdTags, indexes, null);
UIManager
.manageChildren(containerTag, null, null, createdTags, indexes, null);
}
},