Revert "Need to trampoline to main to make contents check safe if nodes are loaded. (#2545)"

This reverts commit 11e07ff409.
This commit is contained in:
Garrett Moon
2016-11-06 18:09:29 -08:00
parent d7ba0a9c6d
commit 17bd3acdee

View File

@@ -1143,15 +1143,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
[self setCalculatedDisplayNodeLayout:_pendingLayoutTransition.pendingLayout];
[self _completeLayoutTransition:_pendingLayoutTransition];
}
// Trampoline to the main thread if necessary
if (_pendingLayoutTransition && _pendingLayoutTransition.isSynchronous == NO) {
[self _pendingLayoutTransitionDidComplete];
} else {
ASPerformBlockOnMainThread(^{
[self _pendingLayoutTransitionDidComplete];
});
}
[self _pendingLayoutTransitionDidComplete];
}
/*
@@ -1166,7 +1158,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
}
// Trampoline to the main thread if necessary
if (layoutTransition.isSynchronous == NO) {
if (ASDisplayNodeThreadIsMain() || layoutTransition.isSynchronous == NO) {
[layoutTransition commitTransition];
} else {
// Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded
@@ -1194,7 +1186,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
if (CGSizeEqualToSize(layoutSize, CGSizeZero)) {
return;
}
if (!_placeholderImage) {
_placeholderImage = [self placeholderImage];
}