Bug 1019585: Fix compilation with ggc, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Thu, 26 Jun 2014 10:59:13 +0200
changeset 191012 8b7ede108fafd2ff1bd0a0e82803b5a853ad5870
parent 191011 e599c809f50dfbd93bebe2fbb28edd025a8c8e9b
child 191013 e4c57f58a0adb749b6f6b1a7b308be85ce9cdcd6
push id8417
push userryanvm@gmail.com
push dateThu, 26 Jun 2014 21:15:47 +0000
treeherderb2g-inbound@3bef42144aab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1019585
milestone33.0a1
Bug 1019585: Fix compilation with ggc, r=jandem
js/src/jsstr.cpp
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -3097,19 +3097,19 @@ AppendSubstrings(JSContext *cx, Handle<J
 {
     JS_ASSERT(rangesLen);
 
     /* For single substrings, construct a dependent string. */
     if (rangesLen == 1)
         return NewDependentString(cx, flatStr, ranges[0].start, ranges[0].length);
 
     bool isLatin1 = flatStr->hasLatin1Chars();
-    uint32_t fatInlineMaxLength = isLatin1
-                                  ? JSFatInlineString::MAX_LENGTH_LATIN1
-                                  : JSFatInlineString::MAX_LENGTH_TWO_BYTE;
+    uint32_t fatInlineMaxLength = JSFatInlineString::MAX_LENGTH_TWO_BYTE;
+    if (isLatin1)
+        fatInlineMaxLength = JSFatInlineString::MAX_LENGTH_LATIN1;
 
     /* Collect substrings into a rope */
     size_t i = 0;
     RopeBuilder rope(cx);
     RootedString part(cx, nullptr);
     while (i < rangesLen) {
 
         /* Find maximum range that fits in JSFatInlineString */