Bug 1190727 - Make initialization of temporary results array resilient against Array.prototype setters in self-hosted Map#next implementation. r=jandem

This commit is contained in:
Till Schneidereit 2015-08-04 14:58:27 +02:00
parent f41c4e972f
commit 89d4535286

View File

@ -47,11 +47,8 @@ function MapIteratorNext() {
// Steps 8-9 (omitted).
var mapIterationResultPair = iteratorTemp.mapIterationResultPair;
if (!mapIterationResultPair) {
mapIterationResultPair = iteratorTemp.mapIterationResultPair = NewDenseArray(2);
mapIterationResultPair[0] = null;
mapIterationResultPair[1] = null;
}
if (!mapIterationResultPair)
mapIterationResultPair = iteratorTemp.mapIterationResultPair = [null, null];
var retVal = {value: undefined, done: true};