Title: [261956] branches/safari-609-branch/Source/WTF
- Revision
- 261956
- Author
- [email protected]
- Date
- 2020-05-20 14:17:39 -0700 (Wed, 20 May 2020)
Log Message
Cherry-pick r261870. rdar://problem/63461429
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:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-609-branch/Source/WTF/ChangeLog (261955 => 261956)
--- branches/safari-609-branch/Source/WTF/ChangeLog 2020-05-20 21:17:37 UTC (rev 261955)
+++ branches/safari-609-branch/Source/WTF/ChangeLog 2020-05-20 21:17:39 UTC (rev 261956)
@@ -1,5 +1,29 @@
2020-05-20 Alan Coon <[email protected]>
+ Cherry-pick r261870. rdar://problem/63461429
+
+ 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:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-19 Mark Lam <[email protected]>
+
+ 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-20 Alan Coon <[email protected]>
+
Cherry-pick r261598. rdar://problem/63461433
catch_mach_exception_raise_state() should fail early if the faulting address is not of interest.
Modified: branches/safari-609-branch/Source/WTF/wtf/PtrTag.h (261955 => 261956)
--- branches/safari-609-branch/Source/WTF/wtf/PtrTag.h 2020-05-20 21:17:37 UTC (rev 261955)
+++ branches/safari-609-branch/Source/WTF/wtf/PtrTag.h 2020-05-20 21:17:39 UTC (rev 261956)
@@ -103,10 +103,15 @@
WTF_EXPORT_PRIVATE void registerPtrTagLookup(PtrTagLookup*);
WTF_EXPORT_PRIVATE void reportBadTag(const void*, PtrTag expectedTag);
-#if ASSERT_DISABLED
+#if !ASSERT_DISABLED
+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;
-#else
-constexpr bool enablePtrTagDebugAssert = true;
+#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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes