⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 181503 in webkit


Ignore:
Timestamp:
Mar 14, 2015, 9:58:55 PM (11 years ago)
Author:
rniwa@webkit.org
Message:

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):

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r181497 r181503  
     12015-03-14  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        parseClass should popScope after pushScope
     4        https://bugs.webkit.org/show_bug.cgi?id=142689
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Added a regression test for the test case that caught this bug.
     9
     10        * TestExpectations: Skipped the test since ES6 class syntax isn't enabled by default.
     11        * js/class-syntax-scoping-expected.txt: Added.
     12        * js/class-syntax-scoping.html: Added.
     13        * js/script-tests/class-syntax-scoping.js: Added.
     14        (test):
     15
    1162015-03-14  Michael Saboff  <msaboff@apple.com>
    217
  • trunk/LayoutTests/TestExpectations

    r181490 r181503  
    7272webkit.org/b/140491 js/class-syntax-expression.html [ Failure ]
    7373webkit.org/b/140491 js/class-syntax-extends.html [ Failure ]
     74webkit.org/b/140491 js/class-syntax-scoping.html [ Failure ]
    7475webkit.org/b/140491 js/class-syntax-super.html [ Failure ]
    7576
  • trunk/Source/JavaScriptCore/ChangeLog

    r181502 r181503  
     12015-03-14  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        parseClass should popScope after pushScope
     4        https://bugs.webkit.org/show_bug.cgi?id=142689
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Pop the parser scope as needed.
     9
     10        * parser/Parser.cpp:
     11        (JSC::Parser<LexerType>::parseClass):
     12
    1132015-03-14  Dean Jackson  <dino@apple.com>
    214
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r181490 r181503  
    15531553    semanticFailIfFalse(constructor, "Class declaration without a constructor is not supported yet");
    15541554
     1555    failIfFalse(popScope(classScope, TreeBuilder::NeedsFreeVariableInfo), "Parser error");
    15551556    consumeOrFail(CLOSEBRACE, "Expected a closing '}' after a class body");
    15561557
Note: See TracChangeset for help on using the changeset viewer.