Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1f5ba2e6e96371c9ce59c471d635f15ad5a7535f
      
https://github.com/WebKit/WebKit/commit/1f5ba2e6e96371c9ce59c471d635f15ad5a7535f
  Author: Kimmo Kinnunen <kkinnu...@apple.com>
  Date:   2025-10-13 (Mon, 13 Oct 2025)

  Changed paths:
    A LayoutTests/svg/custom/pattern-memory-pressure-no-crash-expected.html
    A LayoutTests/svg/custom/pattern-memory-pressure-no-crash.html
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in
    M Source/WebKit/GPUProcess/graphics/RemoteResourceCache.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h
    M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  REGRESSION(300927@main) RELEASE_ASSERT(entry) in 
RemoteResourceCacheProxy::willDestroyNativeImage
https://bugs.webkit.org/show_bug.cgi?id=300508
rdar://162330287

Reviewed by Simon Fraser.

WebContent process would clear the WCP side RemoteResourceCacheProxy
image list in two cases: when it would destroy decoded image data
and upon memory pressure. RemoteNativeImageProxy were added to the same
list. This would cause RELEASE_ASSERT on destruction of
RemoteNativeImageProxy after these two events, because the instances
were unexpectedly removed.

Both of these cases are ineffective. The RemoteResourceCacheProxy and
GPUP do not own any additional memory for the cross-process images.
The data is held by the NativeImage instances themselves. Thus removing
the images from the cache should not be done, it only pessimizes the
behavior. In decode discard case, the decode cache discards the
NativeImage references and if the references are the only ones, the
data will be freed.

Test: svg/custom/pattern-memory-pressure-no-crash.html
* LayoutTests/svg/custom/pattern-memory-pressure-no-crash-expected.html: Added.
* LayoutTests/svg/custom/pattern-memory-pressure-no-crash.html: Added.
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::releaseNativeImages): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h:
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteResourceCache.cpp:
(WebKit::RemoteResourceCache::releaseAllResources):
(WebKit::RemoteResourceCache::releaseMemory):
(WebKit::RemoteResourceCache::releaseNativeImages): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::releaseNativeImages): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::RemoteResourceCacheProxy::releaseMemory):
(WebKit::RemoteResourceCacheProxy::releaseNativeImages):
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willDestroyDecodedDataForAllImages):
(WebKit::WebPage::remoteImagesCountForTesting const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to