Make ShadowNodeRegistry thread safe

Reviewed By: achen1

Differential Revision: D7679621

fbshipit-source-id: 1003578edcf9107b736d876dac969f22f9e62b6d
This commit is contained in:
David Vacca
2018-04-19 10:46:33 -07:00
committed by Facebook Github Bot
parent 3aa453d975
commit dc836780cb
2 changed files with 7 additions and 4 deletions

View File

@@ -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);