<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sukolsak@gmail.com" title="Sukolsak Sakshuwong <sukolsak@gmail.com>"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Move UCharIterator createIterator(StringView) to StringView.h"
href="https://bugs.webkit.org/show_bug.cgi?id=151917">bug 151917</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Summary</td>
<td>Implement UCharIterator StringView::createIterator()
</td>
<td>Move UCharIterator createIterator(StringView) to StringView.h
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Move UCharIterator createIterator(StringView) to StringView.h"
href="https://bugs.webkit.org/show_bug.cgi?id=151917#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Move UCharIterator createIterator(StringView) to StringView.h"
href="https://bugs.webkit.org/show_bug.cgi?id=151917">bug 151917</a>
from <span class="vcard"><a class="email" href="mailto:sukolsak@gmail.com" title="Sukolsak Sakshuwong <sukolsak@gmail.com>"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=151917#c2">comment #2</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=266722&action=diff" name="attach_266722" title="Patch">attachment 266722</a> <a href="attachment.cgi?id=266722&action=edit" title="Patch">[details]</a></span>
> 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.</span >
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?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>