Bug 1420961 part 2 - Replace if-statement with an assert in js::GetIterator. r=evilpie

This commit is contained in:
Jan de Mooij 2017-11-29 11:41:10 +01:00
Родитель 5e9cba3e6b
Коммит 94ab7abbe5
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -876,8 +876,7 @@ js::GetIterator(JSContext* cx, HandleObject obj, unsigned flags)
numGuards = 0;
}
if (MOZ_UNLIKELY(obj->is<PropertyIteratorObject>()))
return obj;
MOZ_ASSERT(!obj->is<PropertyIteratorObject>());
// We should only call the enumerate trap for "for-in".
// Or when we call GetIterator from the Proxy [[Enumerate]] hook.