Bug 1413944 - Don't try to deflate two-byte code unit in StringFromCharCode. r=jandem
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 02 Nov 2017 08:44:45 -0700
changeset 443353 f858fa7ff379d62b28fd71922207b25fcc2d951d
parent 443352 23c2f77d9377622b437273967aaf7057d313b29d
child 443354 eabded1b884a4e6d803abe1cfe0fef4df97a2044
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1413944
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1413944 - Don't try to deflate two-byte code unit in StringFromCharCode. r=jandem
js/src/jit/VMFunctions.cpp
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -464,17 +464,17 @@ CharCodeAt(JSContext* cx, HandleString s
 JSFlatString*
 StringFromCharCode(JSContext* cx, int32_t code)
 {
     char16_t c = char16_t(code);
 
     if (StaticStrings::hasUnit(c))
         return cx->staticStrings().getUnit(c);
 
-    return NewStringCopyN<CanGC>(cx, &c, 1);
+    return NewStringCopyNDontDeflate<CanGC>(cx, &c, 1);
 }
 
 JSString*
 StringFromCodePoint(JSContext* cx, int32_t codePoint)
 {
     RootedValue rval(cx, Int32Value(codePoint));
     if (!str_fromCodePoint_one_arg(cx, rval, &rval))
         return nullptr;