Commit 805a9df0 authored by Nicolas Ouellet-Payeur's avatar Nicolas Ouellet-Payeur Committed by Commit Bot

Update PrefChangeRegistrar comment for DestroyProfileOnBrowserClose

With the DestroyProfileOnBrowserClose experiment, there may be a lot
more use-after-free bugs in ~PrefChangeRegistrar(), so add a comment
explaining this and giving a point-of-contact.

Bug: 1141952
Change-Id: Ie3887151d511fdd965763598d6fc33599cdf60dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2497989
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Commit-Queue: Dominic Battré <battre@chromium.org>
Reviewed-by: default avatarDominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820782}
parent dd42e1bf
......@@ -16,6 +16,10 @@ PrefChangeRegistrar::~PrefChangeRegistrar() {
// PrefChangeRegistrar might be subscribed to an OffTheRecordProfileImpl that
// has been destroyed. This should not happen any more but be warned.
// Feel free to contact battre@chromium.org in case this happens.
//
// This can also happen for non-OTR profiles, when the
// DestroyProfileOnBrowserClose flag is enabled. In that case, contact
// nicolaso@chromium.org.
RemoveAll();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment