1. 07 Sep, 2017 1 commit
    • Marja Hölttä's avatar
      [parser] Fix arrow funcs w/ destructuring params again. [Alternative fix] · 138fbdb4
      Marja Hölttä authored
      What happened:
      - When rewriting in DoParseFunction, the relevant function scope is no longer in
      the scope stack.
      - The correct scope is given to the PatternRewriter.
      - PatternRewriter called to Parser::BuildIteratorCloseForCompletion.
      - BuildIteratorCloseForCompletion would just call NewTemporary (which creates
      a new temporary in Parser's current scope) instead of using the scope passed to
      it and calling NewTemporary on it.
      - Normally this went unnoticed, since it doesn't matter that much where the
      temporary is.
      - But in the lazy arrow func case, the Parser's scope at that point was the
      already-resolved outer scope, and a DCHECK detected this problem.
      
      Kudos & thanks to verwaest@ for a debugging session :)
      
      BUG=chromium:761831
      
      Change-Id: I1e8474ce927be0330f4ba4efc0fc08fdcc328809
      Reviewed-on: https://chromium-review.googlesource.com/650297
      Commit-Queue: Marja Hölttä <marja@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#47877}
      138fbdb4