Don't re-add SurfaceSyncGroup to same parent
The scenario that caused the crash was the following: 1. SyncGroup C adds A so A's parent is now C 2. C adds B so B's parent is now C 3. New SyncGroup D adds A 4. A's parent is C so D needs to add C. C's old parent was null, new parent is now D. 5. D adds B 6. B's parent is C so D needs to add C. C's old parent was D, new parent is D. This causes the stack overflow. Ensure that the old parent and new parent aren't the same when trying to call newParent.addToSync(oldParent) Test: Device that was crashing no longer does. Test: SurfaceSyncGroupTest#testAddToSameParentNoCrash Fixes: 262662555 Change-Id: Ifce471068c01711260042aee954f1e7a523d386e
Loading
Please register or sign in to comment