RESOLVED FIXED 127336
Add protocolIsInHTTPFamily for strings and use it where appropriate
https://bugs.webkit.org/show_bug.cgi?id=127336
Summary Add protocolIsInHTTPFamily for strings and use it where appropriate
jochen
Reported 2014-01-21 00:19:39 PST
Add protocolIsInHTTPFamily for strings and use it where appropriate
Attachments
Patch (4.29 KB, patch)
2014-01-21 00:20 PST, jochen
no flags
Patch (4.57 KB, patch)
2014-01-22 11:14 PST, jochen
no flags
jochen
Comment 1 2014-01-21 00:20:16 PST
Alexey Proskuryakov
Comment 2 2014-01-21 09:54:38 PST
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.
Darin Adler
Comment 3 2014-01-21 18:30:12 PST
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.
jochen
Comment 4 2014-01-22 11:14:40 PST
jochen
Comment 5 2014-01-22 12:26:54 PST
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
WebKit Commit Bot
Comment 6 2014-01-22 14:13:08 PST
Comment on attachment 221879 [details] Patch Clearing flags on attachment: 221879 Committed r162555: <http://trac.webkit.org/changeset/162555>
WebKit Commit Bot
Comment 7 2014-01-22 14:13:10 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8 2014-01-23 07:45:27 PST
(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.
Note You need to log in before you can comment on or make changes to this bug.