Changeset 219263 in webkit
- Timestamp:
- Jul 7, 2017 12:50:00 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r219209 r219263 1 2017-07-07 Mark Lam <mark.lam@apple.com> 2 3 \n\r is not the same as \r\n. 4 https://bugs.webkit.org/show_bug.cgi?id=173053 5 6 Reviewed by Keith Miller. 7 8 * stress/regress-173053.js: Added. 9 * stress/template-literal-line-terminators.js: 10 1 11 2017-07-06 Saam Barati <sbarati@apple.com> 2 12 -
trunk/JSTests/stress/template-literal-line-terminators.js
r183559 r219263 2 2 function test(actual, expected) { 3 3 if (actual !== expected) 4 throw new Error("bad value: " + actual);4 throw new Error("bad value: actual: " + actual + ", expected: " + expected); 5 5 } 6 6 … … 37 37 testEvalLineNumber("`Hello\r\nWorld`", "Hello\nWorld", 2); 38 38 testEvalLineNumber("`Hello\n\nWorld`", "Hello\n\nWorld", 3); 39 testEvalLineNumber("`Hello\n\rWorld`", "Hello\n\nWorld", 2);39 testEvalLineNumber("`Hello\n\rWorld`", "Hello\n\nWorld", 3); 40 40 41 41 testEvalLineNumber("`Hello\n\r\nWorld`", "Hello\n\nWorld", 3); … … 43 43 testEvalLineNumber("`Hello\n\n\nWorld`", "Hello\n\n\nWorld", 4); 44 44 45 testEvalLineNumber("`Hello\n\r\n\rWorld`", "Hello\n\n\nWorld", 3);45 testEvalLineNumber("`Hello\n\r\n\rWorld`", "Hello\n\n\nWorld", 4); 46 46 testEvalLineNumber("`Hello\n\r\n\nWorld`", "Hello\n\n\nWorld", 4); 47 47 testEvalLineNumber("`Hello\r\n\n\nWorld`", "Hello\n\n\nWorld", 4); 48 48 49 testEvalLineNumber("`Hello\\\n\r\rWorld`", "Hello\n\nWorld", 3);49 testEvalLineNumber("`Hello\\\n\r\rWorld`", "Hello\n\nWorld", 4); 50 50 testEvalLineNumber("`Hello\\\r\n\n\nWorld`", "Hello\n\nWorld", 4); 51 51 testEvalLineNumber("`Hello\\\n\r\n\nWorld`", "Hello\n\nWorld", 4); 52 testEvalLineNumber("`Hello\\\n\r\r\nWorld`", "Hello\n\nWorld", 3);52 testEvalLineNumber("`Hello\\\n\r\r\nWorld`", "Hello\n\nWorld", 4); 53 53 54 54 testEvalLineNumber("`\u2028`", "\u2028", 2); -
trunk/LayoutTests/ChangeLog
r219262 r219263 1 2017-07-07 Mark Lam <mark.lam@apple.com> 2 3 \n\r is not the same as \r\n. 4 https://bugs.webkit.org/show_bug.cgi?id=173053 5 6 Reviewed by Keith Miller. 7 8 * js/parse-backslash-before-newline-expected.txt: 9 * js/script-tests/parse-backslash-before-newline.js: 10 1 11 2017-07-07 Matt Lewis <jlewis3@apple.com> 2 12 -
trunk/LayoutTests/js/parse-backslash-before-newline-expected.txt
r12262 r219263 1 1 PASS "teststring with CR LF" is "teststring with CR LF" 2 PASS "teststring with LF CR" is "teststring with LF CR" 2 PASS "test 3 string with LF CR" threw exception SyntaxError: Unexpected EOF. 3 4 PASS "teststring with CR" is "teststring with CR" 4 5 PASS "teststring with LF" is "teststring with LF" -
trunk/LayoutTests/js/script-tests/parse-backslash-before-newline.js
r98407 r219263 2 2 string with CR LF"', '"teststring with CR LF"'); 3 3 4 should Be('"test\4 shouldThrow(`"test\ 5 5 6 string with LF CR" ', '"teststring with LF CR"');6 string with LF CR"`, '"SyntaxError: Unexpected EOF"'); 7 7 8 8 shouldBe('"test\ -
trunk/Source/JavaScriptCore/ChangeLog
r219260 r219263 1 2017-07-07 Mark Lam <mark.lam@apple.com> 2 3 \n\r is not the same as \r\n. 4 https://bugs.webkit.org/show_bug.cgi?id=173053 5 6 Reviewed by Keith Miller. 7 8 * parser/Lexer.cpp: 9 (JSC::Lexer<T>::shiftLineTerminator): 10 (JSC::LineNumberAdder::add): 11 1 12 2017-07-07 Commit Queue <commit-queue@webkit.org> 2 13 -
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r218819 r219263 1 1 /* 2 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 3 * Copyright (C) 2006-20 09, 2011-2013, 2016Apple Inc. All Rights Reserved.3 * Copyright (C) 2006-2017 Apple Inc. All Rights Reserved. 4 4 * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) 5 5 * Copyright (C) 2010 Zoltan Herczeg (zherczeg@inf.u-szeged.hu) … … 706 706 shift(); 707 707 708 // Allow both CRLF and LFCR. 709 if (prev + m_current == '\n' + '\r') 708 if (prev == '\r' && m_current == '\n') 710 709 shift(); 711 710 … … 1412 1411 { 1413 1412 ASSERT(Lexer<CharacterType>::isLineTerminator(character)); 1414 if ( (character + m_previous) == ('\n' + '\r'))1413 if (m_previous == '\r' && character == '\n') 1415 1414 m_previous = 0; 1416 1415 else {
Note: See TracChangeset
for help on using the changeset viewer.