1. 08 Apr, 2016 1 commit
  2. 16 Mar, 2016 1 commit
    • littledan's avatar
      Ship ES2015 restrictions on function declaration locations · f9db79eb
      littledan authored
      Function declarations were previously permitted by V8 in many locations
      which no ECMAScript specification allowed; the ECMAScript 2015 spec
      enumerates a few locations (in blocks, as well as after labels and in
      conditionals when in sloppy mode). This patch ships the flag to restrict
      the usage of function declarations to those contexts.
      
      R=adamk
      LOG=Y
      BUG=v8:4824
      CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
      
      Review URL: https://codereview.chromium.org/1799233003
      
      Cr-Commit-Position: refs/heads/master@{#34828}
      f9db79eb
  3. 14 Oct, 2015 1 commit
    • littledan's avatar
      Fix scopes for body of sloppy-mode for-in/of loop · d0618585
      littledan authored
      This patch fixes an obscure edge case for functions defined as the
      direct body of a for-of/for-in loop, such as the following:
      
       for (foo in []) function foo() { return foo; }
      
      Here, the first occurrence of foo should point to the outer scope;
      however, before this patch, it pointed to the inner foo in an
      invalid way which caused an assertion about the scope chain to fail.
      This patch fixes the scope chain by inserting an extra scope for
      the body of the loop, not including the header.
      
      BUG=chromium:542099
      LOG=N
      R=rossberg
      
      Review URL: https://codereview.chromium.org/1396663004
      
      Cr-Commit-Position: refs/heads/master@{#31268}
      d0618585