Fix bogus assertion: "!shape->inDictionary()" (only if not shape->frozen(); 592217, r=jorendorff).
authorBrendan Eich <brendan@mozilla.org>
Mon, 20 Sep 2010 08:01:06 -0700
changeset 54422 ed934a5f7ef1391d3dc093fdecad812f4d86609d
parent 54421 9f9e109033eddbe243632ace37ce0d5dae7a3c8c
child 54424 7e222b518b300e5dc67f45fcf175179f0e05f348
push idunknown
push userunknown
push dateunknown
reviewersjorendorff
bugs592217
milestone2.0b6pre
Fix bogus assertion: "!shape->inDictionary()" (only if not shape->frozen(); 592217, r=jorendorff).
js/src/jsscope.cpp
js/src/tests/js1_8_5/regress/jstests.list
js/src/tests/js1_8_5/regress/regress-592217.js
--- a/js/src/jsscope.cpp
+++ b/js/src/jsscope.cpp
@@ -551,17 +551,17 @@ Shape::newDictionaryList(JSContext *cx, 
 {
     Shape *shape = *listp;
     Shape *list = shape;
 
     Shape **childp = listp;
     *childp = NULL;
 
     while (shape) {
-        JS_ASSERT(!shape->inDictionary());
+        JS_ASSERT_IF(!shape->frozen(), !shape->inDictionary());
 
         Shape *dprop = Shape::newDictionaryShape(cx, *shape, childp);
         if (!dprop) {
             METER(toDictFails);
             *listp = list;
             return NULL;
         }
 
--- a/js/src/tests/js1_8_5/regress/jstests.list
+++ b/js/src/tests/js1_8_5/regress/jstests.list
@@ -25,16 +25,17 @@ script regress-567152.js
 script regress-569306.js
 script regress-571014.js
 script regress-577648-1.js
 script regress-577648-2.js
 script regress-583429.js
 script regress-584355.js
 script regress-588339.js
 script regress-yarr-regexp.js
+script regress-592217.js
 script regress-592556-c35.js
 script regress-593256.js
 fails-if(!xulRuntime.shell) script regress-595230-1.js
 fails-if(!xulRuntime.shell) script regress-595230-2.js
 script regress-595365-1.js
 fails-if(!xulRuntime.shell) script regress-595365-2.js
 script regress-569464.js
 script regress-596103.js
new file mode 100644
--- /dev/null
+++ b/js/src/tests/js1_8_5/regress/regress-592217.js
@@ -0,0 +1,11 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/licenses/publicdomain/
+ */
+
+(function ([b]) {
+  default xml namespace = 7
+})(0)
+
+reportCompare(0, 0, "ok");