WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
Patch
(1.96 KB, patch)
2018-05-29 10:52 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2018-05-29 10:19:04 PDT
Created
attachment 341494
[details]
Patch
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
Created
attachment 341499
[details]
Patch
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
<
rdar://problem/40622283
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug