mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Detect startSurface race-conditions and warn silently
Summary: Crash in debug, log a warning and continue in production. Changelog: [Internal] Differential Revision: D26133167 fbshipit-source-id: 60279363a3e90d592e7ddbde188c13cda89c28c6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ef765d423c
commit
b0ec350568
+8
-1
@@ -147,7 +147,14 @@ public class SurfaceMountingManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rootView.getId() != View.NO_ID) {
|
||||
if (rootView.getId() == mSurfaceId) {
|
||||
ReactSoftException.logSoftException(
|
||||
TAG,
|
||||
new IllegalViewOperationException(
|
||||
"Race condition in addRootView detected. Trying to set an id of ["
|
||||
+ mSurfaceId
|
||||
+ "] on the RootView, but that id has already been set. "));
|
||||
} else if (rootView.getId() != View.NO_ID) {
|
||||
FLog.e(
|
||||
TAG,
|
||||
"Trying to add RootTag to RootView that already has a tag: existing tag: [%d] new tag: [%d]",
|
||||
|
||||
Reference in New Issue
Block a user