[webkit-reviews] review granted: [Bug 213530] [iOS] Open element actions sometimes result in a hover instead of a click : [Attachment 402595] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 24 12:48:05 PDT 2020


Darin Adler <darin at apple.com> has granted Andy Estes <aestes at apple.com>'s
request for review:
Bug 213530: [iOS] Open element actions sometimes result in a hover instead of a
click
https://bugs.webkit.org/show_bug.cgi?id=213530

Attachment 402595: Patch

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




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

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

> Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:815
> +    auto delegate = _delegate.getAutoreleased();

Why autoreleased? Autoreleased has unwanted performance cost. We need it when
the result is being used as a non-smart-pointer return value, and not in any
other cases I can think of.

Let's use RetainPtr here, not autorelease. Just "auto delegate =
_delegate.get()". This is analogous to what would be generated if we were using
ARC, in fact.

At some point, most calls to getAutoreleased elsewhere should also be replaced
with calls to get, with some minor refactoring possibly needed to work with
RetainPtr rather than a raw pointer.


More information about the webkit-reviews mailing list