Bug 1015742 - refactor JSOP_SPREAD to work on iterator; r=jorendorff

This commit is contained in:
Arpad Borsos
2014-05-26 19:41:37 +02:00
parent 421b914f19
commit f5042dd387
10 changed files with 56 additions and 39 deletions

View File

@@ -1350,6 +1350,14 @@ ForOfIterator::init(HandleValue iterable, NonIterableBehavior nonIterableBehavio
return true;
}
bool
ForOfIterator::initWithIterator(HandleValue aIterator)
{
JSContext *cx = cx_;
RootedObject iteratorObj(cx, ToObject(cx, aIterator));
return iterator = iteratorObj;
}
inline bool
ForOfIterator::nextFromOptimizedArray(MutableHandleValue vp, bool *done)
{