Bug 1384848 - Remove dead code in XPCConvert.cpp r=mrbkap
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 28 Jul 2017 14:05:27 +0200
changeset 420420 816e61957699d19eb96dfccd014ca0487337f065
parent 420419 b8847dab6f580b96a143573cdc42cb628f955996
child 420421 d2cf47e965d7898f0179512875e6e6c877174ef3
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1384848
milestone56.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 1384848 - Remove dead code in XPCConvert.cpp r=mrbkap MozReview-Commit-ID: EncsNyW5Qxx
js/xpconnect/src/XPCConvert.cpp
--- a/js/xpconnect/src/XPCConvert.cpp
+++ b/js/xpconnect/src/XPCConvert.cpp
@@ -1757,24 +1757,16 @@ XPCConvert::JSStringWithSize2Native(void
 
             if (s.isUndefined() || s.isNull()) {
                 if (0 != count) {
                     if (pErr)
                         *pErr = NS_ERROR_XPC_NOT_ENOUGH_CHARS_IN_STRING;
                     return false;
                 }
 
-                if (0 != count) {
-                    len = (count + 1) * sizeof(char16_t);
-                    if (!(*((void**)d) = moz_xmalloc(len)))
-                        return false;
-                    return true;
-                }
-
-                // else ...
                 *((const char16_t**)d) = nullptr;
                 return true;
             }
 
             if (!(str = ToString(cx, s))) {
                 return false;
             }