Fix Use-after-free in AppShortcutManager destruction
The AppShortcutManager was not correctly unregistering as a ProfileAttributesStorage observer. The reason is that the AppShortcutManager is destroyed as part of the ProfileManager destruction. At this time, g_browser_process()->profile_manager() already returns nullptr. AppShortcutManager was happily skipping the unregistration in that case, because of test-related logic. I did not repro the crash and verified the fix, but this CL should solve the issue. Fixed: 1145906 Change-Id: I2ad4e574ad128ec920f94978446ae33c8dc73a46 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2520776Reviewed-by:ccameron <ccameron@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#825756}
Showing
Please register or sign in to comment