Track whether default 'new' types need unknown properties on the prototype, bug 700501.

This commit is contained in:
Brian Hackett
2011-11-08 18:34:11 -08:00
parent 8b7f3d74c9
commit c40202fc5c
9 changed files with 72 additions and 14 deletions

View File

@@ -3662,7 +3662,8 @@ js_InitArrayClass(JSContext *cx, JSObject *obj)
return NULL;
/* The default 'new' object for Array.prototype has unknown properties. */
arrayProto->getNewType(cx, NULL, /* markUnknown = */ true);
if (!arrayProto->setNewTypeUnknown(cx))
return NULL;
if (!LinkConstructorAndPrototype(cx, ctor, arrayProto))
return NULL;