Summary: | Add protocolIsInHTTPFamily for strings and use it where appropriate | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | jochen | ||||||
Component: | New Bugs | Assignee: | jochen | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ap, commit-queue, darin, esprehn+autocc, gyuyoung.kim, mkwst | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
jochen
2014-01-21 00:19:39 PST
Created attachment 221726 [details]
Patch
Comment on attachment 221726 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=221726&action=review > Source/WebCore/platform/URL.cpp:1780 > + return protocolIs(url, "http") || protocolIs(url, "https"); This function seems like it could be made faster - we check for "http" prefix twice here. Comment on attachment 221726 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=221726&action=review >> Source/WebCore/platform/URL.cpp:1780 >> + return protocolIs(url, "http") || protocolIs(url, "https"); > > This function seems like it could be made faster - we check for "http" prefix twice here. I agree that we could make a tighter version. Created attachment 221879 [details]
Patch
ptal I considered changing URL::parse to use this method but it would require constructing a String from the const char* url. Not sure whether that's worth it Comment on attachment 221879 [details] Patch Clearing flags on attachment: 221879 Committed r162555: <http://trac.webkit.org/changeset/162555> All reviewed patches have been landed. Closing bug. (In reply to comment #5) > I considered changing URL::parse to use this method but it would require constructing a String from the const char* url. Not sure whether that's worth it It’s not. |