mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Skip execution of IntBufferBatchMountItem if surface has stopped
Summary: Fixes crashes in surface teardown / navigating away from a surface. Changelog: [Internal] Reviewed By: shergin Differential Revision: D24907216 fbshipit-source-id: 7bd7578c81687c7e64e8f70fecf8446bb333a1ed
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0bbab028d8
commit
68126ed470
@@ -968,6 +968,16 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure surface associated with this MountItem has been started, and not stopped.
|
||||
// TODO T68118357: clean up this logic and simplify this method overall
|
||||
if (mountItem instanceof IntBufferBatchMountItem) {
|
||||
IntBufferBatchMountItem batchMountItem = (IntBufferBatchMountItem) mountItem;
|
||||
if (!surfaceActiveForExecution(
|
||||
batchMountItem.getRootTag(), "dispatchMountItems IntBufferBatchMountItem")) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
mountItem.execute(mMountingManager);
|
||||
} catch (Throwable e) {
|
||||
// If there's an exception, we want to log diagnostics in prod and rethrow.
|
||||
|
||||
Reference in New Issue
Block a user