Title: [201811] trunk/Tools
- Revision
- 201811
- Author
- beid...@apple.com
- Date
- 2016-06-08 10:46:06 -0700 (Wed, 08 Jun 2016)
Log Message
Try to fix the Windows build.
Unreviewed.
* TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:
(TestWebKitAPI::LifetimeLogger::log):
(TestWebKitAPI::LifetimeLogger::takeLogStr):
(TestWebKitAPI::testFunction):
(TestWebKitAPI::TEST):
(TestWebKitAPI::log): Deleted. (VS was seeing it as a dupe symbol)
(TestWebKitAPI::takeLogStr): Deleted. (VS was seeing it as a dupe symbol)
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (201810 => 201811)
--- trunk/Tools/ChangeLog 2016-06-08 17:32:48 UTC (rev 201810)
+++ trunk/Tools/ChangeLog 2016-06-08 17:46:06 UTC (rev 201811)
@@ -1,5 +1,19 @@
2016-06-08 Brady Eidson <beid...@apple.com>
+ Try to fix the Windows build.
+
+ Unreviewed.
+
+ * TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp:
+ (TestWebKitAPI::LifetimeLogger::log):
+ (TestWebKitAPI::LifetimeLogger::takeLogStr):
+ (TestWebKitAPI::testFunction):
+ (TestWebKitAPI::TEST):
+ (TestWebKitAPI::log): Deleted. (VS was seeing it as a dupe symbol)
+ (TestWebKitAPI::takeLogStr): Deleted. (VS was seeing it as a dupe symbol)
+
+2016-06-08 Brady Eidson <beid...@apple.com>
+
Make CrossThreadCopier more efficient (fewer copies!).
https://bugs.webkit.org/show_bug.cgi?id=158456
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp (201810 => 201811)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp 2016-06-08 17:32:48 UTC (rev 201810)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/CrossThreadTask.cpp 2016-06-08 17:46:06 UTC (rev 201811)
@@ -30,19 +30,6 @@
namespace TestWebKitAPI {
-inline std::ostringstream& log()
-{
- static std::ostringstream log;
- return log;
-}
-
-inline std::string takeLogStr()
-{
- std::string string = log().str();
- log().str("");
- return string;
-}
-
struct LifetimeLogger {
LifetimeLogger()
{
@@ -85,11 +72,25 @@
const char& name { *"<default>" };
int copyGeneration { 0 };
int moveGeneration { 0 };
+
+ static std::ostringstream& log()
+ {
+ static std::ostringstream log;
+ return log;
+ }
+
+ static std::string takeLogStr()
+ {
+ std::string string = log().str();
+ log().str("");
+ return string;
+ }
+
};
void testFunction(const LifetimeLogger&, const LifetimeLogger&, const LifetimeLogger&)
{
- log() << "testFunction called" << " ";
+ LifetimeLogger::log() << "testFunction called" << " ";
}
TEST(WTF_CrossThreadTask, Basic)
@@ -102,7 +103,7 @@
auto task = createCrossThreadTask(testFunction, logger1, logger2, logger3);
task.performTask();
}
- ASSERT_STREQ("default_constructor(<default>-0-0) copy_constructor(<default>-1-0) name_constructor(logger-0-0) isolatedCopy() copy_constructor(<default>-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(logger-1-0) move_constructor(<default>-1-1) move_constructor(<default>-2-1) move_constructor(logger-1-1) destructor(logger-1-0) destructor(<default>-2-0) destructor(<default>-1-0) testFunction called destructor(logger-1-1) destructor(<default>-2-1) destructor(<default>-1-1) destructor(logger-0-0) destructor(<default>-1-0) destructor(<default>-0-0) ", takeLogStr().c_str());
+ ASSERT_STREQ("default_constructor(<default>-0-0) copy_constructor(<default>-1-0) name_constructor(logger-0-0) isolatedCopy() copy_constructor(<default>-1-0) isolatedCopy() copy_constructor(<default>-2-0) isolatedCopy() copy_constructor(logger-1-0) move_constructor(<default>-1-1) move_constructor(<default>-2-1) move_constructor(logger-1-1) destructor(logger-1-0) destructor(<default>-2-0) destructor(<default>-1-0) testFunction called destructor(logger-1-1) destructor(<default>-2-1) destructor(<default>-1-1) destructor(logger-0-0) destructor(<default>-1-0) destructor(<default>-0-0) ", LifetimeLogger::takeLogStr().c_str());
}
} // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes