[webkit-changes] [WebKit/WebKit] cdbf59: Protect image inside MemoryCache::destroyDecodedDa...

Chris Dumez noreply at github.com
Fri Jul 7 11:52:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cdbf599aeb5ffbc458b1f6958888d7675fdefb9f
      https://github.com/WebKit/WebKit/commit/cdbf599aeb5ffbc458b1f6958888d7675fdefb9f
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M Source/WebCore/loader/cache/MemoryCache.cpp

  Log Message:
  -----------
  Protect image inside MemoryCache::destroyDecodedDataForAllImages()
https://bugs.webkit.org/show_bug.cgi?id=258946
<rdar://111807064>

Reviewed by Simon Fraser.

Protect image inside MemoryCache::destroyDecodedDataForAllImages() before
calling destroyDecodedData() on it, to make sure the Image stays alive for the
duration of the function execution.

Also do more protecting in MemoryCache::forEachResource() for good measure.

This may explain the crashes at <rdar://111807064>.

* Source/WebCore/loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::destroyDecodedDataForAllImages):

Canonical link: https://commits.webkit.org/265857@main




More information about the webkit-changes mailing list