parseClass should popScope after pushScope
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Mar 2015 04:58:55 +0000 (04:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Mar 2015 04:58:55 +0000 (04:58 +0000)
commit9ebb7a27cdaf564c5e7ed494e060f527b0a3337a
treee04dcc40cbaf84d7f9abd84fa1180b347f1a59dd
parentf844740a6aed17cf79df86c7ed5701ef564c884c
parseClass should popScope after pushScope
https://bugs.webkit.org/show_bug.cgi?id=142689

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Pop the parser scope as needed.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):

LayoutTests:

Added a regression test for the test case that caught this bug.

* TestExpectations: Skipped the test since ES6 class syntax isn't enabled by default.
* js/class-syntax-scoping-expected.txt: Added.
* js/class-syntax-scoping.html: Added.
* js/script-tests/class-syntax-scoping.js: Added.
(test):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/js/class-syntax-scoping-expected.txt [new file with mode: 0644]
LayoutTests/js/class-syntax-scoping.html [new file with mode: 0644]
LayoutTests/js/script-tests/class-syntax-scoping.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Parser.cpp