chore: cherry-pick c5571653d932 from chromium #32354
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.
Quota: Use Threadsafe Pressure Callback.
Fixes UAF by removing use of raw ptr to StorageNotificationService.
Instead, the service's interface exposes a method to create a
thread-safe callback to pass to the quota manager instead.
This change also changes the parameter type for the call chain from
url::Origin to blink::StorageKey to match the type Quota is keyed on.
Bug:1275020
(cherry picked from commit e304c0373f9cc4a65d39d7094e4897627e83390e)
Change-Id: Icc696d22fa41324e7a6c056599db635bb5de6291
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3347939
Reviewed-by: Joshua Bell jsbell@chromium.org
Reviewed-by: Nasko Oskov nasko@chromium.org
Commit-Queue: Jarryd Goodman jarrydg@chromium.org
Cr-Original-Commit-Position: refs/heads/main@{#953375}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3360203
Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com
Owners-Override: Krishna Govind govind@chromium.org
Commit-Queue: Krishna Govind govind@chromium.org
Cr-Commit-Position: refs/branch-heads/4664@{#1352}
Cr-Branched-From: 24dc4ee75e01a29d390d43c9c264372a169273a7-refs/heads/main@{#929512}
Notes: Security: backported fix for https://crbug.com/1275020.