• Sathya Gunasekaran's avatar
    Fix error message while array destructuring undefined · 94ce16b7
    Sathya Gunasekaran authored
    Previously,
      ➜  v8 (master)  ./out.gn/x64.optdebug/d8
      V8 version 6.1.0 (candidate)
      d8> var x = undefined
      undefined
      d8> var [a] = x
      (d8):1: TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
      var [a] = x
                ^
      TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
          at (d8):1:11
    
    Now,
      ➜  v8 (fix-iterator)  ./out.gn/x64.optdebug/d8
      V8 version 6.1.0 (candidate)
      d8> var x = undefined
      undefined
      d8> var [a] = x
      (d8):1: TypeError: x is not iterable
      var [a] = x
                ^
      TypeError: x is not iterable
          at (d8):1:11
    
    
    Bug: v8:6599, v8:6513
    Change-Id: I71287a19166af0289e8f7708b8f41ad003ae87ae
    Reviewed-on: https://chromium-review.googlesource.com/571175
    Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
    Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
    Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46723}
    94ce16b7
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...