Throw syntax error when a getter/setter has the wrong number of params
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 17 Jun 2014 07:23:26 +0000 (07:23 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 17 Jun 2014 07:23:26 +0000 (07:23 +0000)
commit5bbc92dee0f283f8cc512cb669bdcbf2c0397feb
tree9df9c14e859056c61bdcc958f34a8f133abb38d4
parente0567085833167b9e14a4f7807725cdc2e19a40a
Throw syntax error when a getter/setter has the wrong number of params

We used to allow any number of parameters in getters and setters to
match JSC. This is a violation of ES5.1 and both SpiderMonkey and
Chakra throw on these syntax errors.

BUG=v8:3371
LOG=Y
R=marja@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
14 files changed:
src/ast.h
src/parser.cc
src/parser.h
src/preparser.cc
src/preparser.h
test/cctest/test-parsing.cc
test/mozilla/mozilla.status
test/preparser/duplicate-property.pyt
test/webkit/for-in-cached-expected.txt
test/webkit/for-in-cached.js
test/webkit/object-literal-direct-put-expected.txt
test/webkit/object-literal-direct-put.js
test/webkit/object-literal-syntax-expected.txt
test/webkit/object-literal-syntax.js