Guard against result of getUIManager(...) being null
Summary: `getUIManagerX(...)` can return null now. Guard in a few places that use it or add comments. Changelog: [Internal] Reviewed By: alexeylang Differential Revision: D18351197 fbshipit-source-id: f077835468a75d1af24cfb4210989ba875ff9086
This commit is contained in:
Родитель
38b3cbcca9
Коммит
b7c2d4389a
|
@ -1080,6 +1080,10 @@ public class ReactInstanceManager {
|
|||
private void attachRootViewToInstance(final ReactRoot reactRoot) {
|
||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.attachRootViewToInstance()");
|
||||
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "attachRootViewToInstance");
|
||||
|
||||
// UIManager is technically Nullable here, but if we can't get a UIManager
|
||||
// at this point, something has probably gone horribly wrong so it's probably best
|
||||
// to throw a NullPointerException.
|
||||
UIManager uiManager =
|
||||
UIManagerHelper.getUIManager(mCurrentReactContext, reactRoot.getUIManagerType());
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче