Title: [203214] trunk/Tools
- Revision
- 203214
- Author
- [email protected]
- Date
- 2016-07-13 23:17:36 -0700 (Wed, 13 Jul 2016)
Log Message
Test WTF.StringViewIterators is crashing since r203119
https://bugs.webkit.org/show_bug.cgi?id=159710
Reviewed by Darin Adler.
There are two problems in the test case added in r203119. First is that it's testing
StringView::CodeUnits::Iterator instead of StringView::CodePoints::Iterator, and second is that
StringView::codePoints() returns a temporary, so the iterator created from the temporary ends up pointing to a
const reference to the string view member of the deleted CodePoints object.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (203213 => 203214)
--- trunk/Tools/ChangeLog 2016-07-14 05:24:43 UTC (rev 203213)
+++ trunk/Tools/ChangeLog 2016-07-14 06:17:36 UTC (rev 203214)
@@ -1,3 +1,18 @@
+2016-07-13 Carlos Garcia Campos <[email protected]>
+
+ Test WTF.StringViewIterators is crashing since r203119
+ https://bugs.webkit.org/show_bug.cgi?id=159710
+
+ Reviewed by Darin Adler.
+
+ There are two problems in the test case added in r203119. First is that it's testing
+ StringView::CodeUnits::Iterator instead of StringView::CodePoints::Iterator, and second is that
+ StringView::codePoints() returns a temporary, so the iterator created from the temporary ends up pointing to a
+ const reference to the string view member of the deleted CodePoints object.
+
+ * TestWebKitAPI/Tests/WTF/StringView.cpp:
+ (TestWebKitAPI::TEST):
+
2016-07-13 Daniel Bates <[email protected]>
[iOS] Copy WebKitTestRunnerInjectedBundle.bundle into PlugIns subdirectory and code sign it
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp (203213 => 203214)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp 2016-07-14 05:24:43 UTC (rev 203213)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp 2016-07-14 06:17:36 UTC (rev 203214)
@@ -122,7 +122,8 @@
String helo("helo");
StringView heloView(helo);
- auto codePointsIterator = heloView.codeUnits().begin();
+ auto codePoints = heloView.codePoints();
+ auto codePointsIterator = codePoints.begin();
EXPECT_EQ(*codePointsIterator, 'h');
EXPECT_EQ(*codePointsIterator, 'h');
++codePointsIterator;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes