AppMenuButton: Fixed use-after-free opening menu for the second time.
Caused by r549433, which swapped the initialization order of the AppMenu and AppMenuModel. By constructing the AppMenuModel first, the old one was being destroyed, being outlived by its AppMenu (holding a raw pointer). Adds a reset(), ensuring the AppMenu is destroyed first. Bug: 831504 No-Try: true Change-Id: I3d155b11aa2490537fc6baa9fbbf2bdb057e8090 Reviewed-on: https://chromium-review.googlesource.com/1006739 Commit-Queue: Matt Giuca <mgiuca@chromium.org> Reviewed-by:Bret Sepulveda <bsep@chromium.org> Cr-Commit-Position: refs/heads/master@{#550022}
Showing
Please register or sign in to comment