[Webkit-unassigned] [Bug 151917] Move UCharIterator createIterator(StringView) to StringView.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 13 12:50:45 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151917

Sukolsak Sakshuwong <sukolsak at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Implement UCharIterator     |Move UCharIterator
                   |StringView::createIterator( |createIterator(StringView)
                   |)                           |to StringView.h

--- Comment #3 from Sukolsak Sakshuwong <sukolsak at gmail.com> ---
(In reply to comment #2)
> Comment on attachment 266722 [details]
> Patch
> 
> Why should this be a member function instead of just a function that takes a
> StringView?
> 
> It’s a little bit dangerous to create one of these UCharIterator objects for
> general use, because the iterator only good as long as the characters
> pointer to by the StringView are good. The functions we pass to the
> UCharIterator don’t do the CHECK_STRINGVIEW_LIFETIME checking.

Could you please advise me on how to go about this? Should I just change it to a function that takes a StringView while keeping it in StringView.h, or should I not do this in general? If the latter, is there a way to avoid duplicate code?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151213/d33ff6cc/attachment.html>


More information about the webkit-unassigned mailing list