[profiles] Fix use-after-free in ProfileManager when deleting profiles
ProfileManager::CleanUpDeletedProfiles() passes a raw base::Value pointer to ProfileCleanedUp() to be run later asynchronously. This is incorrect, as this raw pointer is pointing somewhere in the middle of a list in preferences. If the preferences change in the meantime, the pointer is invalid when it is used. The base::Value is passed by value rather than by unique_ptr, as this is now the recommended pattern. Fixed: 1164410 Change-Id: Ifeebe3fe9f49cc7f991c738b73b24bdb6b017168 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618339Reviewed-by:Jan Krcal <jkrcal@chromium.org> Commit-Queue: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#841848}
Showing
Please register or sign in to comment