• neis's avatar
    Implement iterator finalization in array destructuring. · 3062af70
    neis authored
    We must close the iterator whenever the destructuring didn't exhaust it, unless an iterator operation (eg. next) threw.  We do this by wrapping the iterator use in a try-catch-finally similar to the desugaring of for-of.
    
    This is behind --harmony-iterator-close.
    
    R=adamk@chromium.org
    BUG=v8:3566
    LOG=Y
    
    Review URL: https://codereview.chromium.org/1772793002
    
    Cr-Commit-Position: refs/heads/master@{#34654}
    3062af70
ForOf.golden 18.4 KB