Bug 1273480 - avoid dead code on |status| assignment. r=jorendorff
authorAndi-Bogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Tue, 17 May 2016 15:33:25 +0300
changeset 297655 c844767132fe7ee1ac687e8518f93295fd2d991e
parent 297654 76361667f62b31ebfcca582be1912c268b3a6596
child 297656 3270563e24035ee0a3a503d82e0568c0dd739e47
push id30264
push userkwierso@gmail.com
push dateTue, 17 May 2016 20:52:53 +0000
treeherdermozilla-central@991f249a6ffa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1273480
milestone49.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 1273480 - avoid dead code on |status| assignment. r=jorendorff MozReview-Commit-ID: 7I4wqGSBe64
js/src/jsfun.cpp
--- a/js/src/jsfun.cpp
+++ b/js/src/jsfun.cpp
@@ -1538,18 +1538,18 @@ UnescapeSubstr(TextChar* text, size_t st
                     code = JS7_UNHEX(text[i + 1]);
                     code = (code << 4) + JS7_UNHEX(text[i + 2]);
                     code = (code << 4) + JS7_UNHEX(text[i + 3]);
                     code = (code << 4) + JS7_UNHEX(text[i + 4]);
                     i += 4;
                     if (code < 0x10000) {
                         status = buf.append((char16_t)code);
                     } else {
-                        status = status && buf.append((char16_t)((code - 0x10000) / 1024 + 0xD800));
-                        status = status && buf.append((char16_t)(((code - 0x10000) % 1024) + 0xDC00));
+                        status = buf.append((char16_t)((code - 0x10000) / 1024 + 0xD800)) &&
+                            buf.append((char16_t)(((code - 0x10000) % 1024) + 0xDC00));
                     }
                     break;
                 }
             }
             if (!status)
                 return false;
         } else {
             if (!buf.append(text[i]))