Chromium Code Reviews| Index: src/array-iterator.js |
| diff --git a/src/array-iterator.js b/src/array-iterator.js |
| index 9511b6d95a483c6f56395dd5701a0325c530477d..5508e950434064a515a60ec8068badb7bd1fe910 100644 |
| --- a/src/array-iterator.js |
| +++ b/src/array-iterator.js |
| @@ -126,3 +126,34 @@ function ExtendArrayPrototype() { |
| )); |
| } |
| ExtendArrayPrototype(); |
| + |
| + |
| +function ArgumentsIteratorGetter() { |
| + return ArrayValues; |
| +} |
| + |
| + |
| +function ArgumentsIteratorSetter(val) { |
| + ObjectDefineProperty(this, symbolIterator, { |
| + value: val, |
| + writable: true, |
| + enumerable: false, |
| + configurable: true |
| + }); |
| +} |
| + |
| + |
| +function ExtendArgumentsBoilerplateObjects() { |
| + %CheckIsBootstrapping(); |
| + |
| + for (var i = 0; i < 3; i++) { |
| + var boilerplate = %GetArgumentsBoilerplateObject(i); |
| + ObjectDefineProperty(boilerplate, symbolIterator, { |
| + get: ArgumentsIteratorGetter, |
|
arv (Not doing code reviews)
2014/06/25 15:55:05
It is not clear to me why this cannot be a data pr
|
| + set: ArgumentsIteratorSetter, |
| + enumerable: false, |
| + configurable: true |
| + }); |
| + } |
| +} |
| +ExtendArgumentsBoilerplateObjects(); |