Bug 1021835 - Part 3: Use "iterator" instead of "iterable" in the error message for iterator. r=evilpie

This commit is contained in:
Tooru Fujisawa 2016-11-13 00:40:29 +09:00
Родитель 81b6c3004f
Коммит 08f43c0396
2 изменённых файлов: 2 добавлений и 1 удалений

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

@ -148,7 +148,7 @@ function GetIterator(obj, method) {
// Step 5.
if (!IsObject(iterator))
ThrowTypeError(JSMSG_NOT_ITERABLE, ToString(iterator));
ThrowTypeError(JSMSG_NOT_ITERATOR, ToString(iterator));
// Step 6.
return iterator;

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

@ -92,6 +92,7 @@ MSG_DEF(JSMSG_BAD_GET_SET_FIELD, 1, JSEXN_TYPEERR, "property descriptor's
MSG_DEF(JSMSG_THROW_TYPE_ERROR, 0, JSEXN_TYPEERR, "'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them")
MSG_DEF(JSMSG_NOT_EXPECTED_TYPE, 3, JSEXN_TYPEERR, "{0}: expected {1}, got {2}")
MSG_DEF(JSMSG_NOT_ITERABLE, 1, JSEXN_TYPEERR, "{0} is not iterable")
MSG_DEF(JSMSG_NOT_ITERATOR, 1, JSEXN_TYPEERR, "{0} is not iterator")
MSG_DEF(JSMSG_ALREADY_HAS_PRAGMA, 2, JSEXN_WARN, "{0} is being assigned a {1}, but already has one")
MSG_DEF(JSMSG_GET_ITER_RETURNED_PRIMITIVE, 0, JSEXN_TYPEERR, "[Symbol.iterator]() returned a non-object value")
MSG_DEF(JSMSG_NEXT_RETURNED_PRIMITIVE, 0, JSEXN_TYPEERR, "iterator.next() returned a non-object value")