<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [INTL] Implement Intl.NumberFormat.prototype.resolvedOptions ()"
href="https://bugs.webkit.org/show_bug.cgi?id=147602#c30">Comment # 30</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [INTL] Implement Intl.NumberFormat.prototype.resolvedOptions ()"
href="https://bugs.webkit.org/show_bug.cgi?id=147602">bug 147602</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=147602#c28">comment #28</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=270532&action=diff" name="attach_270532" title="Patch">attachment 270532</a> <a href="attachment.cgi?id=270532&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=270532&action=review">https://bugs.webkit.org/attachment.cgi?id=270532&action=review</a>
>
> > Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:103
> > + return (currency[0] << 16) + (currency[1] << 8) + currency[2];
>
> This will do the wrong thing if any characters are in the range 0x80-0xFF on
> platforms where char is signed. Should we assert the three characters are
> all ASCII?</span >
Done. Use isASCIIAlpha (as opposed to isASCII) to be consistent with the spec.
<span class="quote">> > Source/JavaScriptCore/runtime/IntlObject.cpp:241
> > + if (!(doubleValue >= static_cast<double>(minimum) && doubleValue <= static_cast<double>(maximum))) {
>
> Are these static_cast necessary? Doesn’t the unsigned automatically get
> promoted to a double without explicit conversion?</span >
Removed static_cast.
<span class="quote">> > Source/JavaScriptCore/runtime/IntlObject.cpp:242
> > + state.vm().throwException(&state, createRangeError(&state, property.publicName() + ASCIILiteral(" is out of range")));
>
> I don’t think you need the ASCIILiteral here, and in fact I think that using
> it makes the code slightly less efficient, causing it to allocate an
> additional temporary string.</span >
Done. Need to add "*" in front of property.publicName().</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>