Bug 161511 - Avoid unneeded string copy when parsing URL hosts
Summary: Avoid unneeded string copy when parsing URL hosts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-01 14:39 PDT by Alex Christensen
Modified: 2016-09-06 14:44 PDT (History)
0 users

See Also:


Attachments
Patch (5.82 KB, patch)
2016-09-01 14:41 PDT, Alex Christensen
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-09-01 14:39:36 PDT
Avoid unneeded string copy when parsing URL hosts
Comment 1 Alex Christensen 2016-09-01 14:41:19 PDT
Created attachment 287683 [details]
Patch
Comment 2 Alex Christensen 2016-09-01 14:52:50 PDT
https://trac.webkit.org/changeset/205318
Comment 3 Darin Adler 2016-09-03 08:38:16 PDT
Comment on attachment 287683 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=287683&action=review

> Source/WebCore/platform/URLParser.h:46
> +    void parseAuthority(StringView::CodePoints::Iterator&, const StringView::CodePoints::Iterator& end);
> +    void parseHost(StringView::CodePoints::Iterator&, const StringView::CodePoints::Iterator& end);

Why these pairs of arguments instead of a StringView?
Comment 4 Alex Christensen 2016-09-06 14:44:44 PDT
At the time I need to call these functions, all I have is StringView::CodePoints::Iterators.  I'm not sure how to make a StringView out of iterators.