• 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
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
x87 Loading commit data...
OWNERS Loading commit data...
access-compiler-data.h Loading commit data...
access-compiler.cc Loading commit data...
access-compiler.h Loading commit data...
accessor-assembler.cc Loading commit data...
accessor-assembler.h Loading commit data...
binary-op-assembler.cc Loading commit data...
binary-op-assembler.h Loading commit data...
call-optimization.cc Loading commit data...
call-optimization.h Loading commit data...
handler-compiler.cc Loading commit data...
handler-compiler.h Loading commit data...
handler-configuration-inl.h Loading commit data...
handler-configuration.h Loading commit data...
ic-inl.h Loading commit data...
ic-state.cc Loading commit data...
ic-state.h Loading commit data...
ic-stats.cc Loading commit data...
ic-stats.h Loading commit data...
ic.cc Loading commit data...
ic.h Loading commit data...
keyed-store-generic.cc Loading commit data...
keyed-store-generic.h Loading commit data...
stub-cache.cc Loading commit data...
stub-cache.h Loading commit data...