RESOLVED FIXED 186054
Avoid unnecessary String allocation in isPublicSuffix(const String&)
https://bugs.webkit.org/show_bug.cgi?id=186054
Summary Avoid unnecessary String allocation in isPublicSuffix(const String&)
Chris Dumez
Reported 2018-05-29 10:15:02 PDT
Avoid unnecessary String allocation in isPublicSuffix(const String&): Sample Count, Samples %, CPU %, Symbol 1, 0.0%, 0.0%, WebCore::ResourceRequestBase::partitionName(WTF::String const&) (in WebCore) 1, 0.0%, 0.0%, WebCore::topPrivatelyControlledDomain(WTF::String const&) (in WebCore) 1, 0.0%, 0.0%, WebCore::isPublicSuffix(WTF::String const&) (in WebCore) 1, 0.0%, 0.0%, WTF::String::String(NSString*) (in JavaScriptCore) 1, 0.0%, 0.0%, DYLD-STUB$$objc_msgSend (in CoreFoundation)
Attachments
Patch (1.62 KB, patch)
2018-05-29 10:19 PDT, Chris Dumez
no flags
Patch (1.96 KB, patch)
2018-05-29 10:52 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2018-05-29 10:19:04 PDT
Sam Weinig
Comment 2 2018-05-29 10:49:21 PDT
Comment on attachment 341494 [details] 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.
Chris Dumez
Comment 3 2018-05-29 10:52:37 PDT
WebKit Commit Bot
Comment 4 2018-05-29 11:32:05 PDT
Comment on attachment 341499 [details] Patch Clearing flags on attachment: 341499 Committed r232268: <https://trac.webkit.org/changeset/232268>
WebKit Commit Bot
Comment 5 2018-05-29 11:32:07 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-05-29 11:33:25 PDT
Note You need to log in before you can comment on or make changes to this bug.