chore: cherry-pick 6b84dc72351b from chromium #28808
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
M86-LTS: Ensure that BrowserContext is not used after it has been freed
Previously, it was possible for the BrowserContext to be destroyed
before ReportAnchorElementMetricsOnClick attempted to access it.
The fix uses the fact that NavigationPredictor extends
WebContentsObserver and checks that web_contents is still alive
before dereferencing BrowserContext. WebContents will always
outlive BrowserContext.
R=lukasza@chromium.org, ryansturm@chromium.org
(cherry picked from commit 7313a810ae0b1361cbe8453bc5496654dee24c76)
Bug: 1197904
Change-Id: Iee4f126e92670a84d57c7a4ec7d6f702fb975c7e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2821639
Reviewed-by: Ryan Sturm ryansturm@chromium.org
Reviewed-by: Łukasz Anforowicz lukasza@chromium.org
Commit-Queue: Łukasz Anforowicz lukasza@chromium.org
Cr-Original-Commit-Position: refs/heads/master@{#872021}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2838328
Owners-Override: Achuith Bhandarkar achuith@chromium.org
Auto-Submit: Achuith Bhandarkar achuith@chromium.org
Reviewed-by: Artem Sumaneev asumaneev@google.com
Commit-Queue: Achuith Bhandarkar achuith@chromium.org
Cr-Commit-Position: refs/branch-heads/4240@{#1613}
Cr-Branched-From: f297677702651916bbf65e59c0d4bbd4ce57d1ee-refs/heads/master@{#800218}
Notes: Security: backported fix for CVE-2021-21226.