Bug 460180 - Always reload pn1 since it is null if we found the end of the list. r=brendan
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -6511,18 +6511,18 @@ js_FoldConstants(JSContext *cx, JSParseN
RecycleTree(pn1, tc);
--pn->pn_count;
} else {
pnp = &pn1->pn_next;
}
} while ((pn1 = *pnp) != NULL);
// We may have to change arity from LIST to BINARY.
+ pn1 = pn->pn_head;
if (pn->pn_count == 2) {
- pn1 = pn->pn_head;
pn2 = pn1->pn_next;
pn1->pn_next = NULL;
JS_ASSERT(!pn2->pn_next);
pn->pn_arity = PN_BINARY;
pn->pn_left = pn1;
pn->pn_right = pn2;
} else if (pn->pn_count == 1) {
PN_MOVE_NODE(pn, pn1);