Bug 495843 - Crash [@ js_Interpret] or Assertion failure: cg->stackDepth == stackDepth, at ../jsemit.cpp. r=brendan
authorBen Newman <bnewman@mozilla.com>
Wed, 03 Jun 2009 13:45:09 -0700
changeset 28920 0c053dca8ea67f9414d83659a3cebb533517c1af
parent 28919 80fc6fb7ee6d59e29564da22e3e38523f2e225d4
child 28926 054daaef53c938aff9fa7208f514495c51a6c6dd
push id7329
push userbnewman@mozilla.com
push dateWed, 03 Jun 2009 20:45:22 +0000
treeherderautoland@0c053dca8ea6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbrendan
bugs495843
milestone1.9.2a1pre
Bug 495843 - Crash [@ js_Interpret] or Assertion failure: cg->stackDepth == stackDepth, at ../jsemit.cpp. r=brendan
js/src/jsparse.cpp
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -3291,17 +3291,17 @@ NoteLValue(JSContext *cx, JSParseNode *p
 {
     if (pn->pn_used) {
         JSDefinition *dn = pn->pn_lexdef;
 
         /*
          * Save the win of PND_INITIALIZED if we can prove 'var x;' and 'x = y'
          * occur as direct kids of the same block with no forward refs to x.
          */
-        if (!(dn->pn_dflags & (PND_INITIALIZED | PND_PLACEHOLDER)) &&
+        if (!(dn->pn_dflags & (PND_INITIALIZED | PND_CONST | PND_PLACEHOLDER)) &&
             dn->isBlockChild() &&
             pn->isBlockChild() &&
             dn->pn_blockid == pn->pn_blockid &&
             dn->pn_pos.end <= pn->pn_pos.begin &&
             dn->dn_uses == pn) {
             dflag = PND_INITIALIZED;
         }