chore: cherry-pick 1856470e25 and 9037876f53 from chromium #29787
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][LongTaskDetector] Remove container mutation during iteration
On LongTaskDetector, we call OnLongTaskDetected for all registered
observers. Some observers call LongTaskDetector::UnregisterObserver
in the callback, which is problematic because container mutation is
not allowed during iteration.
Copy the observer set to avoid the violation.
(cherry picked from commit 702f4d4ddb963cafb0d133972282dfc803510b75)
(cherry picked from commit e88c656a9fb4a7bb1c66ddcedae8049a448ebef4)
Bug: 1210487
Change-Id: Iccea748ac144def6884be8cf542cdc3572bed81a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909934
Reviewed-by: Deep Roy dproy@chromium.org
Reviewed-by: Nicolás Peña Moreno npm@chromium.org
Commit-Queue: Yutaka Hirano yhirano@chromium.org
Cr-Original-Original-Commit-Position: refs/heads/master@{#885033}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2939704
Auto-Submit: Yutaka Hirano yhirano@chromium.org
Owners-Override: Prudhvi Kumar Bommana pbommana@google.com
Reviewed-by: Prudhvi Kumar Bommana pbommana@google.com
Cr-Original-Commit-Position: refs/branch-heads/4472@{#1443}
Cr-Original-Branched-From: 3d60439cfb36485e76a1c5bb7f513d3721b20da1-refs/heads/master@{#870763}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2945787
Owners-Override: Victor-Gabriel Savu vsavu@google.com
Reviewed-by: Artem Sumaneev asumaneev@google.com
Commit-Queue: Victor-Gabriel Savu vsavu@google.com
Cr-Commit-Position: refs/branch-heads/4240@{#1669}
Cr-Branched-From: f297677702651916bbf65e59c0d4bbd4ce57d1ee-refs/heads/master@{#800218}
===================================
[M86-LTS] Reduce memory consumption on LongTaskObserver::DidProcessTask
https://crrev.com/c/2909934 fixed a security issue, but it introduced a
copy operation for each DidProcessTask for a long task. We see a memory
regression on the change, and this is an attempt to mitigate the
regression.
(cherry picked from commit 8097e73295a88e64d8318d982847a5e4f2bcc4d2)
(cherry picked from commit 7be6a34fe2f01af881bb074bc616bf5b6b5f7c31)
Bug: 1210487, 1211539
Change-Id: Ib9101e29d70fadb11b7967754e847bb5cc754feb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2915153
Reviewed-by: Benoit L lizeb@chromium.org
Commit-Queue: Yutaka Hirano yhirano@chromium.org
Cr-Original-Original-Commit-Position: refs/heads/master@{#886221}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2944320
Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com
Cr-Original-Commit-Position: refs/branch-heads/4472@{#1460}
Cr-Original-Branched-From: 3d60439cfb36485e76a1c5bb7f513d3721b20da1-refs/heads/master@{#870763}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2952502
Owners-Override: Victor-Gabriel Savu vsavu@google.com
Reviewed-by: Artem Sumaneev asumaneev@google.com
Commit-Queue: Victor-Gabriel Savu vsavu@google.com
Cr-Commit-Position: refs/branch-heads/4240@{#1670}
Cr-Branched-From: f297677702651916bbf65e59c0d4bbd4ce57d1ee-refs/heads/master@{#800218}
Notes: Security: backported fix for CVE-2021-30548.