[Reporting] Fix a crash in ~ExtensionRequestObserver()
The DestroyProfileOnBrowserClose experiment (see go/destroy-profile-on-browser-close) changes profile teardown, and introduced a new crash. ExtensionRequestObservers should be destroyed before the Profile is destroyed, not during BrowserProcess teardown. Listen to OnProfileWillBeDestroyed() events for _all_ profiles, because they can get destroyed at any time. Previously, we only did this for some profiles. Bug: 88586, 1140492 Change-Id: I8657119ae36c763b6e2e515185f1d2f15586376c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485176 Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org> Reviewed-by:Owen Min <zmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#819062}
Showing
Please register or sign in to comment