Title: [261870] trunk/Source/WTF
- Revision
- 261870
- Author
- mark....@apple.com
- Date
- 2020-05-19 10:53:51 -0700 (Tue, 19 May 2020)
Log Message
Remove unnecessary debug logging from release builds.
https://bugs.webkit.org/show_bug.cgi?id=212084
<rdar://problem/63398704>
Reviewed by Saam Barati.
* wtf/PtrTag.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (261869 => 261870)
--- trunk/Source/WTF/ChangeLog 2020-05-19 17:20:00 UTC (rev 261869)
+++ trunk/Source/WTF/ChangeLog 2020-05-19 17:53:51 UTC (rev 261870)
@@ -1,3 +1,13 @@
+2020-05-19 Mark Lam <mark....@apple.com>
+
+ Remove unnecessary debug logging from release builds.
+ https://bugs.webkit.org/show_bug.cgi?id=212084
+ <rdar://problem/63398704>
+
+ Reviewed by Saam Barati.
+
+ * wtf/PtrTag.h:
+
2020-05-18 Andy Estes <aes...@apple.com>
http/tests/ssl/applepay/ApplePayInstallmentConfiguration.https.html fails in public SDK builds
Modified: trunk/Source/WTF/wtf/PtrTag.h (261869 => 261870)
--- trunk/Source/WTF/wtf/PtrTag.h 2020-05-19 17:20:00 UTC (rev 261869)
+++ trunk/Source/WTF/wtf/PtrTag.h 2020-05-19 17:53:51 UTC (rev 261870)
@@ -105,8 +105,13 @@
#if ASSERT_ENABLED
constexpr bool enablePtrTagDebugAssert = true;
+#define REPORT_BAD_TAG(success, ptr, expectedTag) do { \
+ if (UNLIKELY(!success)) \
+ reportBadTag(reinterpret_cast<const void*>(ptr), expectedTag); \
+ } while (false)
#else
constexpr bool enablePtrTagDebugAssert = false;
+#define REPORT_BAD_TAG(success, ptr, expectedTag)
#endif
#define WTF_PTRTAG_ASSERT(action, ptr, expectedTag, assertion) \
@@ -114,9 +119,7 @@
if (action == PtrTagAction::ReleaseAssert \
|| (WTF::enablePtrTagDebugAssert && action == PtrTagAction::DebugAssert)) { \
bool passed = (assertion); \
- if (UNLIKELY(!passed)) { \
- reportBadTag(reinterpret_cast<const void*>(ptr), expectedTag); \
- } \
+ REPORT_BAD_TAG(passed, ptr, expectedTag); \
RELEASE_ASSERT(passed && #assertion); \
} \
} while (false)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes