Title: [233392] trunk
Revision
233392
Author
[email protected]
Date
2018-06-30 00:08:01 -0700 (Sat, 30 Jun 2018)

Log Message

Unreviewed, rolling out r233391.
https://bugs.webkit.org/show_bug.cgi?id=187217

This patch broke Windows ports (Requested by fredw on
#webkit).

Reverted changeset:

"WTF's internal std::optional implementation should abort() on
bad optional access"
https://bugs.webkit.org/show_bug.cgi?id=186536
https://trac.webkit.org/changeset/233391

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (233391 => 233392)


--- trunk/LayoutTests/ChangeLog	2018-06-30 06:42:04 UTC (rev 233391)
+++ trunk/LayoutTests/ChangeLog	2018-06-30 07:08:01 UTC (rev 233392)
@@ -1,3 +1,18 @@
+2018-06-30  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r233391.
+        https://bugs.webkit.org/show_bug.cgi?id=187217
+
+        This patch broke Windows ports (Requested by fredw on
+        #webkit).
+
+        Reverted changeset:
+
+        "WTF's internal std::optional implementation should abort() on
+        bad optional access"
+        https://bugs.webkit.org/show_bug.cgi?id=186536
+        https://trac.webkit.org/changeset/233391
+
 2018-06-29  Frederic Wang  <[email protected]>
 
         WTF's internal std::optional implementation should abort() on bad optional access

Modified: trunk/LayoutTests/TestExpectations (233391 => 233392)


--- trunk/LayoutTests/TestExpectations	2018-06-30 06:42:04 UTC (rev 233391)
+++ trunk/LayoutTests/TestExpectations	2018-06-30 07:08:01 UTC (rev 233392)
@@ -386,8 +386,6 @@
 # End platform-specific tests.
 #//////////////////////////////////////////////////////////////////////////////////////////
 
-webkit.org/b/187145 imported/w3c/web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context.html [ Crash ]
-
 # media/video-seek-after-end.html is flaky
 webkit.org/b/116293 media/video-seek-after-end.html [ Pass Failure ]
 

Modified: trunk/Source/WTF/ChangeLog (233391 => 233392)


--- trunk/Source/WTF/ChangeLog	2018-06-30 06:42:04 UTC (rev 233391)
+++ trunk/Source/WTF/ChangeLog	2018-06-30 07:08:01 UTC (rev 233392)
@@ -1,3 +1,18 @@
+2018-06-30  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r233391.
+        https://bugs.webkit.org/show_bug.cgi?id=187217
+
+        This patch broke Windows ports (Requested by fredw on
+        #webkit).
+
+        Reverted changeset:
+
+        "WTF's internal std::optional implementation should abort() on
+        bad optional access"
+        https://bugs.webkit.org/show_bug.cgi?id=186536
+        https://trac.webkit.org/changeset/233391
+
 2018-06-29  Frederic Wang  <[email protected]>
 
         WTF's internal std::optional implementation should abort() on bad optional access

Modified: trunk/Source/WTF/wtf/Assertions.h (233391 => 233392)


--- trunk/Source/WTF/wtf/Assertions.h	2018-06-30 06:42:04 UTC (rev 233391)
+++ trunk/Source/WTF/wtf/Assertions.h	2018-06-30 07:08:01 UTC (rev 233392)
@@ -220,12 +220,6 @@
 #define WTFBreakpointTrap() WTFCrash() // Not implemented.
 #endif
 
-#if COMPILER(MSVC)
-#define WTFBreakpointTrapUnderConstexprContext() __debugbreak()
-#else
-#define WTFBreakpointTrapUnderConstexprContext() __builtin_trap()
-#endif
-
 #ifndef CRASH
 
 #if defined(NDEBUG) && OS(DARWIN)
@@ -511,27 +505,6 @@
 #define RELEASE_ASSERT_NOT_REACHED() ASSERT_NOT_REACHED()
 #endif
 
-/* RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT
-
-   This is a special version of RELEASE_ASSERT(assertion) that can be used in constexpr contexts.
-*/
-#if ASSERT_DISABLED
-#define RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(assertion) do { \
-    if (UNLIKELY(!(assertion))) { \
-        WTFBreakpointTrapUnderConstexprContext(); \
-        __builtin_unreachable(); \
-    } \
-} while (0)
-#else
-#define RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(assertion) do { \
-    if (!(assertion)) { \
-        WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, #assertion); \
-        WTFBreakpointTrapUnderConstexprContext(); \
-        __builtin_unreachable(); \
-    } \
-} while (0)
-#endif
-
 /* UNREACHABLE_FOR_PLATFORM */
 
 #if COMPILER(CLANG)

Modified: trunk/Source/WTF/wtf/Optional.h (233391 => 233392)


--- trunk/Source/WTF/wtf/Optional.h	2018-06-30 06:42:04 UTC (rev 233391)
+++ trunk/Source/WTF/wtf/Optional.h	2018-06-30 07:08:01 UTC (rev 233392)
@@ -530,7 +530,8 @@
   }
 
   OPTIONAL_MUTABLE_CONSTEXPR T* operator ->() {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(initialized());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // CONSTEXPR_ASSERT(initialized());
     return dataptr();
   }
 
@@ -539,27 +540,32 @@
   }
 
   OPTIONAL_MUTABLE_CONSTEXPR T& operator *() & {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(initialized());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // CONSTEXPR_ASSERT(initialized());
     return contained_val();
   }
 
   OPTIONAL_MUTABLE_CONSTEXPR T&& operator *() && {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(initialized());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // CONSTEXPR_ASSERT(initialized());
     return detail_::constexpr_move(contained_val());
   }
 
   constexpr T const& value() const& {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(initialized());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // return initialized() ? contained_val() : (throw bad_optional_access("bad optional access"), contained_val());
     return contained_val();
   }
 
   OPTIONAL_MUTABLE_CONSTEXPR T& value() & {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(initialized());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // return initialized() ? contained_val() : (throw bad_optional_access("bad optional access"), contained_val());
     return contained_val();
   }
 
   OPTIONAL_MUTABLE_CONSTEXPR T&& value() && {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(initialized());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // if (!initialized()) __THROW_EXCEPTION(bad_optional_access("bad optional access"));
     return std::move(contained_val());
   }
 
@@ -677,7 +683,8 @@
   }
 
   constexpr T& value() const {
-    RELEASE_ASSERT_UNDER_CONSTEXPR_CONTEXT(ref());
+    // FIXME: We need to offer special assert function that can be used under the contexpr context.
+    // return ref ? *ref : (throw bad_optional_access("bad optional access"), *ref);
     return *ref;
   }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to