Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 11e984bdb5d873d6eb3ac961238482c9c721ad11
      
https://github.com/WebKit/WebKit/commit/11e984bdb5d873d6eb3ac961238482c9c721ad11
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2024-01-06 (Sat, 06 Jan 2024)

  Changed paths:
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.h

  Log Message:
  -----------
  RemoteGPUProxy uses GPUProcessConnection in thread-unsafe manner
https://bugs.webkit.org/show_bug.cgi?id=267128
rdar://120539209

Reviewed by Mike Wyrzykowski.

GPUProcessConnection should not be stored in any member that might
be used in non-main threads. It is a main thread -only object and
as such useless in classes like RemoteGPUProxy.

Store the main GPUP IPC::Connection directly.
Listen to GPUP crashes via the RemoteGPUProxy stream connection,
similar to what RemoteGraphicsContextGLProxy and
RemoteRenderingBackendProxy do.

Make RemoteGPUProxy only ThreadSafeRefCounted, not
ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr. The weak ptrs
are not used when GPUProcessConnection::Client is not used.

* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.cpp:
(WebKit::RemoteGPUProxy::create):
(WebKit::RemoteGPUProxy::RemoteGPUProxy):
(WebKit::RemoteGPUProxy::initializeIPC):
(WebKit::RemoteGPUProxy::disconnectGpuProcessIfNeeded):
(WebKit::RemoteGPUProxy::didClose):
(WebKit::RemoteGPUProxy::abandonGPUProcess):
(WebKit::RemoteGPUProxy::gpuProcessConnectionDidClose): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/WebGPU/RemoteGPUProxy.h:
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createGPUForWebGPU const):
* Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.cpp:
(WebKit::WebWorkerClient::WebWorkerClient):
(WebKit::WebWorkerClient::clone):
(WebKit::WebWorkerClient::createGPUForWebGPU const):
* Source/WebKit/WebProcess/WebCoreSupport/WebWorkerClient.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to