Stop mounting of Views when there is an exception in Native

Summary: This diff fixes exception handling for Mounting of views, as soon as there is an exception we stop the mounting of views because from that point the UI View tree is going to be inconsistent with the ReactShadow tree from C++. We also stop the mounting of views when the host is paused, this allows us to not keep mounting views

Reviewed By: shergin

Differential Revision: D10510334

fbshipit-source-id: b0d3eba580ff92d8b8400244ec9d7c266db42ff9
This commit is contained in:
David Vacca 2018-11-08 16:55:11 -08:00 коммит произвёл Facebook Github Bot
Родитель 81b74ec1ed
Коммит 8329c10932
1 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -1085,11 +1085,7 @@ public class ReactInstanceManager {
synchronized (mAttachedRootViews) {
for (ReactRootView rootView : mAttachedRootViews) {
if (rootView.getUIManagerType() != FABRIC) {
// All the views created in surfaces that are managed by Fabric, are removed and deleted
// by the Mounting Layer.
rootView.removeAllViews();
}
rootView.removeAllViews();
rootView.setId(View.NO_ID);
}
}