[parser] Better error msg for destructuring non iterable
This patch updates the error positition and the error msg. Previously, → ./out.gn/x64.release/d8 test.js test.js:1: TypeError: undefined is not a function var [a] = {}; ^ TypeError: undefined is not a function at test.js:1:1 With this patch, → ./out.gn/x64.release/d8 test.js test.js:1: TypeError: [Symbol.iterator] is not a function var [a] = {}; ^ TypeError: [Symbol.iterator] is not a function at test.js:1:11 Bug: v8:5532 Change-Id: Ib066e8ec8a53fdf06cce491bde4b1d0c6d564cbc Reviewed-on: https://chromium-review.googlesource.com/539024Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#46015}
Showing
Please
register
or
sign in
to comment