[WebGPU] Move error scopes out of GPUDevice for more portable error generation
Created attachment 373984 [details] Patch
Comment on attachment 373984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373984&action=review > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:90 > + auto buffer = m_device->tryCreateBuffer(descriptor, false, m_errorGenerator.copyRef()); It's not obvious what "false" means here. Usually we use two-value enums to make this more readable. > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:189 > -void WebGPUDevice::pushErrorScope(GPUErrorFilter filter) const > +void WebGPUDevice::popErrorScope(ErrorPromise&& promise) wat > Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm:105 > + errorGenerator->generateError("", GPUErrorFilter::OutOfMemory); "generator" isn't really the best name. It doesn't actually generate errors...
Comment on attachment 373984 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373984&action=review >> Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:189 >> +void WebGPUDevice::popErrorScope(ErrorPromise&& promise) > > wat Moved implementation of pushErrorScope to header since it's trivial and we need to include GPUErrorGenerator anyway.
Created attachment 374030 [details] Patch
Comment on attachment 374030 [details] Patch Clearing flags on attachment: 374030 Committed r247397: <https://trac.webkit.org/changeset/247397>
All reviewed patches have been landed. Closing bug.
<rdar://problem/53025854>
Rolled out in https://trac.webkit.org/r247442 because it conflicted with the rollout of https://bugs.webkit.org/show_bug.cgi?id=199655, which broke the watchOS build.
Reopening.
Re-landed in https://trac.webkit.org/changeset/247500/webkit.