Title: [207237] trunk
- Revision
- 207237
- Author
- [email protected]
- Date
- 2016-10-12 13:38:37 -0700 (Wed, 12 Oct 2016)
Log Message
Unreviewed, rolling out r207225.
This change causes debug tests to exit early with crashes.
Reverted changeset:
"Optional's move-constructor and move-assignment operator
don't disengage the value being moved from"
https://bugs.webkit.org/show_bug.cgi?id=163309
http://trac.webkit.org/changeset/207225
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (207236 => 207237)
--- trunk/Source/WTF/ChangeLog 2016-10-12 20:23:03 UTC (rev 207236)
+++ trunk/Source/WTF/ChangeLog 2016-10-12 20:38:37 UTC (rev 207237)
@@ -1,3 +1,16 @@
+2016-10-12 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r207225.
+
+ This change causes debug tests to exit early with crashes.
+
+ Reverted changeset:
+
+ "Optional's move-constructor and move-assignment operator
+ don't disengage the value being moved from"
+ https://bugs.webkit.org/show_bug.cgi?id=163309
+ http://trac.webkit.org/changeset/207225
+
2016-10-11 Sam Weinig <[email protected]>
Optional's move-constructor and move-assignment operator don't disengage the value being moved from
Modified: trunk/Source/WTF/wtf/Optional.h (207236 => 207237)
--- trunk/Source/WTF/wtf/Optional.h 2016-10-12 20:23:03 UTC (rev 207236)
+++ trunk/Source/WTF/wtf/Optional.h 2016-10-12 20:38:37 UTC (rev 207237)
@@ -71,10 +71,8 @@
Optional(Optional&& other)
: m_isEngaged(other.m_isEngaged)
{
- if (m_isEngaged) {
+ if (m_isEngaged)
new (NotNull, &m_value) T(WTFMove(*other.asPtr()));
- other.m_isEngaged = false;
- }
}
Optional(T&& value)
@@ -123,7 +121,6 @@
if (other.m_isEngaged) {
new (NotNull, &m_value) T(WTFMove(*other.asPtr()));
m_isEngaged = true;
- other.m_isEngaged = false;
}
return *this;
}
Modified: trunk/Tools/ChangeLog (207236 => 207237)
--- trunk/Tools/ChangeLog 2016-10-12 20:23:03 UTC (rev 207236)
+++ trunk/Tools/ChangeLog 2016-10-12 20:38:37 UTC (rev 207237)
@@ -1,3 +1,16 @@
+2016-10-12 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r207225.
+
+ This change causes debug tests to exit early with crashes.
+
+ Reverted changeset:
+
+ "Optional's move-constructor and move-assignment operator
+ don't disengage the value being moved from"
+ https://bugs.webkit.org/show_bug.cgi?id=163309
+ http://trac.webkit.org/changeset/207225
+
2016-10-12 Alex Christensen <[email protected]>
Fix assertion after switching to URLParser
Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/Optional.cpp (207236 => 207237)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/Optional.cpp 2016-10-12 20:23:03 UTC (rev 207236)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/Optional.cpp 2016-10-12 20:38:37 UTC (rev 207237)
@@ -25,7 +25,6 @@
#include "config.h"
-#include "Counters.h"
#include <wtf/Optional.h>
namespace TestWebKitAPI {
@@ -147,52 +146,5 @@
EXPECT_TRUE(1 != unengaged1);
}
-TEST(WTF_Optional, MoveConstructor)
-{
- {
- CopyMoveCounter::TestingScope scope;
- Optional<CopyMoveCounter> optional(InPlace);
-
- EXPECT_EQ(1U, CopyMoveCounter::constructionCount);
- EXPECT_EQ(0U, CopyMoveCounter::copyCount);
- EXPECT_EQ(0U, CopyMoveCounter::moveCount);
-
- EXPECT_TRUE(static_cast<bool>(optional));
-
- Optional<CopyMoveCounter> movedTo(WTFMove(optional));
-
- EXPECT_EQ(1U, CopyMoveCounter::constructionCount);
- EXPECT_EQ(0U, CopyMoveCounter::copyCount);
- EXPECT_EQ(1U, CopyMoveCounter::moveCount);
-
- EXPECT_FALSE(static_cast<bool>(optional));
- EXPECT_TRUE(static_cast<bool>(movedTo));
- }
-}
-
-TEST(WTF_Optional, MoveAssignment)
-{
- {
- CopyMoveCounter::TestingScope scope;
-
- Optional<CopyMoveCounter> optional(InPlace);
-
- EXPECT_EQ(1U, CopyMoveCounter::constructionCount);
- EXPECT_EQ(0U, CopyMoveCounter::copyCount);
- EXPECT_EQ(0U, CopyMoveCounter::moveCount);
-
- EXPECT_TRUE(static_cast<bool>(optional));
-
- Optional<CopyMoveCounter> movedTo = WTFMove(optional);
-
- EXPECT_EQ(1U, CopyMoveCounter::constructionCount);
- EXPECT_EQ(0U, CopyMoveCounter::copyCount);
- EXPECT_EQ(1U, CopyMoveCounter::moveCount);
-
- EXPECT_FALSE(static_cast<bool>(optional));
- EXPECT_TRUE(static_cast<bool>(movedTo));
- }
-}
-
} // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes