CHECK() if a WidgetDelegate would be deleted before the Widget it initialized is deleted.
WidgetDelegates must outlive their Widget. Crashes suggest situations where they may not, but can't pinpoint the actual client code. The crash is instead attributed to a UAF on the widget delegate either in a layout call (during an animation), or when Widget::OnNativeWidgetDestroyed() tries to delete the delegate (again). This CL adds a CHECK() in ~WidgetDelegate which should track down the misbehaving code. Bug: 825091, 814821, 808318 Change-Id: I9490ff1682ee236436edf075f7c237ccf910c44c Reviewed-on: https://chromium-review.googlesource.com/977244Reviewed-by:Scott Violet <sky@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#545873}
Showing
Please register or sign in to comment