Firefox 17-26 iterators throw a StopIteration object to indicate "done". This normalizes it.
github.com/ljharb/stop-iteration-iterator
ljharb/stop-iteration-iterator