Skip to content
Commit fd490a4d authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Chromium LUCI CQ
Browse files

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: default avatarSébastien Marchand <sebmarchand@chromium.org>
Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#906345}
parent 00cca709
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment