Bug 496870 - Emit JSOP_STARTXMLEXPR before potentially emitting any LC nodes in a list. r=Waldo
authorBlake Kaplan <mrbkap@gmail.com>
Mon, 08 Jun 2009 16:48:30 -0700
changeset 29002 f50409fe63edd4fd761f3a2cfcbd0507fea61822
parent 29001 c5217ee59f8a9fc8ba8a5e552967749d8e668672
child 29003 66a40d5fda11d2aac03c2ef9ffb39c4039ec78ba
child 29009 f08193a65af1c1d764581e5e38ed59d3eef47dc9
push id7365
push userrsayre@mozilla.com
push dateTue, 09 Jun 2009 02:39:30 +0000
treeherderautoland@66a40d5fda11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs496870
milestone1.9.2a1pre
Bug 496870 - Emit JSOP_STARTXMLEXPR before potentially emitting any LC nodes in a list. r=Waldo
js/src/jsemit.cpp
--- a/js/src/jsemit.cpp
+++ b/js/src/jsemit.cpp
@@ -6755,16 +6755,20 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
             return JS_FALSE;
         break;
       }
 
       case TOK_XMLNAME:
         if (pn->pn_arity == PN_LIST) {
             JS_ASSERT(pn->pn_count != 0);
             for (pn2 = pn->pn_head; pn2; pn2 = pn2->pn_next) {
+                if (pn2->pn_type == TOK_LC &&
+                    js_Emit1(cx, cg, JSOP_STARTXMLEXPR) < 0) {
+                    return JS_FALSE;
+                }
                 if (!js_EmitTree(cx, cg, pn2))
                     return JS_FALSE;
                 if (pn2 != pn->pn_head && js_Emit1(cx, cg, JSOP_ADD) < 0)
                     return JS_FALSE;
             }
         } else {
             JS_ASSERT(pn->pn_arity == PN_NULLARY);
             ok = (pn->pn_op == JSOP_OBJECT)