Fix function scoping issue
authorlittledan <littledan@chromium.org>
Sat, 22 Aug 2015 00:18:12 +0000 (17:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 22 Aug 2015 00:18:23 +0000 (00:18 +0000)
commit9c79e69e6c9725501852a26de1d0284e6aad038d
tree44e865e4a7c1604ab2944cd0c65e062cc2440106
parent9edbc1f21eb1050cabbe3b8bc9aebf89ada7ebd7
Fix function scoping issue

The parser has special behavior with respect to the bindings
of inner functions in sloppy mode which are not at the top
level of scopes. This behavior should be turned off when the
--harmony-sloppy-function flag is set, as lexical scoping
rules are used instead. Previously, the incorrect flag
--harmony-sloppy was used, resulting in a crashing bug.

BUG=chromium:520029
LOG=Y
R=adamk

Review URL: https://codereview.chromium.org/1303033003

Cr-Commit-Position: refs/heads/master@{#30315}
src/parser.cc
test/mjsunit/regress/regress-520029.js [new file with mode: 0644]