Commit a9007a1e authored by Chris Harrelson's avatar Chris Harrelson Committed by Commit Bot

Fix use-after-free in ResizeObservation.

The WeakMember element_ could be garbage collected and needs
to be null-checked.

There is no test because it's unclear to me how to do so simply.
The reproducing clusterfuzz bug used a specially instrumented Chrome
with a script-exposed gc() method.

Bug: 1016218

Change-Id: Ibf8da7c8b68dab5cbeeb9f3b12a434944c5fa91a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1892060Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711279}
parent cc2101de
...@@ -26,8 +26,8 @@ bool ResizeObservation::ObservationSizeOutOfSync() { ...@@ -26,8 +26,8 @@ bool ResizeObservation::ObservationSizeOutOfSync() {
return false; return false;
// Skip resize observations on locked elements. // Skip resize observations on locked elements.
if (UNLIKELY( if (UNLIKELY(target_ && DisplayLockUtilities::IsInLockedSubtreeCrossingFrames(
DisplayLockUtilities::IsInLockedSubtreeCrossingFrames(*target_))) { *target_))) {
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment