Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 129382fbd3298146f7fb0e1e4c539e683f07b73c
      
https://github.com/WebKit/WebKit/commit/129382fbd3298146f7fb0e1e4c539e683f07b73c
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2025-10-10 (Fri, 10 Oct 2025)

  Changed paths:
    M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
    M Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
    M Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
    M Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp

  Log Message:
  -----------
  WebKit::RemoteMediaResourceManager::loadFailed can be called outside its 
workqueue
https://bugs.webkit.org/show_bug.cgi?id=300381
rdar://162180067

Reviewed by Jer Noble.

A RemoteMediaResource should always be created as a WorkQueueMessageReceiver
and so we should only listen for those messages on the workqueue and not
from within the GPUConnectionToWebProcess.
The situation could have happened if the GPUP crashed and at the same time
the web process had sent a RemoteMediaResourceManager::loadFailed()
IPC message. It would have re-created the GPUP and the message would have
then be handled on the main thread.
We now detect if the GPUP crashed and if so, destroy pre-emptively all the
now stale RemoteMediaResources.

Move threading assertions to only be if a resource for the required identifier 
exists.

* Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp:
(WebKit::RemoteMediaResourceManager::responseReceived): replace `auto resource 
=` with `RefPtr resource =`
(WebKit::RemoteMediaResourceManager::redirectReceived): same
(WebKit::RemoteMediaResourceManager::dataSent): same
(WebKit::RemoteMediaResourceManager::dataReceived): same + add threading 
assertion.
(WebKit::RemoteMediaResourceManager::accessControlCheckFailed):
(WebKit::RemoteMediaResourceManager::loadFailed): Check if we are on the right 
workqueue, and dispatch a task to that queue if not.
(WebKit::RemoteMediaResourceManager::loadFinished): same

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



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

Reply via email to