[webkit-reviews] review granted: [Bug 231986] Fix crash when calling setUsernameForLocalCredentialWithID : [Attachment 441819] Follow up patch to address comment

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 20 14:44:27 PDT 2021


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted j_pascoe at apple.com
<j_pascoe at apple.com>'s request for review:
Bug 231986: Fix crash when calling setUsernameForLocalCredentialWithID
https://bugs.webkit.org/show_bug.cgi?id=231986

Attachment 441819: Follow up patch to address comment

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




--- Comment #6 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 441819
  --> https://bugs.webkit.org/attachment.cgi?id=441819
Follow up patch to address comment

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

r=me once Apple Cocoa ports build.

> Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:354
> +    status = SecItemUpdate(bridge_cast(query.get()),
bridge_cast(updateParams));

For future reference, this:  bridge_cast(query.get())

Can also be written as this:  bridge_cast(query).get()

It doesn't really matter which way you do it now, though it will be more
efficient the second way once projects switch to ARC (since we'll be able to
tell ARC to just take over the ownership of the `id` object without
incrementing the ref count—but we'll have to call .leakRef() or .release()
instead of .get() in that specific case).

No need to change this patch to move the .get(), though.


More information about the webkit-reviews mailing list