Ehsan Akhgari wrote:
The usage of the iterator object which can also store state allows you to check for that exact pattern, so arguably you won't lose anything using range-based for loops if we added a good iterator implementation to nsTArray that checks for mutations.
If you need to check for mutations then you should be using nsTObserverArray, which specifically supports iterators that are stable even if the array is modified during iteration.
-- Warning: May contain traces of nuts. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform