• adamk's avatar
    Disallow destructuring in legacy sloppy for-in loop parsing · ceb92ebf
    adamk authored
    For web compat reasons, we support an initializer in the declaration
    part of a for-in loop. But we should disallow this for destructured
    declarations (just as we do for lexical declarations). In fact, without
    disallowing it, we crash.
    
    Also fix up the PreParser to have the same restrictions here as the parser
    (the lexical check was missing there), verified by running the message tests
    with --min-preparse-length=0.
    
    In fixing the logic I've also cleaned up the code a bit, removing the
    only-called-once DeclarationParsingResult::SingleName method.
    
    BUG=v8:811
    LOG=n
    
    Review URL: https://codereview.chromium.org/1471973003
    
    Cr-Commit-Position: refs/heads/master@{#32236}
    ceb92ebf
Name
Last commit
Last update
benchmarks Loading commit data...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...