Title: [140577] trunk/Source/WTF
- Revision
- 140577
- Author
- [email protected]
- Date
- 2013-01-23 13:15:29 -0800 (Wed, 23 Jan 2013)
Log Message
Add RELEASE_ASSERT (and a few friends)
https://bugs.webkit.org/show_bug.cgi?id=107725
Reviewed by Filip Pizlo.
Adding a few macros to make release mode assertions easier and more readable.
Also makes same assertions more useful in debug builds.
* wtf/Assertions.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (140576 => 140577)
--- trunk/Source/WTF/ChangeLog 2013-01-23 20:54:07 UTC (rev 140576)
+++ trunk/Source/WTF/ChangeLog 2013-01-23 21:15:29 UTC (rev 140577)
@@ -1,3 +1,15 @@
+2013-01-23 Oliver Hunt <[email protected]>
+
+ Add RELEASE_ASSERT (and a few friends)
+ https://bugs.webkit.org/show_bug.cgi?id=107725
+
+ Reviewed by Filip Pizlo.
+
+ Adding a few macros to make release mode assertions easier and more readable.
+ Also makes same assertions more useful in debug builds.
+
+ * wtf/Assertions.h:
+
2013-01-22 Joshua Bell <[email protected]>
Prevent race condition during Worker shutdown
Modified: trunk/Source/WTF/wtf/Assertions.h (140576 => 140577)
--- trunk/Source/WTF/wtf/Assertions.h 2013-01-23 20:54:07 UTC (rev 140576)
+++ trunk/Source/WTF/wtf/Assertions.h 2013-01-23 21:15:29 UTC (rev 140577)
@@ -390,4 +390,14 @@
#define UNREACHABLE_FOR_PLATFORM() ASSERT_NOT_REACHED()
#endif
+#if ASSERT_DISABLED
+#define RELEASE_ASSERT(assertion) (!(assertion) ? (CRASH()) : (void)0)
+#define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) RELEASE_ASSERT(assertion)
+#define RELEASE_ASSERT_NOT_REACHED() CRASH()
+#else
+#define RELEASE_ASSERT(assertion) ASSERT(assertion)
+#define RELEASE_ASSERT_WITH_MESSAGE(assertion, ...) ASSERT_WITH_MESSAGE(assertion, __VA_ARGS__)
+#define RELEASE_ASSERT_NOT_REACHED() ASSERT_NOT_REACHED()
+#endif
+
#endif /* WTF_Assertions_h */
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes