Bug 356248: incorrect decompilation for object literal with named getter function; property and function names are mashed together, r=brendan

This commit is contained in:
crowder@fiverocks.com 2007-04-13 17:13:02 -07:00
parent 99daa6badd
commit c359618071

View File

@ -3927,11 +3927,8 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
#else
if (lastop == JSOP_GETTER || lastop == JSOP_SETTER) {
if (strncmp(rval, js_function_str, 8) || rval[8] != ' ') {
todo = Sprint(&ss->sprinter, "%s%s%s%s%s:%s", lval,
todo = Sprint(&ss->sprinter, "%s%s%s %s:%s", lval,
(lval[1] != '\0') ? ", " : "", xval,
(lastop == JSOP_GETTER ||
lastop == JSOP_SETTER)
? " " : "",
(lastop == JSOP_GETTER) ? js_getter_str :
(lastop == JSOP_SETTER) ? js_setter_str :
"",
@ -3939,12 +3936,13 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb)
} else {
rval += 8 + 1;
LOCAL_ASSERT(rval[strlen(rval)-1] == '}');
todo = Sprint(&ss->sprinter, "%s%s%s %s%s",
todo = Sprint(&ss->sprinter, "%s%s%s %s%s%s",
lval,
(lval[1] != '\0') ? ", " : "",
(lastop == JSOP_GETTER)
? js_get_str : js_set_str,
xval,
(rval[0] != '(') ? " " : "",
rval);
}
} else {