<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#c35">Comment # 35</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&#64;gmail.com" title="Sukolsak Sakshuwong &lt;sukolsak&#64;gmail.com&gt;"> <span class="fn">Sukolsak Sakshuwong</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=147602#c31">comment #31</a>)
<span class="quote">&gt; Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=270575&amp;action=diff" name="attach_270575" title="Patch">attachment 270575</a> <a href="attachment.cgi?id=270575&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=270575&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=270575&amp;action=review</a>
&gt; 
&gt; &gt; Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:3
&gt; &gt; + * Copyright (C) 2015 Sukolsak Sakshuwong (<a href="mailto:sukolsak&#64;gmail.com">sukolsak&#64;gmail.com</a>)
&gt; 
&gt; This year is 2016, not 2015.</span >

Fixed.

<span class="quote">&gt; &gt; Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:96
&gt; &gt; +    ASSERT(currency.length() == 3 &amp;&amp; currency.isAllSpecialCharacters&lt;isASCIIAlpha&gt;());
&gt; 
&gt; This assertion needs to be isASCIIUpper, not just isASCIIAlpha.
&gt; 
&gt; Normally we don’t use &amp;&amp; in assertions. Instead we write multiple
&gt; assertions. That way if one clause fires, we know which one it was. In this
&gt; case I think 4 separate assertions would be ideal so we know which one
&gt; failed. 2 would be OK, though.</span >

Done.

<span class="quote">&gt; Could also just make computeCurrencySortKey a function template instead of
&gt; writing it twice, except for the length check in the assertion, but there
&gt; are tricks for that too. For example, StringView(currency).length() should
&gt; work with both const String&amp; and const char*.</span >

We have to do ASSERT(isAllSpecialCharacters&lt;isASCIIUpper&gt;(currency, 3)) too. Is there a way to write it so that it works with both const String&amp; and const char*? 

<span class="quote">&gt; &gt; Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:240
&gt; &gt; +        currency = currency.upper();
&gt; 
&gt; This should be convertToASCIIUppercase, not upper, for better efficiency,
&gt; and because I am working hard to eliminate upper entirely except for
&gt; possibly one or two call sites.</span >

Done.</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>