Backed out changeset 586730aa1521 (bug 1289003)
authorTooru Fujisawa <arai_a@mac.com>
Fri, 02 Sep 2016 21:23:02 +0900
changeset 312422 f73442255a8308c776282d1133724899dc2c2a3f
parent 312421 e6cd5070f45402ae11b0d16dc42fcf2db7d557ef
child 312423 e1942a9b87424c15245bea5f86f7fcdc14c0df42
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1289003
milestone51.0a1
backs out586730aa152198ece8f016f3098ad2fbf055090b
Backed out changeset 586730aa1521 (bug 1289003)
js/src/vm/CharacterEncoding.cpp
--- a/js/src/vm/CharacterEncoding.cpp
+++ b/js/src/vm/CharacterEncoding.cpp
@@ -262,18 +262,16 @@ static const Latin1Char REPLACE_UTF8_LAT
 
 // If making changes to this algorithm, make sure to also update
 // LossyConvertUTF8toUTF16() in dom/wifi/WifiUtils.cpp
 template <InflateUTF8Action Action, typename CharT>
 static bool
 InflateUTF8StringToBuffer(JSContext* cx, const UTF8Chars src, CharT* dst, size_t* dstlenp,
                           JS::SmallestEncoding *smallestEncoding)
 {
-    if (Action != AssertNoInvalids)
-        *smallestEncoding = JS::SmallestEncoding::ASCII;
     auto RequireLatin1 = [&smallestEncoding]{
         *smallestEncoding = std::max(JS::SmallestEncoding::Latin1, *smallestEncoding);
     };
     auto RequireUTF16 = [&smallestEncoding]{
         *smallestEncoding = JS::SmallestEncoding::UTF16;
     };
 
     // Count how many code units need to be in the inflated string.