[webkit-reviews] review granted: [Bug 235281] REGRESSION (r286603): rx::ProgramMtl::getSpecializedShader() leaks MTLFunctionConstantValues object due early return when an error occurs in ANGLE_TRY() macro : [Attachment 449288] Patch v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 16 15:43:35 PST 2022


Darin Adler <darin at apple.com> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 235281: REGRESSION (r286603): rx::ProgramMtl::getSpecializedShader() leaks
MTLFunctionConstantValues object due early return when an error occurs in
ANGLE_TRY() macro
https://bugs.webkit.org/show_bug.cgi?id=235281

Attachment 449288: Patch v1

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




--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 449288
  --> https://bugs.webkit.org/attachment.cgi?id=449288
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=449288&action=review

We can all agree that autorelease is the worst

> Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramMtl.mm:643
> +	       [funcConstants.get() setConstantValue:&emulateDiscard

I don’t think this .get() is needed, same for the 5 more below, unless
mtl::AutoObjCObj is different from RetainPtr in this respect.


More information about the webkit-reviews mailing list