Bug 620182 [@ QuoteString | DecompileSwitch] when JSVAL_IS_DOUBLE(key) and SprintDoubleValue fails due to oom
authortimeless@mozdev.org
Fri, 03 Jun 2011 08:57:00 -0700
changeset 71180 7e6f3b1796441e3cb3a2ae87d43bf793a46580a3
parent 71179 38f994208a4698546db7b9ea6bb49a96b0587211
child 71181 fa5ba0ebb032970e54baebb0ce06654b914818bb
child 75914 4f8b85723213489d3cf8699dddad477347ffc316
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs620182
milestone6.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 620182 [@ QuoteString | DecompileSwitch] when JSVAL_IS_DOUBLE(key) and SprintDoubleValue fails due to oom r=jorendorff
js/src/jsopcode.cpp
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -1293,16 +1293,18 @@ DecompileSwitch(SprintStack *ss, TableEn
                 todo = -1;
                 if (table[i].label) {
                     str = table[i].label;
                     key = JSVAL_VOID;
                 } else if (JSVAL_IS_DOUBLE(key)) {
                     JSOp junk;
 
                     todo = SprintDoubleValue(&ss->sprinter, key, &junk);
+                    if (todo < 0)
+                        return JS_FALSE;
                     str = NULL;
                 } else {
                     str = js_ValueToString(cx, Valueify(key));
                     if (!str)
                         return JS_FALSE;
                 }
                 if (todo >= 0) {
                     rval = OFF2STR(&ss->sprinter, todo);