commit | 698f64de7d484f16cf2357e3b7a8b806462e3e3f | [log] [tgz] |
---|---|---|
author | Kyle Charbonneau <kylechar@google.com> | Fri Jul 11 13:39:01 2025 -0700 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 11 13:39:01 2025 -0700 |
tree | 51fbc042997277e6f92dc62e22d2e9b4913c8776 | |
parent | ebda341c7b3c3bcc62ef959239a7e280ec6962da [diff] |
Fix ApiObjectList::Destroy() race There is a race if ApiObjectList::Destroy() is going to destroy an object and another thread drops the last reference to the object at the same time. The other thread won't run DestroyImpl() but it will call `delete this` and delete the object resulting in a use-after-free. Keeping the ApiObjectList lock during DestroyImpl() calls won't work due to https://crbug.com/42240929. Have ApiObjectList::Destroy() acquire a reference to all of the objects. RefCounted::TryAddRef() is added to expose the try to add reference functionality that WeakRefData was already using. Bug: 396294899, 429112750 Change-Id: Ib0dcad57bccac87835c2c6d1cab3609cf0e53ee7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/251196 Commit-Queue: Kyle Charbonneau <kylechar@google.com> Reviewed-by: Brandon Jones <bajones@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h
that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h
version that Dawn implements.webgpu.h
.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.