Bug 461111 - Extra parens in decompilation of "if(a, b)". r=brendan.

This commit is contained in:
Jason Orendorff
2008-10-24 12:52:52 -05:00
parent e8b38260e7
commit 1054f5cd5c
2 changed files with 5 additions and 2 deletions

View File

@@ -1767,7 +1767,10 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
* Pop a condition expression for if/for/while. JSOP_IFEQ's precedence forces
* extra parens around assignment, which avoids a strict-mode warning.
*/
#define POP_COND_STR() PopStr(ss, JSOP_IFEQ)
#define POP_COND_STR() \
PopStr(ss, (js_CodeSpec[ss->opcodes[ss->top - 1]].format & JOF_SET) \
? JSOP_IFEQ \
: JSOP_NOP)
/*
* Callers know that ATOM_IS_STRING(atom), and we leave it to the optimizer to