Make various returns in jsopcode.cpp properly return NULL rather than false. Followup to bug 692274, r=themaid
authorJeff Walden <jwalden@mit.edu>
Thu, 22 Dec 2011 18:17:06 -0500
changeset 83262 9ed956b9a3b11cffb38e8061cba661655dfec891
parent 83261 13a57f89f8cc91f584d7653c85b5d6acab3952cc
child 83263 c02f25c177e37d598e68ba4636a2f0e97bcb4e8d
push id21744
push userbmo@edmorley.co.uk
push dateFri, 23 Dec 2011 23:56:40 +0000
treeherdermozilla-central@ede336ccaed0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersthemaid
bugs692274
milestone12.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
Make various returns in jsopcode.cpp properly return NULL rather than false. Followup to bug 692274, r=themaid
js/src/jsopcode.cpp
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -3343,74 +3343,74 @@ Decompile(SprintStack *ss, jsbytecode *p
 
                 /*
                  * Build the list of decompiled rhs expressions. Do this before
                  * sprinting the let-head since GetStr can inject stuff on top
                  * of the stack (in case js_DecompileValueGenerator).
                  */
                 Vector<const char *> rhsExprs(cx);
                 if (!rhsExprs.resize(atoms.length()))
-                    return false;
+                    return NULL;
                 for (size_t i = 0; i < rhsExprs.length(); ++i) {
                     rhsExprs[i] = GetStr(ss, letDepth + i);
                     if (!rhsExprs[i])
-                        return false;
+                        return NULL;
                 }
 
                 /* Build the let head starting at headBegin. */
                 ptrdiff_t headBegin = ss->sprinter.offset;
 
                 /*
                  * For group assignment, prepend the '[lhs-vars] = [' here,
                  * append rhsExprs in the next loop and append ']' after.
                  */
                 if (groupAssign) {
                     if (Sprint(&ss->sprinter, "[") < 0)
-                        return false;
+                        return NULL;
                     for (size_t i = 0; i < atoms.length(); ++i) {
                         if (i && Sprint(&ss->sprinter, ", ") < 0)
-                            return false;
+                            return NULL;
                         if (!QuoteString(&ss->sprinter, atoms[i], 0))
-                            return false;
+                            return NULL;
                     }
                     if (Sprint(&ss->sprinter, "] = [") < 0)
-                        return false;
+                        return NULL;
                 }
 
                 for (size_t i = 0; i < atoms.length(); ++i) {
                     const char *rhs = rhsExprs[i];
                     if (!strcmp(rhs, SkipString))
                         continue;
 
                     if (i && Sprint(&ss->sprinter, ", ") < 0)
-                        return false;
+                        return NULL;
 
                     if (groupAssign) {
                         if (SprintCString(&ss->sprinter, rhs) < 0)
-                            return false;
+                            return NULL;
                     } else if (!strncmp(rhs, DestructuredString, DestructuredStringLength)) {
                         if (SprintCString(&ss->sprinter, rhs + DestructuredStringLength) < 0)
-                            return false;
+                            return NULL;
                     } else {
                         JS_ASSERT(atoms[i] != cx->runtime->atomState.emptyAtom);
                         if (!QuoteString(&ss->sprinter, atoms[i], 0))
-                            return false;
+                            return NULL;
                         if (*rhs) {
                             uint8_t prec = js_CodeSpec[ss->opcodes[letDepth + i]].prec;
                             const char *fmt = prec && prec < js_CodeSpec[JSOP_SETLOCAL].prec
                                               ? " = (%s)"
                                               : " = %s";
                             if (Sprint(&ss->sprinter, fmt, rhs) < 0)
-                                return false;
+                                return NULL;
                         }
                     }
                 }
 
                 if (groupAssign && Sprint(&ss->sprinter, "]") < 0)
-                    return false;
+                    return NULL;
 
                 /* Clone the let head chars before clobbering the stack. */
                 DupBuffer head(cx);
                 if (!Dup(OFF2STR(&ss->sprinter, headBegin), &head))
                     return NULL;
                 if (!AssignBlockNamesToPushedSlots(cx, ss, atoms))
                     return NULL;