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;
|
mWasMeasured = true;
|
||||||
// Check if we were waiting for onMeasure to attach the root view.
|
// Check if we were waiting for onMeasure to attach the root view.
|
||||||
if (mReactInstanceManager != null && !mIsAttachedToInstance) {
|
if (mReactInstanceManager != null && !mIsAttachedToInstance) {
|
||||||
// Enqueue it to UIThread not to block onMeasure waiting for the catalyst instance creation.
|
attachToReactInstanceManager();
|
||||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
attachToReactInstanceManager();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
|
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
|
||||||
|
|
Loading…
Reference in New Issue