Description[Android] Properly guard selection updates in RWHVAndroid
One external invariant of RWHVAndroid is that if it has a valid attached
ContentViewCore, its TouchSelectionController will be non-null. However,
there are no guarantees that these lifetimes hold for methods *internal*
to RWHVAndroid. One such violation came when the frame had a non-zero
lock count when the attached ContentViewCore was changed; releasing the
surface lock caused a frame metadata update, in turn accessing the
TouchSelectionController that had already been reset.
As a workaround, guard against this and possible future violations by
always checking the controller for validity before using it.
BUG=419619
Committed: https://crrev.com/a9ee8a34791e66dc77341b69220868c5f90b3f50
Cr-Commit-Position: refs/heads/master@{#299792}
Patch Set 1 #Patch Set 2 : Proper ordering #Messages
Total messages: 7 (2 generated)
|