Bug 161970

Summary: URLParser: Add fast path for hosts containing no non-ASCII or percent characters
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: dbates
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch dbates: review+

Alex Christensen
Reported 2016-09-14 09:46:58 PDT
URLParser: Add fast path for hosts containing no non-ASCII or percent characters
Attachments
Patch (4.69 KB, patch)
2016-09-14 09:48 PDT, Alex Christensen
dbates: review+
Alex Christensen
Comment 1 2016-09-14 09:48:59 PDT
Daniel Bates
Comment 2 2016-09-14 10:42:01 PDT
Comment on attachment 288826 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=288826&action=review > Source/WebCore/platform/URLParser.cpp:748 > + if (!isASCII(*c) || *c == '%') I suggest that we define a static inline helper function, say isPercentEncodedOrASCII(), that takes a character c and returns the result of evaluating "!isASCII(c) || c == '%'" instead of repeating the "!isASCII(*c) || *c == '%'" check throughout the code. > Source/WebCore/platform/URLParser.h:51 > + bool m_hostHasPercentOrNonASCII { false }; Maybe a better name for this variable would be m_hostHasPercentEncodedOrNonASCIICharacter?
Alex Christensen
Comment 3 2016-09-14 12:37:32 PDT
Note You need to log in before you can comment on or make changes to this bug.