Bug 505523 - Property cache can skip JSClass::resolve or JSClass::addProperty hooks. r=graydon, r=brendan.
This commit is contained in:
@@ -1297,9 +1297,9 @@ js_MakeArraySlow(JSContext *cx, JSObject *obj)
|
||||
/* obj is Array.prototype. */
|
||||
emptyShape = js_GenerateShape(cx, false);
|
||||
} else {
|
||||
/* arrayProto is Array.prototype. */
|
||||
JS_ASSERT(arrayProto->getClass() == &js_SlowArrayClass);
|
||||
if (!OBJ_SCOPE(arrayProto)->getEmptyScopeShape(cx, &js_SlowArrayClass, &emptyShape))
|
||||
return JS_FALSE;
|
||||
emptyShape = OBJ_SCOPE(arrayProto)->emptyScope->shape;
|
||||
}
|
||||
JSScope *scope = JSScope::create(cx, &js_SlowArrayObjectOps, &js_SlowArrayClass, obj,
|
||||
emptyShape);
|
||||
|
||||
Reference in New Issue
Block a user