PM: Work around UAF on destruction notification.
Avoid dispatching on a deleted SiteDataCacheImpl by using a WeakPtr for the delegate. This CL is a quick workaround for the larger problem, which is that the WebUI's SiteDataProviderImpl needs a teardown notification when the SiteDataCacheImpl is unregistered and/or deleted. This would allow the data provider to clean up before deletion of the data provider, which could then in turn assert that no site datums are held on its destruction. Bug: 1231933 Change-Id: Ia50464f0f3dee6ded38f1b1b84f00f0ebd79fc9a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3057116 Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org> Reviewed-by:Sébastien Marchand <sebmarchand@chromium.org> Reviewed-by:
Chris Hamilton <chrisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#906345}
Loading
Please register or sign in to comment