mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 06:08:24 +00:00
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:
parent
81b74ec1ed
commit
8329c10932
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user