diff options
author | abarth@webkit.org <abarth@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2011-01-07 05:14:30 +0000 |
---|---|---|
committer | abarth@webkit.org <abarth@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2011-01-07 05:14:30 +0000 |
commit | 5c46bf483aefb62de8185ce067857df0aaa44242 (patch) | |
tree | b96a43b15f250bdd2bb1f7b3d933de226feece0c | |
parent | 73f78e54f064d8cd30ca7511146937438df84f0b (diff) | |
download | chromium_src-5c46bf483aefb62de8185ce067857df0aaa44242.zip chromium_src-5c46bf483aefb62de8185ce067857df0aaa44242.tar.gz chromium_src-5c46bf483aefb62de8185ce067857df0aaa44242.tar.bz2 |
2011-01-06 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
REGRESSION (r74663): ASSERTION FAILED: m_tokenizer->lineNumber() == line.zeroBasedInt()
https://bugs.webkit.org/show_bug.cgi?id=52013
This test case used to trigger an ASSERT. It's unclear to me whether
there's a more direct way to test this fix.
* fast/parser/line-number-composite-segmented-string-expected.txt: Added.
* fast/parser/line-number-composite-segmented-string.html: Added.
2011-01-06 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
REGRESSION (r74663): ASSERTION FAILED: m_tokenizer->lineNumber() == line.zeroBasedInt()
https://bugs.webkit.org/show_bug.cgi?id=52013
When excluding line numbers for composite strings, we forgot to exclude
the line number for the current string!
Test: fast/parser/line-number-composite-segmented-string.html
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::setExcludeLineNumbers):
git-svn-id: svn://svn.chromium.org/blink/trunk@75228 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed, 38 insertions, 2 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog index 1e012d6..600b51c 100644 --- a/third_party/WebKit/LayoutTests/ChangeLog +++ b/third_party/WebKit/LayoutTests/ChangeLog @@ -1,3 +1,16 @@ +2011-01-06 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + REGRESSION (r74663): ASSERTION FAILED: m_tokenizer->lineNumber() == line.zeroBasedInt() + https://bugs.webkit.org/show_bug.cgi?id=52013 + + This test case used to trigger an ASSERT. It's unclear to me whether + there's a more direct way to test this fix. + + * fast/parser/line-number-composite-segmented-string-expected.txt: Added. + * fast/parser/line-number-composite-segmented-string.html: Added. + 2011-01-06 Stephen White <senorblanco@chromium.org> Unreviewed; chromium test expectations update. diff --git a/third_party/WebKit/LayoutTests/fast/parser/line-number-composite-segmented-string-expected.txt b/third_party/WebKit/LayoutTests/fast/parser/line-number-composite-segmented-string-expected.txt new file mode 100644 index 0000000..d801cb0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/parser/line-number-composite-segmented-string-expected.txt @@ -0,0 +1 @@ +This test passes if it doesn't trigger an ASSERT. diff --git a/third_party/WebKit/LayoutTests/fast/parser/line-number-composite-segmented-string.html b/third_party/WebKit/LayoutTests/fast/parser/line-number-composite-segmented-string.html new file mode 100644 index 0000000..1be5c6a --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/parser/line-number-composite-segmented-string.html @@ -0,0 +1,7 @@ +<script>document.writeln("\n"); +</script><script></script> +This test passes if it doesn't trigger an ASSERT. +<script> +if (window.layoutTestController) + layoutTestController.dumpAsText(); +</script> diff --git a/third_party/WebKit/WebCore/ChangeLog b/third_party/WebKit/WebCore/ChangeLog index b5a19bd..34a600f 100644 --- a/third_party/WebKit/WebCore/ChangeLog +++ b/third_party/WebKit/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2011-01-06 Adam Barth <abarth@webkit.org> + + Reviewed by Darin Adler. + + REGRESSION (r74663): ASSERTION FAILED: m_tokenizer->lineNumber() == line.zeroBasedInt() + https://bugs.webkit.org/show_bug.cgi?id=52013 + + When excluding line numbers for composite strings, we forgot to exclude + the line number for the current string! + + Test: fast/parser/line-number-composite-segmented-string.html + + * platform/text/SegmentedString.cpp: + (WebCore::SegmentedString::setExcludeLineNumbers): + 2011-01-06 Chris Marrin <cmarrin@apple.com> Unreviewed. diff --git a/third_party/WebKit/WebCore/platform/text/SegmentedString.cpp b/third_party/WebKit/WebCore/platform/text/SegmentedString.cpp index 6a26581..a371582 100644 --- a/third_party/WebKit/WebCore/platform/text/SegmentedString.cpp +++ b/third_party/WebKit/WebCore/platform/text/SegmentedString.cpp @@ -78,13 +78,13 @@ unsigned SegmentedString::length() const void SegmentedString::setExcludeLineNumbers() { + m_currentString.setExcludeLineNumbers(); if (m_composite) { Deque<SegmentedSubstring>::iterator it = m_substrings.begin(); Deque<SegmentedSubstring>::iterator e = m_substrings.end(); for (; it != e; ++it) it->setExcludeLineNumbers(); - } else - m_currentString.setExcludeLineNumbers(); + } } void SegmentedString::clear() |