[webkit-changes] [WebKit/WebKit] d08e8b: [WebGPU] Queue::onSubmittedWorkDone may crash if d...

mwyrzykowski noreply at github.com
Wed Jan 31 17:04:50 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d08e8b03938a1a1f0a04b716ffa64c63094f1919
      https://github.com/WebKit/WebKit/commit/d08e8b03938a1a1f0a04b716ffa64c63094f1919
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M Source/WebGPU/WebGPU/Device.h
    M Source/WebGPU/WebGPU/Queue.h
    M Source/WebGPU/WebGPU/Queue.mm

  Log Message:
  -----------
  [WebGPU] Queue::onSubmittedWorkDone may crash if device is destructed
https://bugs.webkit.org/show_bug.cgi?id=268474
<radar://122010484>

Reviewed by Dan Glastonbury.

Queue was holding a reference to a device, but its posssible
for the Device to get destroyed prior to the Queue so hold
a WeakPtr instead.

* Source/WebGPU/WebGPU/Device.h:
* Source/WebGPU/WebGPU/Queue.h:
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::Queue::submit):
(WebGPU::Queue::writeBuffer):
(WebGPU::Queue::device const):
(WebGPU::Queue::clearTexture):
(WebGPU::Queue::writeTexture):
(WebGPU::Queue::scheduleWork):

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




More information about the webkit-changes mailing list