Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 02d6be0a697de0b2e7a1c5868b2e6eebe50cfb8a
      
https://github.com/WebKit/WebKit/commit/02d6be0a697de0b2e7a1c5868b2e6eebe50cfb8a
  Author: Nikolas Zimmermann <[email protected]>
  Date:   2025-12-23 (Tue, 23 Dec 2025)

  Changed paths:
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/gtk/TestExpectations
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBackingStore.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.cpp
    M 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.h

  Log Message:
  -----------
  [GTK] imported/w3c/web-platform-tests/webrtc-stats/outbound-rtp.https.html is 
crashing in a Skia codepath
https://bugs.webkit.org/show_bug.cgi?id=304134

Reviewed by Adrian Perez de Castro.

When using Skia with GPU acceleration, NativeImages backed by textures must be
destroyed on the same thread where the Skia GrDirectContext was created, not on
the compositor thread. Releasing GPU resources on the wrong thread corrupts
Skia's GrResourceCache, leading to bounds check failures and crashes.

This patch ensures that in ~CoordinatedPlatformLayerBufferNativeImage(), if the
image is texture-backed, its destruction is dispatched to the main thread.

This also fixes crashes/assertions in:
- http/wpt/mediarecorder/MediaRecorder-webm-AV-audio-video-dataavailable.html
- http/wpt/mediastream/transfer-mediastreamtrack-to-worker.html
- 
imported/w3c/web-platform-tests/mst-content-hint/RTCRtpSendParameters-degradationEffect.html

Covered by existing tests.

* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/gtk/TestExpectations:
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBackingStore.cpp:
(WebCore::CoordinatedImageBackingStore::isSameNativeImage):
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.cpp:
(WebCore::CoordinatedPlatformLayerBufferNativeImage::~CoordinatedPlatformLayerBufferNativeImage):
* 
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedPlatformLayerBufferNativeImage.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to