[builtins] Improve kIteratorSymbolNonCallable error message

Bug: v8:12918
Change-Id: Id3419cf7cef833cc8e18948874c40e13a3f20675
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3798522
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82150}
This commit is contained in:
Feng Yu 2022-08-02 23:04:08 +08:00 committed by V8 LUCI CQ
parent c047160656
commit 8abfe8f216
2 changed files with 4 additions and 3 deletions

View File

@ -120,7 +120,8 @@ namespace internal {
T(InvalidUnit, "Invalid unit argument for %() '%'") \
T(IterableYieldedNonString, "Iterable yielded % which is not a string") \
T(IteratorResultNotAnObject, "Iterator result % is not an object") \
T(IteratorSymbolNonCallable, "Found non-callable @@iterator") \
T(IteratorSymbolNonCallable, \
"Spread syntax requires ...iterable[Symbol.iterator] to be a function") \
T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \
T(LanguageID, "Language ID should be string or object.") \
T(LocaleNotEmpty, \

View File

@ -1,5 +1,5 @@
*%(basename)s:5: TypeError: Found non-callable @@iterator
*%(basename)s:5: TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function
console.log(1, ...x);
^
TypeError: Found non-callable @@iterator
TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function
at *%(basename)s:5:9