Bug 1368732 - Use StringReplaceString instead of String_replace in Intl. r=till, a=ritu FENNEC_54_0b14_BUILD1 FENNEC_54_0b14_RELEASE
authorTooru Fujisawa <arai_a@mac.com>
Thu, 01 Jun 2017 01:54:18 +0900
changeset 396487 97767088522e789dd04cf06b24478f052946d1c9
parent 396486 7fb96e3cbbb8a58102aa7da835bcf1f5f7200f69
child 396488 25be41ac56c53ce19abf4bc9282b2f1a34fc1d8a
child 396493 e9f109cd2cff0a47c4a0c637faa1521593eed033
push id1469
push userryanvm@gmail.com
push dateMon, 05 Jun 2017 19:58:33 +0000
treeherdermozilla-release@25be41ac56c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill, ritu
bugs1368732
milestone54.0
Bug 1368732 - Use StringReplaceString instead of String_replace in Intl. r=till, a=ritu
js/src/builtin/Intl.js
--- a/js/src/builtin/Intl.js
+++ b/js/src/builtin/Intl.js
@@ -105,17 +105,17 @@ function removeUnicodeExtensions(locale)
         pos = locale.length;
 
     var left = callFunction(String_substring, locale, 0, pos);
     var right = callFunction(String_substring, locale, pos);
 
     var extensions;
     var unicodeLocaleExtensionSequenceRE = getUnicodeLocaleExtensionSequenceRE();
     while ((extensions = regexp_exec_no_statics(unicodeLocaleExtensionSequenceRE, left)) !== null) {
-        left = callFunction(String_replace, left, extensions[0], "");
+        left = StringReplaceString(left, extensions[0], "");
         unicodeLocaleExtensionSequenceRE.lastIndex = 0;
     }
 
     var combined = left + right;
     assert(IsStructurallyValidLanguageTag(combined), "recombination produced an invalid language tag");
     assert(function() {
         var uindex = callFunction(std_String_indexOf, combined, "-u-");
         if (uindex < 0)