Bug 942390 - Don't use the iterator cache if the object has an __iterator__ property. r=bhackett
This commit is contained in:
@@ -618,8 +618,10 @@ js::GetIterator(JSContext *cx, HandleObject obj, unsigned flags, MutableHandleVa
|
||||
if (!pobj->isNative() ||
|
||||
!pobj->hasEmptyElements() ||
|
||||
pobj->hasUncacheableProto() ||
|
||||
obj->getOps()->enumerate ||
|
||||
pobj->getClass()->enumerate != JS_EnumerateStub) {
|
||||
pobj->getOps()->enumerate ||
|
||||
pobj->getClass()->enumerate != JS_EnumerateStub ||
|
||||
pobj->nativeContainsPure(cx->names().iteratorIntrinsic))
|
||||
{
|
||||
shapes.clear();
|
||||
goto miss;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user