Don't enqueue another UI operation if we're already on the UI thread
Reviewed By: alexeylang Differential Revision: D5085488 fbshipit-source-id: 0613c1403a67d63ad06ce2db9950d902f1c6473a
This commit is contained in:
parent
2bf512b58c
commit
213ea30346
|
@ -105,13 +105,7 @@ public class ReactRootView extends SizeMonitoringFrameLayout implements RootView
|
|||
mWasMeasured = true;
|
||||
// Check if we were waiting for onMeasure to attach the root view.
|
||||
if (mReactInstanceManager != null && !mIsAttachedToInstance) {
|
||||
// Enqueue it to UIThread not to block onMeasure waiting for the catalyst instance creation.
|
||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
attachToReactInstanceManager();
|
||||
}
|
||||
});
|
||||
attachToReactInstanceManager();
|
||||
}
|
||||
} finally {
|
||||
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||
|
|
Loading…
Reference in New Issue