Make ShadowNodeRegistry thread safe

Reviewed By: achen1

Differential Revision: D7679621

fbshipit-source-id: 1003578edcf9107b736d876dac969f22f9e62b6d
This commit is contained in:
David Vacca authored and Facebook Github Bot committed 2018-04-19 10:48:50 -07:00
1 parent 3aa453d975
commit dc836780cb
2 files changed
+7 -4

No files matched your search

@@ -205,7 +205,12 @@ public class UIImplementation {
int heightMeasureSpec = rootView.getHeightMeasureSpec();
updateRootView(rootCSSNode, widthMeasureSpec, heightMeasureSpec);
mShadowNodeRegistry.addRootNode(rootCSSNode);
context.runOnNativeModulesQueueThread(new Runnable() {
@Override
public void run() {
mShadowNodeRegistry.addRootNode(rootCSSNode);
}
});
// register it within NativeViewHierarchyManager
mOperationsQueue.addRootView(tag, rootView, context);