Changeset 202648 in webkit
- Timestamp:
- Jun 29, 2016 2:48:17 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202647 r202648 1 2016-06-29 Saam barati <sbarati@apple.com> 2 3 Destructuring variable declaration is missing a validation of the syntax of a sub production when there is a rhs 4 https://bugs.webkit.org/show_bug.cgi?id=159267 5 6 Reviewed by Mark Lam. 7 8 * js/parser-syntax-check-expected.txt: 9 * js/script-tests/parser-syntax-check.js: 10 1 11 2016-06-29 Nan Wang <n_wang@apple.com> 2 12 -
trunk/LayoutTests/js/parser-syntax-check-expected.txt
r202074 r202648 1100 1100 PASS Invalid: "function f() { 1 % 1101 1101 -- }" 1102 PASS Invalid: "let {w} = (foo-=()), {} = ("a" ^= "b");" 1103 PASS Invalid: "function f() { let {w} = (foo-=()), {} = ("a" ^= "b"); }" 1104 PASS Invalid: "const {w} = (foo-=()), {} = ("a" ^= "b");" 1105 PASS Invalid: "function f() { const {w} = (foo-=()), {} = ("a" ^= "b"); }" 1106 PASS Invalid: "var {w} = (foo-=()), {} = ("a" ^= "b");" 1107 PASS Invalid: "function f() { var {w} = (foo-=()), {} = ("a" ^= "b"); }" 1108 PASS Invalid: "let {w} = ();" 1109 PASS Invalid: "function f() { let {w} = (); }" 1110 PASS Invalid: "let {w} = 1234abc;" 1111 PASS Invalid: "function f() { let {w} = 1234abc; }" 1112 PASS Invalid: "const {w} = 1234abc;" 1113 PASS Invalid: "function f() { const {w} = 1234abc; }" 1114 PASS Invalid: "var {w} = 1234abc;" 1115 PASS Invalid: "function f() { var {w} = 1234abc; }" 1102 1116 Rest parameter 1103 1117 PASS Valid: "function foo(...a) { }" -
trunk/LayoutTests/js/script-tests/parser-syntax-check.js
r202074 r202648 658 658 invalid("1 % \n++"); 659 659 invalid("1 % \n--"); 660 invalid('let {w} = (foo-=()), {} = ("a" ^= "b");'); 661 invalid('const {w} = (foo-=()), {} = ("a" ^= "b");'); 662 invalid('var {w} = (foo-=()), {} = ("a" ^= "b");'); 663 invalid('let {w} = ();'); 664 invalid('let {w} = 1234abc;'); 665 invalid('const {w} = 1234abc;'); 666 invalid('var {w} = 1234abc;'); 660 667 661 668 debug("Rest parameter"); -
trunk/Source/JavaScriptCore/ChangeLog
r202634 r202648 1 2016-06-29 Saam barati <sbarati@apple.com> 2 3 Destructuring variable declaration is missing a validation of the syntax of a sub production when there is a rhs 4 https://bugs.webkit.org/show_bug.cgi?id=159267 5 6 Reviewed by Mark Lam. 7 8 We were parsing something without checking if it had a syntax error. 9 This is wrong for many reasons, but it could actually cause a crash 10 in a debug build if you parsed particular programs. 11 12 * parser/Parser.cpp: 13 (JSC::Parser<LexerType>::parseVariableDeclarationList): 14 1 15 2016-06-29 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r202280 r202648 734 734 next(TreeBuilder::DontBuildStrings); // consume '=' 735 735 TreeExpression rhs = parseAssignmentExpression(context); 736 propagateError(); 737 ASSERT(rhs); 736 738 node = context.createDestructuringAssignment(location, pattern, rhs); 737 739 lastInitializer = rhs;
Note: See TracChangeset
for help on using the changeset viewer.