<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [INTL] Implement Collator Compare Functions"
href="https://bugs.webkit.org/show_bug.cgi?id=147604">bug 147604</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;">Attachment #267384 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [INTL] Implement Collator Compare Functions"
href="https://bugs.webkit.org/show_bug.cgi?id=147604#c23">Comment # 23</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [INTL] Implement Collator Compare Functions"
href="https://bugs.webkit.org/show_bug.cgi?id=147604">bug 147604</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=267384&action=diff" name="attach_267384" title="Patch">attachment 267384</a> <a href="attachment.cgi?id=267384&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267384&action=review">https://bugs.webkit.org/attachment.cgi?id=267384&action=review</a>
<span class="quote">> Source/JavaScriptCore/runtime/IntlCollator.cpp:277
> + m_numeric = (result.get(ASCIILiteral("kn")) == "true");</span >
Doesn’t seem to be checking the type for boolean like the pseudocode says we should. Do we have tests covering that?
<span class="quote">> Source/JavaScriptCore/runtime/IntlCollator.cpp:336
> + UColAttributeValue strength;</span >
I suggest initializing this to UCOL_PRIMARY. Would fix a warning on Windows.
<span class="quote">> Source/JavaScriptCore/runtime/IntlCollator.cpp:396
> + UCharIterator iteratorX = createIterator(x);
> + UCharIterator iteratorY = createIterator(y);</span >
Looks like there is a linking problem on Windows.
Creating library C:/cygwin/home/buildbot/WebKit/WebKitBuild/Release/lib32/JavaScriptCore.lib and object C:/cygwin/home/buildbot/WebKit/WebKitBuild/Release/lib32/JavaScriptCore.exp
IntlCollator.obj : error LNK2019: unresolved external symbol "struct UCharIterator __cdecl WTF::createIterator(class WTF::StringView)" (?createIterator@WTF@@YA?AUUCharIterator@@VStringView@1@@Z) referenced in function "public: class JSC::JSValue __thiscall JSC::IntlCollator::compareStrings(class JSC::ExecState &,class WTF::StringView,class WTF::StringView)" (?compareStrings@IntlCollator@JSC@@QAE?AVJSValue@2@AAVExecState@2@VStringView@WTF@@1@Z) [C:\cygwin\home\buildbot\WebKit\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj]
I think this is because the declaration of createIterator in Collator.h needs WTF_EXPORT_PRIVATE.
<span class="quote">> Source/JavaScriptCore/runtime/IntlCollator.cpp:397
> + int result = ucol_strcollIter(m_collator, &iteratorX, &iteratorY, &status);</span >
auto is slightly better than int here
<span class="quote">> Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp:111
> + if (state->hadException())
> + return JSValue::encode(jsUndefined());</span >
We don’t need this code. There is no harm in returning the collator when there’s an exception; the return value will be ignored. It would be better to omit this.
<span class="quote">> Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp:133
> + if (state->hadException())
> + return JSValue::encode(jsUndefined());</span >
We don’t need this code. There is no harm in returning the collator when there’s an exception; the return value will be ignored. It would be better to omit this.
<span class="quote">> Source/JavaScriptCore/runtime/IntlObject.cpp:118
> + String locale(uloc_getDefault());</span >
We normally prefer the = syntax to the function call style syntax for code like this.</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>