Address bug 700501 review comments, r=luke.

This commit is contained in:
Brian Hackett
2011-11-18 13:59:48 -08:00
parent 87c2935551
commit f6bd0c21f7
4 changed files with 18 additions and 6 deletions

View File

@@ -3819,7 +3819,12 @@ js_InitArrayClass(JSContext *cx, JSObject *obj)
if (!ctor)
return NULL;
/* The default 'new' object for Array.prototype has unknown properties. */
/*
* The default 'new' type of Array.prototype is required by type inference
* to have unknown properties, to simplify handling of e.g. heterogenous
* arrays in JSON and script literals and allows setDenseArrayElement to
* be used without updating the indexed type set for such default arrays.
*/
if (!arrayProto->setNewTypeUnknown(cx))
return NULL;