Make sure shadow node that we set JSResponder to mounts to a View

Summary: When setJSResponder() is called on a shadow node that doesn't mount to a View, React runtime will crash in NativeViewHierarchyManager because it will fail to find a corresponding View. To fix the issue, make sure we forceMountToView() before we call enqueueSetJSResponder().

Reviewed By: ahmedre

Differential Revision: D2779523
This commit is contained in:
Denis Koroskin
2015-12-22 11:41:07 -08:00
committed by Ahmed El-Helw
parent 12023b7953
commit f6b4dc68de
2 changed files with 23 additions and 0 deletions

View File

@@ -52,6 +52,10 @@ import com.facebook.react.uimanager.events.EventDispatcher;
mOperationsQueue = operationsQueue;
}
/* package */ FlatUIViewOperationQueue getOperationsQueue() {
return mOperationsQueue;
}
/**
* Given a root of the laid-out shadow node hierarchy, walks the tree and generates an array of
* DrawCommands that will then mount in UI thread to a root FlatViewGroup so that it can draw.