[webkit-changes] [WebKit/WebKit] 83826f: [WebGPU] Extra deref of SwapChainImpl::m_backing

mwyrzykowski noreply at github.com
Tue Jan 24 16:44:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 83826f3fef4076f2c5be36785b2799f351bf1c78
      https://github.com/WebKit/WebKit/commit/83826f3fef4076f2c5be36785b2799f351bf1c78
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSurfaceImpl.cpp
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainImpl.cpp

  Log Message:
  -----------
  [WebGPU] Extra deref of SwapChainImpl::m_backing
https://bugs.webkit.org/show_bug.cgi?id=250963
<rdar://104522929>

Reviewed by Myles C. Maxfield.

WebGPUSurfaceImpl and WebGPUSwapChainImpl called release in both
destroy and their destructor, resulting in a double release.

Fix this issue by setting the backing to null when the object is released.

* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSurfaceImpl.cpp:
(PAL::WebGPU::SurfaceImpl::destroy):
* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUSwapChainImpl.cpp:
(PAL::WebGPU::SwapChainImpl::~SwapChainImpl):
(PAL::WebGPU::SwapChainImpl::destroy):

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




More information about the webkit-changes mailing list