[webkit-reviews] review granted: [Bug 199740] [WebGPU] Move error scopes out of GPUDevice for more portable error generation : [Attachment 373984] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 11 18:05:17 PDT 2019


Myles C. Maxfield <mmaxfield at apple.com> has granted Justin Fan
<justin_fan at apple.com>'s request for review:
Bug 199740: [WebGPU] Move error scopes out of GPUDevice for more portable error
generation
https://bugs.webkit.org/show_bug.cgi?id=199740

Attachment 373984: Patch

https://bugs.webkit.org/attachment.cgi?id=373984&action=review




--- Comment #2 from Myles C. Maxfield <mmaxfield at apple.com> ---
Comment on attachment 373984
  --> https://bugs.webkit.org/attachment.cgi?id=373984
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...


More information about the webkit-reviews mailing list