[webkit-reviews] review granted: [Bug 186054] Avoid unnecessary String allocation in isPublicSuffix(const String&) : [Attachment 341494] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 29 10:49:21 PDT 2018


Sam Weinig <sam at webkit.org> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 186054: Avoid unnecessary String allocation in isPublicSuffix(const
String&)
https://bugs.webkit.org/show_bug.cgi?id=186054

Attachment 341494: Patch

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




--- Comment #2 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 341494
  --> https://bugs.webkit.org/attachment.cgi?id=341494
Patch

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

> Source/WebCore/platform/mac/PublicSuffixMac.mm:39
> -    NSString *host = decodeHostName(domain);
> +    NSString *host = decodeHostName(static_cast<NSString*>(domain));

I would add a comment explaining the cast.

Also, the NSString* should be NSString * (space between NSString and *).  And I
think we traditionally use C-style casts for objective-c casts.


More information about the webkit-reviews mailing list