• Marja Hölttä's avatar
    [parser] Fix class variable redeclaration · 6de4e210
    Marja Hölttä authored
    ParserBase::ParseClassLiteral and BaseConsumedPreparseData::RestoreDataForScope
    both declare the class variable, but the logic is so complex
    that they sometimes ended up both declaring it.
    
    This is further complicated by some of the variable values (esp.
    inner_scope_calls_eval_) potentially changing in between, so we can't
    just redo the same logic any more.
    
    Forcefully make it work by making RestoreDataForScope declare the variable
    iff ParseClassLiteral didn't.
    
    Bug: chromium:1245870
    Change-Id: I777fd9d78145240448fc25709d2b118977d91056
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3140596
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#76654}
    6de4e210
preparse-data.cc 28.8 KB