[M153] Fix UAF in SkCachedData::internalUnref
Original change's description:
> Fix UAF in SkCachedData::internalUnref
>
> Destroy AutoMutexWritable before calling delete this in
> SkCachedData::internalUnref to avoid unlocking the mutex after the
> object has been deleted.
>
> This was found while trying to enable the MiraclePtr rewrite
> that would protect "this" and cause deterministic termination.
> Fixed: 553345874
> Bug: 351867706
> Doc: https://bit.ly/miracleptr-skia
> Change-Id: I0a1d3aed3b3d41e4ed06505295a14028ff634788
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1340596
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
(cherry picked from commit d7c15613590bfe9f9a40e82542c2873766a2e558)
Bug: 553827434,553345874,351867706
Change-Id: I0a1d3aed3b3d41e4ed06505295a14028ff634788
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1348216
Auto-Submit: Chrome Cherry Picker <chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
1 file changed