RCTSurface: Optional sync ShadowView/View registing
Summary: See the comment in code. If we on the main thread on registering time, we can/will break sequentiality of registering and mounting processes doing registration asynchronously. We need this to make sync mouting eventually possible. Reviewed By: fkgozali Differential Revision: D7014176 fbshipit-source-id: 110ad5e5d86e3422eac15c3b1bdb29ae04acd7e6
This commit is contained in:
parent
8c036ce090
commit
b90c1cf6c3
|
@ -321,7 +321,9 @@
|
||||||
|
|
||||||
RCTUIManager *uiManager = batchedBridge.uiManager;
|
RCTUIManager *uiManager = batchedBridge.uiManager;
|
||||||
|
|
||||||
RCTExecuteOnUIManagerQueue(^{
|
// If we are on the main queue now, we have to proceed synchronously.
|
||||||
|
// Otherwise, we cannot perform synchronous waiting for some stages later.
|
||||||
|
(RCTIsMainQueue() ? RCTUnsafeExecuteOnUIManagerQueueSync : RCTExecuteOnUIManagerQueue)(^{
|
||||||
[uiManager registerRootViewTag:self->_rootViewTag];
|
[uiManager registerRootViewTag:self->_rootViewTag];
|
||||||
|
|
||||||
RCTSurfaceRootShadowView *rootShadowView =
|
RCTSurfaceRootShadowView *rootShadowView =
|
||||||
|
|
Loading…
Reference in New Issue