[webkit-reviews] review granted: [Bug 237875] [WebGPU] [NSString stringWithCString:encoding:] fails on a null pointer : [Attachment 454661] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 15 08:37:31 PDT 2022


Kimmo Kinnunen <kkinnunen at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 237875: [WebGPU] [NSString stringWithCString:encoding:] fails on a null
pointer
https://bugs.webkit.org/show_bug.cgi?id=237875

Attachment 454661: Patch

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




--- Comment #2 from Kimmo Kinnunen <kkinnunen at apple.com> ---
Comment on attachment 454661
  --> https://bugs.webkit.org/attachment.cgi?id=454661
Patch

I think API type conversion should be done ASAP, e.g. a layer below. You
wouldn't write "const char*" in WebKit level code, so why WebGPU level code.
For me, overloaded ToAPI, FromAPI functions have been useful. In this case you
would have String FromAPI(const char*) or NSString* FromAPI(const char*)


More information about the webkit-reviews mailing list