GestureNav: Fix a bug in OverlaySceneLayer destruction
The crash at OverlaySceneLayer destructor comes apparently from ui::WindowAndroid being in the destroyed state while its ::RemoveObserver method is called. It makes OverlaySceneLayer destructor not the appropriate place to call it, since the destruction order of the objects are not clear. This CL changes the place where WindowAndroidObserver is added or deleted i.e. when WindowAndroid's compositor is attached or detached. WindowAndroid is guaranteed to be available when these observer event is invoked, so it's safe to do the operation. Bug: 1120832 Change-Id: Ib43c420f4d5af51fca4377e92d46a408d41e86f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371384Reviewed-by:Matthew Jones <mdjones@chromium.org> Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Cr-Commit-Position: refs/heads/master@{#801125}
Showing
Please register or sign in to comment