Avoid use-after-move in Blob.h I noticed some interesting crashes [1] when working on an unrelated task. Gemini pointed out that it's probably not a good idea to hold onto vec's data pointer after we've moved it. While much of the time the new vector might take over the underlying pointer, this won't work if the vector implementation uses Small Vector Optimization (SVO). In that case vec.data() would be pointing to the stack and then after the move (which copies the stack data to the heap) the pointer is invalid. By grabbing the data and size from the moved vector, we'll avoid the invalid pointer. [1] https://logs.chromium.org/logs/skia/73de020340d43911/+/steps/dm/0/stdout Change-Id: I3548d2c414a43ad0388996466496e1644f3eef67 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/265755 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com>
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.