Changeset 85455 in webkit
- Timestamp:
- May 1, 2011 9:51:40 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85454 r85455 1 2011-05-01 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 ES5 Strict mode does not allow getter and setter for same propId 6 https://bugs.webkit.org/show_bug.cgi?id=57295 7 8 Update for correct results 9 10 * fast/js/mozilla/strict/11.1.5-expected.txt: 11 1 12 2011-05-01 Oliver Hunt <oliver@apple.com> 2 13 -
trunk/LayoutTests/fast/js/mozilla/strict/11.1.5-expected.txt
r78731 r85455 71 71 PASS Function("({set 1(q) {}, \"1\":1})") threw exception of type SyntaxError. 72 72 PASS true === true 73 FAIL !!Function("'use strict'; ({get x() {}, set x(q) {}})") should be true. Threw exception SyntaxError: Parse error 73 PASS !!Function("'use strict'; ({get x() {}, set x(q) {}})") is true 74 74 PASS !!Function("({get x() {}, set x(q) {}})") is true 75 75 PASS true === true 76 FAIL !!Function("'use strict'; ({set x(q) {}, get x() {}})") should be true. Threw exception SyntaxError: Parse error 76 PASS !!Function("'use strict'; ({set x(q) {}, get x() {}})") is true 77 77 PASS !!Function("({set x(q) {}, get x() {}})") is true 78 78 PASS true === true … … 89 89 PASS Function("({set x() {}, set x() {}})") threw exception of type SyntaxError. 90 90 PASS true === true 91 FAIL !!Function("'use strict'; ({get x() {}, set x(q) {}, y:1})") should be true. Threw exception SyntaxError: Parse error 91 PASS !!Function("'use strict'; ({get x() {}, set x(q) {}, y:1})") is true 92 92 PASS !!Function("({get x() {}, set x(q) {}, y:1})") is true 93 93 PASS true === true -
trunk/Source/JavaScriptCore/ChangeLog
r85454 r85455 1 2011-05-01 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 ES5 Strict mode does not allow getter and setter for same propId 6 https://bugs.webkit.org/show_bug.cgi?id=57295 7 8 Simplify and correct the logic for strict mode object literals. 9 10 * parser/JSParser.cpp: 11 (JSC::JSParser::parseStrictObjectLiteral): 12 1 13 2011-05-01 Oliver Hunt <oliver@apple.com> 2 14 -
trunk/Source/JavaScriptCore/parser/JSParser.cpp
r84846 r85455 1810 1810 std::pair<ObjectValidationMap::iterator, bool> propertyEntryIter = objectValidator.add(context.getName(property).impl(), context.getType(property)); 1811 1811 if (!propertyEntryIter.second) { 1812 failIfTrue(strictMode()); 1813 if ((context.getType(property) & propertyEntryIter.first->second) != PropertyNode::Constant) { 1814 // Can't have multiple getters or setters with the same name, nor can we define 1815 // a property as both an accessor and a constant value 1816 failIfTrue(context.getType(property) & propertyEntryIter.first->second); 1817 failIfTrue((context.getType(property) | propertyEntryIter.first->second) & PropertyNode::Constant); 1818 } 1812 failIfTrue(propertyEntryIter.first->second == PropertyNode::Constant); 1813 failIfTrue(context.getType(property) == PropertyNode::Constant); 1814 failIfTrue(context.getType(property) & propertyEntryIter.first->second); 1815 propertyEntryIter.first->second |= context.getType(property); 1819 1816 } 1820 1817 }
Note: See TracChangeset
for help on using the changeset viewer.